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

Group multiple columns on the client side

6 Answers 116 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Trevor
Top achievements
Rank 1
Trevor asked on 15 Oct 2010, 10:55 PM
While researching the client API, I discovered the GridTableView.groupColumn(uniqueName) method.  However, this method only works with a single column.  Calling it a second time overrides the group put in place by the previous call of this method instead of adding another group.  Anyone know of a way to group multiple columns on the client side?

(Same problem with GridTableView.filter and GridTableView.sort -- How do I apply multiple column filters?)

6 Answers, 1 is accepted

Sort by
0
Marin
Telerik team
answered on 19 Oct 2010, 09:25 AM
Hi Trevor,

There is no straightaway approach to do this. Those methods from the client-side API do take only one column as parameter. And according to this help article subsequent calls to the sort method do sort the grid data by multiple criteria when AllowMultiColumnSorting is set to true. The client-side multicolumn grouping can also be achieved automatically by setting
<MasterTableView GroupLoadMode="Client">
 <ClientSettings AllowGroupExpandCollapse="True">
as shown in this demo.

Kind regards,
Marin
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Trevor
Top achievements
Rank 1
answered on 25 Oct 2010, 08:28 PM
I decided it would be easier to accomplish what I'm doing on the server-side.  The Sort and Group By functionality on the server-side is actually quite flexible.  However, the programmatic, server-side filtering options seem fairly limited.  The best I can find is RadGrid.MasterTableView.FilterExpression, which, for multiple columns, would be tedious to construct.  Is there something I'm missing that would allow me to filter similarly to how I sort and group?
0
Marin
Telerik team
answered on 26 Oct 2010, 10:23 AM
Hello Trevor,

You can enable server-side filtering by setting AllowFilteringByColumn=true in the grid. This will automatically show filter controls over each column allowing multiple ways of filtering. Moreover for each column in the grid you can modify: FilterFormatString, CurrentFilterFunction, CurrentFilterValue. For more information please check the following help article on basic filtering and the coresponding live demo, Also you can achieve even further customization by using google-like filtering and filtering with radfilter.

Greetings,
Marin
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Trevor
Top achievements
Rank 1
answered on 27 Oct 2010, 07:56 PM
I'm afraid I didn't explain myself very clearly.  I'm trying to load a predefined set of filters in the code-behind.  I've already got a RadGrid configured to let the user filter as much as they please through the browser interface.  What I want is for the user to click a button that auto-populates filters (on the server-side) with a set of predefined filters as mentioned above.  Any ideas?

Trevor
0
Accepted
Marin
Telerik team
answered on 28 Oct 2010, 03:00 PM
Hello Trevor,

RadGrid only exposes FilterExpression string property for manipulating the filter expressions. As an alternative you can use RadFilter which offers much more ways of configurations and creating various filter expressions and fiter groups in an intuitive way. Additionally here you can find more valueable information on manually operating with filter expressions in RadGrid.

Best wishes,
Marin
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Trevor
Top achievements
Rank 1
answered on 28 Oct 2010, 08:41 PM
Thank you!
Tags
Grid
Asked by
Trevor
Top achievements
Rank 1
Answers by
Marin
Telerik team
Trevor
Top achievements
Rank 1
Share this question
or