I have a boolean data column which is displaying true/ false when bound to the grid view. Is there a way that i can format this column to display yes/ no instead.
3 Answers, 1 is accepted
answered on 17 Aug 2009, 02:10 PM
Thank you for writing. You can subscribe to CellFormatting event. The purpose of this event is to give users the opportunity to format the values in the cells as well. In the event handler, you can change the value of your cell to Yes if the underlaying value is true and to No otherwise. Please write back if you need further assistance.
Can you give a code example of how this could be performed easily? In my case the GridView is displaying CheckBoxes instead of a text value. I want it to be Yes/No OR True/False...just not the CheckBoxes. I do not allow Editing or Adding of Grid values as this is a readonly grid.
I have attached a small sample application to demonstrate how your goal can be achieved. Basically the column with the check boxes is hidden and another is added which takes its values from the hidden column. Please write again if you have other questions.