Hi
I would like to create a usercontrol that will allow me have a set a predefined columns within a GridView when bound to a collection of our DataContract classes. What I would like to see is something on the order of the Data Template Selector... but instead, have that at the GridViewDataColumn level. Here is an example
[DataContract]
public MyDataClass
{
Public SomeEnum EnumProperty {get;set;}
Public SomeClass SomeClassProperty {get;set;}
Public int SomeIntProperty {get;set;}
}
Now lets say I have a List<MyDataClass> and I want to bind this to a RadGridView control and have it auto generate the columns based on some defined logic. I know that I could probably do this in the Auto generate event handler in my code behind though a series of if logic or case staements. But I would prefer it if there was a way that I can define some sort of a GridViewDataColumnSelector to have it automatically define both of the read only and editor templates. Something on the order of what we have for Data Template or Style Template selector except for the entire GridViewDataColumn.
For the example above.. I would like to auto-generate a Combobox for the Enum to provide a list of Enum possible values. And for the SomeClass property.. I want to create a ComboBox with a list of values bound to collection of possible values.
I would like to create a usercontrol that will allow me have a set a predefined columns within a GridView when bound to a collection of our DataContract classes. What I would like to see is something on the order of the Data Template Selector... but instead, have that at the GridViewDataColumn level. Here is an example
[DataContract]
public MyDataClass
{
Public SomeEnum EnumProperty {get;set;}
Public SomeClass SomeClassProperty {get;set;}
Public int SomeIntProperty {get;set;}
}
Now lets say I have a List<MyDataClass> and I want to bind this to a RadGridView control and have it auto generate the columns based on some defined logic. I know that I could probably do this in the Auto generate event handler in my code behind though a series of if logic or case staements. But I would prefer it if there was a way that I can define some sort of a GridViewDataColumnSelector to have it automatically define both of the read only and editor templates. Something on the order of what we have for Data Template or Style Template selector except for the entire GridViewDataColumn.
For the example above.. I would like to auto-generate a Combobox for the Enum to provide a list of Enum possible values. And for the SomeClass property.. I want to create a ComboBox with a list of values bound to collection of possible values.