This question is locked. New answers and comments are not allowed.
Hello Telerik team,
I have dynamic number of columns for my GridView, i.e. I don't know how many columns I will have in my GridView, but I know that I'll have 5 of them for sure. I don't wanna use AutoGenerateColumns, so I can define my columns. For the dynamic columns I have a different data source. Is there a property, for example GridViewDataColumnCollection to bind my dynamic columns or I have to create the columns in code behind?
I have dynamic number of columns for my GridView, i.e. I don't know how many columns I will have in my GridView, but I know that I'll have 5 of them for sure. I don't wanna use AutoGenerateColumns, so I can define my columns. For the dynamic columns I have a different data source. Is there a property, for example GridViewDataColumnCollection to bind my dynamic columns or I have to create the columns in code behind?
<telerik:RadGridView.Columns> <telerik:GridViewDataColumn DataMemberBinding="{Binding Path=Name}" Header="Name"> <telerik:GridViewDataColumn.Footer> <TextBlock Text="Total" FontWeight="Bold" /> </telerik:GridViewDataColumn.Footer> </telerik:GridViewDataColumn> <telerik:GridViewDataColumnCollection DataMemberBinding="{Binding Path=DynamicColumnsList}> </telerik:GridViewDataColumnCollection></telerik:RadGridView.Columns>