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

SortExpression with Brackets

1 Answer 70 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 06 Jul 2010, 03:34 PM
I've got a grid bound to a dataset that contains a column named "[$Colld]".      The brackets are actually a part of the column name.
For this column on my grid, I've got 

 

 

 

DataField="[$Colld]" 

and that works fine, the data shows in the grid.   However, I've also got   

 

 

 

 

 

SortExpression="[$Colld]" 

and when I click on the column header to sort by that column, I get this error:
Cannot find column $Colld.

It's like the brackets get ignored when they are in the SortExpression. 
So I tried:    

 

 

 

 

 

SortExpression="[[$Colld]]" 

but I get this error:
[[$Colld]] is neither a DataColumn nor a DataRelation for table ICRData.

How can I escape the brackets so that the SortExpression is accurately interpreted as "[$Colld]" ??  

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

1 Answer, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 07 Jul 2010, 12:32 PM
Hello Tab Alleman,

You got this error because square brackets are not supported in RadGrid field names. Please take a look at the following Forum post which discusses similar kind of issue.

Sorting issue in RadGrid - columns start and end with brackets

Thanks,
Princy.
Tags
Grid
Asked by
Tab Alleman
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Share this question
or