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

rls

To enable row-level security (RLS) in MS SQL Server (2016 and later) , you need to define a security policy that uses a user-defined, inli...