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

[Solved] Multicolumn Sorting with GroupByExpression

2 Answers 135 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Xiaoyun
Top achievements
Rank 1
Xiaoyun asked on 09 May 2008, 09:50 PM
Hi,

I was able to do multiple column sorting with GroupByExpression in RadControls for ASP.NET Q3 2007.

After installing RadControls for ASPNET AJAX Q1 2008, I couldn't do the same.

The default multiple sorting fails for a particular column has five sub columns, which are like "Events1,Events2,Events3,Events4,NoEvents"

I have tried in earlier release and it was working though.

The syntax used is

<

telerik:GridTemplateColumn HeaderText="Events" GroupByExpression="Events1,Events2,Events3,Events4,Events5" SortExpression="Events1" SortAscImageUrl="../Images/Grid/SortAsc.gif" SortDescImageUrl="../Images/Grid/SortDesc.gif" UniqueName="TemplateColumnEvents">

Thanks and regards,

Ramesh


2 Answers, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 12 May 2008, 06:14 AM
Hi Ramesh,

Have you set AllowMultiColumnSorting property to true? Go through the following help article.
Multi-column sorting

Princy.
0
Sebastian
Telerik team
answered on 12 May 2008, 08:15 AM
Hello Ramesh,

I checked your GroupByExpression syntax and it seems that it does not conform to the conventions depicted in this topic from the online documentation:

http://www.telerik.com/help/aspnet-ajax/grdgroupbydeclarativedefinition.html (see the bottom paragraph)

Can you confirm that the group expression is properly evaluated in your case or revise it to be in par with the general GroupBy syntax for TSQL query? Additionally, if you want to perform multi-column sorting, consider adding multiple sort expressions programmatically as demonstrated here:

http://www.telerik.com/DEMOS/ASPNET/Prometheus/Grid/Examples/Programming/Sort/DefaultCS.aspx

or implement sorting for your template column by multiple fields as for the last template column in this example (using appropriate CommandName/CommandArgument values for the buttons in the header template of the column):

http://www.telerik.com/DEMOS/ASPNET/Prometheus/Grid/Examples/GeneralFeatures/ColumnTypes/DefaultCS.aspx

If this does not help, I would request to send us a stripped working version of your project (holding the grid page and its source) which works properly with the Q3 2007 release of RadControls (attached to a formal support ticket). We will gladly convert it for you to function properly with the Q1 2008 release of RadControls for ASP.NET AJAX.

Best regards,
Stephen
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
Tags
Grid
Asked by
Xiaoyun
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Sebastian
Telerik team
Share this question
or