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

Default Group By

9 Answers 149 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Developer Developer
Top achievements
Rank 1
Developer Developer asked on 13 Apr 2009, 06:12 PM
The 'group by' behaviour appears to behave diferrently if defined declaratively as apposed to dragging and dropping the columns into the GridGroupPanel.

When the page first loads and I define declaritively the 'Group By' rows look like the following:

+ HomeTerminal: Buffalo; JobNumber: 222222
[row data]
[row data]
[row data]
+ HomeTerminal: Buffalo; JobNumber: 555555
[row data]
[row data]

Then I drag the items from the GridGroupPanel to clear the grouping.  Then I drag the 'Home Terminal' column to group by that column.  Then I drage the 'Job Number' column to group by that column.  The results are then:

+ Home Terminal: Buffalo
+ Job Number: 222222
[row data]
[row data]
[row data]
+ Job Number: 555555
[row data]
[row data]

Does anybody know how to get the grid to look like the second example when the page first loads?  Thank you very much for your help.


9 Answers, 1 is accepted

Sort by
0
Yavor
Telerik team
answered on 15 Apr 2009, 11:22 AM
Hi Developer,

To simulate the same behavior with the declarative group by expressions, you will need to define two separate group by expressions, one for each level of grouping. Give this suggestion a try and let me know how it goes.

Best wishes,
Yavor
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
John Crowley
Top achievements
Rank 1
answered on 20 Apr 2009, 12:47 PM
Exactly what I was looking for.  Thank you very much.
0
Mark
Top achievements
Rank 2
answered on 23 Aug 2009, 03:46 AM
Do you have a syntax example of this?  Can this be done in source as opposed to code-behind?
0
Mark
Top achievements
Rank 2
answered on 23 Aug 2009, 03:50 AM
Never mind...found it. :-)
0
Duane Faithen
Top achievements
Rank 1
answered on 08 Apr 2010, 04:17 PM

I have the opposite problem. Is ther a way to  
achieve the multi column single epression format when dragging the column headers on the client instead of
the multi expression format i.e.

HomeTerminal: Buffalo; JobNumber: 222222
    [row data]

    [row data]

Instead of

+ HomeTerminal: Buffalo
    + Job Number: 222222
        [row data]

        [row data]

Thanks,
Duane

0
Yavor
Telerik team
answered on 13 Apr 2010, 08:55 AM
Hi Duane,

This nesting is not possible. The reason for this is that the groups are separated into separate lines, so that the expand/collapse operations can be handled accordingly, since these are different groups.

Greetings,
Yavor
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
Duane Faithen
Top achievements
Rank 1
answered on 13 Apr 2010, 01:04 PM
So just to be sure. The only way to achieve this is at design time? there is no way to do this in the client at runtime?
0
Yavor
Telerik team
answered on 15 Apr 2010, 12:38 PM
Hi Duane Faithen,

Basically, the default grouping mechanism does not cater for this functionality.
The other option is to alter the group by expression dynamically:

http://www.telerik.com/help/aspnet-ajax/grdsetgroupbyexpressionondnd.html

In this way, you can achieve nesting like the following:

http://demos.telerik.com/aspnet-ajax/grid/examples/groupby/expressions/defaultcs.aspx

I hope this information helps.

Sincerely yours,
Yavor
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
Yavor
Telerik team
answered on 15 Apr 2010, 12:40 PM
Hello Duane,

As a quick follow up on the previous setup, I wanted to add another option, which is especially useful if you are aware of the possible grouping expression(s) in advance. You can dynamically set the expression from the code behind:

http://www.telerik.com/help/aspnet-ajax/grdgroupbyprogrammaticdefinition.html

I hope one of these options is suitable for you.

All the best,
Yavor
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.
Tags
Grid
Asked by
Developer Developer
Top achievements
Rank 1
Answers by
Yavor
Telerik team
John Crowley
Top achievements
Rank 1
Mark
Top achievements
Rank 2
Duane Faithen
Top achievements
Rank 1
Share this question
or