Hi
I have a RadGridView bound to a object data source. This data source has certain properties with values Y/N. I would like to display the value of this property as a checkbox in the grid. I would like to create the column from source code. Data cannot be edited in the grid in my scenario, the grid is used only to display the data.
I have tried to add a converter to the binding, which has converted Y/N to True/False, but still, the grid view display this as a string, not as a checkbox. Then, I have tried to change the DataType for the column to bool, but the result was only a few empty cells (without the strings or checkboxes).
My code is the following:
...
new GridViewDataColumn()
{ Header = header,
DataType=typeof(bool),
IsAutoGenerated=false,
DataMemberBinding = new System.Windows.Data.Binding(property.GetMemberName()) { Converter = converter }};
Is there any way to make this work, or what is the easiest way to solve the problem?
Thanks for the help in advance!
Cheers,
G. M.
I have a RadGridView bound to a object data source. This data source has certain properties with values Y/N. I would like to display the value of this property as a checkbox in the grid. I would like to create the column from source code. Data cannot be edited in the grid in my scenario, the grid is used only to display the data.
I have tried to add a converter to the binding, which has converted Y/N to True/False, but still, the grid view display this as a string, not as a checkbox. Then, I have tried to change the DataType for the column to bool, but the result was only a few empty cells (without the strings or checkboxes).
My code is the following:
...
new GridViewDataColumn()
{ Header = header,
DataType=typeof(bool),
IsAutoGenerated=false,
DataMemberBinding = new System.Windows.Data.Binding(property.GetMemberName()) { Converter = converter }};
Is there any way to make this work, or what is the easiest way to solve the problem?
Thanks for the help in advance!
Cheers,
G. M.