Friday, May 20, 2011

Float Sorting Problem in GridView

Requirement : Display a float value in the format XXXX.XX. Also it must be formatted.

If we format this numer in SQL and return a formatted string, we lose the sorting functionality.
e.g nos will be displayed as

1.0
21.22
3.12

. To get correct result, return float as it is from SP and use DataFormatString="{0:F2}" in the
boundcolumn declaration in the gridview

No comments:

Post a Comment

How to check local and global angular versions

 Use the command ng version (or ng v ) to find the version of Angular CLI in the current folder. Run it outside of the Angular project, to f...