5 Answers, 1 is accepted
0
Hi Suresh,
Could you please explain a little bit what are you trying to achieve? For example - are you binding RadGrid to an already sorted data source and want the sorting indicator to appear on initial load automatically? Is that correct?
Regards,
Dimo
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Could you please explain a little bit what are you trying to achieve? For example - are you binding RadGrid to an already sorted data source and want the sorting indicator to appear on initial load automatically? Is that correct?
Regards,
Dimo
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0

Suresh
Top achievements
Rank 1
answered on 24 Jul 2008, 06:35 PM
yeah excatlly.
if i apply sort preference through a modal window, i'm sorting the data source programmatically. now i want to indicate the sorted column as well.
if i apply sort preference through a modal window, i'm sorting the data source programmatically. now i want to indicate the sorted column as well.
0
Hello Suresh,
In order to make the sort indicator appear automatically on initial page load, you can use the following approach:
In this case RadGrid will not sort the already sorted data and the indicator will appear. The only thing to do more is to set AllowCustomSorting="False" on sort command, so that RadGrid starts sorting:
Greetings,
Dimo
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.
In order to make the sort indicator appear automatically on initial page load, you can use the following approach:
<telerik:RadGrid |
ID="RadGrid3" |
runat="server" |
AllowSorting="true" |
OnSortCommand="RadGrid3_SortCommand"> |
<MasterTableView AllowCustomSorting="true"> |
<SortExpressions> |
<telerik:GridSortExpression FieldName="..." SortOrder="Ascending" /> |
</SortExpressions> |
</MasterTableView> |
</telerik:RadGrid> |
In this case RadGrid will not sort the already sorted data and the indicator will appear. The only thing to do more is to set AllowCustomSorting="False" on sort command, so that RadGrid starts sorting:
protected void RadGrid3_SortCommand(object sender, GridSortCommandEventArgs e) |
{ |
RadGrid3.MasterTableView.AllowCustomSorting = false; |
} |
Greetings,
Dimo
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0

Suresh
Top achievements
Rank 1
answered on 25 Jul 2008, 04:02 PM
Hi ,
Thanks for your post. It helps me to set the sort column in initial load scenario provided the column and sort order is constant.
but lets look at this scenario,
lets have Column 1 , Column 2 -> what if Column and sort order is dynamic in initial load, how can we set sort icon for that particular column?
Thanks for your post. It helps me to set the sort column in initial load scenario provided the column and sort order is constant.
but lets look at this scenario,
lets have Column 1 , Column 2 -> what if Column and sort order is dynamic in initial load, how can we set sort icon for that particular column?
0
Hello Suresh,
Well, in this case you will have to define the sort expressions programmatically, instead of declaratively:
RadGrid Sort Expressions
Greetings,
Dimo
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Well, in this case you will have to define the sort expressions programmatically, instead of declaratively:
RadGrid Sort Expressions
Greetings,
Dimo
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.