Greetings,
I have a RadGrid within a CompositeControl (along with a couple RadMenus and some other controls). I store a user's column visibility and sort preferences serverside and manually add the columns and sortexpression when a grid is loaded. The error I am getting is:
which occurs Only when I add my own sortexpression to the mastertableview during Grid.Init (after all the columns have been added). If I comment out the
I have tried setting Col.ShowSortIcon to false but that did not change anything. I have also played with different values for Col.HeaderButtonType, also without change.
Any insight would be greatly appreciated.
Thanks,
- Forrest
I have a RadGrid within a CompositeControl (along with a couple RadMenus and some other controls). I store a user's column visibility and sort preferences serverside and manually add the columns and sortexpression when a grid is loaded. The error I am getting is:
Unable to cast object of type 'Telerik.Web.UI.GridImageButton' to type 'System.Web.UI.WebControls.Button'.
which occurs Only when I add my own sortexpression to the mastertableview during Grid.Init (after all the columns have been added). If I comment out the
Grid.MasterTableView.SortExpressions.AddSortExpression(sortExp);
then everything works as expected, but I don't get my sort, of course.I have tried setting Col.ShowSortIcon to false but that did not change anything. I have also played with different values for Col.HeaderButtonType, also without change.
Any insight would be greatly appreciated.
Thanks,
- Forrest