Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
248
How to convert a System.Boolean to a char
posted

I have a lot of boolean columns in a grid, and I just wan't to show it as text.

False: 'N'

true:'J'.

The fields are no edit

  • 469350
    Offline posted

    There are a number of ways to do this. What I would do is use a ValueList and populate it with two items. You can set the DataValue on the item to true/false and the display text to the letter you want. Set the ValueList proeprty on the column and the valuelist will handle translating the booleans into the display texts.