This is a migrated thread and some comments may be shown as answers.

Can't sort on my data column

1 Answer 65 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Tab Alleman
Top achievements
Rank 1
Tab Alleman asked on 25 Jun 2010, 08:58 PM
I am creating a RadGrid and initially assigning the sortExpression to use the data column, "Plcmt Date" as its FieldName:

 

<SortExpressions>

 

 

<telerik:GridSortExpression FieldName="Plcmt Date" SortOrder="Ascending" />

 

 

</SortExpressions>

 

the column seems to be set up correctly:
 

 

 

<telerik:GridBoundColumn HeaderText="Plcmt Date" UniqueName="PlacementDate" HeaderTooltip=""

 

 

SortDescImageUrl="../RadControls/Grid/Skins/Default/SortDesc.gif" SortAscImageUrl="../RadControls/Grid/Skins/Default/SortAsc.gif"

 

 

DataField="Plcmt Date" SortExpression="Plcmt Date" AllowSorting="true" FooterText="Grand Total">

 

 

 



but I am getting this error:

Error serializing value 'Plcmt Date ASC' of type 'Telerik.Web.UI.GridSortExpression.'

Is it because there is a space in the column name or something?   I've looked all over the site and don't see anything about restrictions on column names that can be used for sorting.

1 Answer, 1 is accepted

Sort by
0
Tab Alleman
Top achievements
Rank 1
answered on 25 Jun 2010, 10:14 PM
Never mind.   the error was because I was trying to save the Sort Expression in ViewState and you can't do that without making it serializable.

Tags
Grid
Asked by
Tab Alleman
Top achievements
Rank 1
Answers by
Tab Alleman
Top achievements
Rank 1
Share this question
or