Hello!
I would like to bind my grid to a datasource in the code behind and generate my own columns and behaviors. Unfortunately I cannot get it all to work.
I would like to:
1. generate columns
2. add group by
3. add sorting behaviors
Can someone please tell me where in the code behind that this functionality should be included? I have tried a couple of different spots without success.
The generate columns code works alright and this is done on Page_Load. The Group by code is added in the same sub routine just before the DataBind call. I have tried to add the Sort behaviors in a lot of different positions but that seems to be tricky.
If i add the sort behavior in the code behind, the sortedcolumns is always null when I try to add a columnkey to it. If the sorting behavior is added in the html code, it is possible to add columns to it in the code behind but when the column is added, the sorting isn't really activated. It looks like it is activated (by the icon next to the column header in the grid) but it isn't. When clicked, it works of course...
All ideas are welcome ;-)
Thanks!
/Henrik
Hello Zlatan,
Let me know if you still need assistance with this.
Regards,
Lyuba
Developer Support Engineer
Infragistics
www.infragistics.com/support
I am running into the same issue as described in this thread. I tried adding the grouping and sorting code to the grid's prerender event in the code behind, but no luck.