I have a databound grid with one column with CHECKBOX style. Data is 1 and 0. If 1, the cell is checked and if 0 it is unchecked. It is working properly.
I need to display "Yes" and "No" as my filter options in my filterbar for the column.
Is there any option for doing this. Any help in this regard is really appreciated.
Thanks in advance,
ADAdministrator Syncfusion Team August 10, 2004 12:40 AM
There are no property setting that will do this for you.
You can handle the CurrrentCellShowingDropDown event. You can swap out the datasource for the dropdown at that point. In the new datasource, you would have a display member column showing yes/no and a Value member column returning the 1 and 0 that is used by your normal column. Here is a rough snippet. (Did not actually try this, so don''t know if you will have to change the typeof(int) to something else that better matches the type of the actual column you are using. (Mayen string, maybe bool).
Thanks for the quick response.
I could make it work with the following code.
//Modify stules grid.Model.ColStyles["column5"].CellType = "CheckBox";
grid.Model.ColStyles["column5"].CheckBoxOptions.CheckedValue = "Yes";
this.Model.ColStyles["column5"].CheckBoxOptions.UncheckedValue = "No";
And populating the column values as "Yes" for 1 and "No" for 0.