Welcome Guest Search | Active Topics | Sign In | Register

Grid column set to Boolean data type render 0 or 1 insted of True False Options
Software Administrator
Posted: Monday, December 23, 2013 10:05:19 PM
Rank: Newbie
Groups: Member

Joined: 12/25/2008
Posts: 8
Hi,

I have a strange issue with the grid column with GridColumnDataType set to Boolean, the grid display 0 or 1 in the column instead of True or False. As per .Net documentation there is no data format provider for Boolean so what should I put in the DataFormat to render True or False?

Ho and yes I did check my data source an it a Boolean field.

Thanks.
eo_support
Posted: Friday, December 27, 2013 1:47:34 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,196
Hi,

The Grid does not display True or False because those two words are culture dependent, so internally the Grid always use "0" to represent false and "1" to represent true. If you wish to display true/false without allowing user to change it, you can either use a CustomColumn and handle the CustomColumn's ClientSideGetText event, or use a StaticColumn but returns "True" and "False" from your data source directly (for example, use SELECT IIF(your_bool_field, 'True', 'False') in your SQL instead of use SELECT your_bool_field directly.

Hope this helps. Please feel free to let us know if you have any more questions.

Thanks!


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.