I'm persisting the GroupBy expressions for a grid. The grouping is set by the end-user.
I have a problem in that I have a column like this...
Now, when I save the GroupBy expression, I save the value returned by the GroupByExpression's .Expression property.
When I try adding that that as a new GroupByExpression when the user revisits the page, the GroupBy header displays "Name" rather than the column's defined HeadterText of "Template".
Now, I did try serializing the whole of the GroupByExpression, but when I tried deserializing it to recreate the object, it complained that Only Field object can be in the Frieds collection, or something like that.
So, to the question. How can I serialize the GroupByExpression so that I can recreate the grouping with a) the correct field and b) the correct header text for the item in the GroupBy area of the grid?
--
Stuart
I have a problem in that I have a column like this...
<telerik:GridTemplateColumn HeaderText="Template" SortExpression="Name" ShowSortIcon="true" Groupable="true" DataField="Name" UniqueName="Name">Now, when I save the GroupBy expression, I save the value returned by the GroupByExpression's .Expression property.
When I try adding that that as a new GroupByExpression when the user revisits the page, the GroupBy header displays "Name" rather than the column's defined HeadterText of "Template".
Now, I did try serializing the whole of the GroupByExpression, but when I tried deserializing it to recreate the object, it complained that Only Field object can be in the Frieds collection, or something like that.
So, to the question. How can I serialize the GroupByExpression so that I can recreate the grouping with a) the correct field and b) the correct header text for the item in the GroupBy area of the grid?
--
Stuart