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

group header functionality broken in Q3 2011

3 Answers 51 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Albert Shenker
Top achievements
Rank 1
Veteran
Iron
Albert Shenker asked on 08 Dec 2011, 07:08 PM
The new Group Header Templates functionality in Q3 2011 appears to have broken some of the functionality which worked before. I define my groupinsettings server-side as such:
Dim fId As New GridGroupByField
 fId.FieldName = "ID"
 fId.Aggregate = GridAggregateFunction.Count
 fId.FormatString = "({0})"
 fId.HeaderValueSeparator = " "
 fId.HeaderText = " "
 
Dim expr As New GridGroupByExpression
Dim fState As New GridGroupByField
fState.FieldAlias = "State"
fState.FieldName = "GroupState"
fState.FormatString = "{0}"
 
expr.SelectFields.Add(fState)
expr.SelectFields.Add(fId)
 
Dim fGroupState As New GridGroupByField
fGroupState.FieldName = "GroupState"
expr.GroupByFields.Add(fGroupState)
 
MyGrid.MasterTableView.GroupByExpressions.Add(expr)


In q2 it looked like the attached q2.jpg. In Q3 it look slike the attached q3.jpg. There is no difference in code.

3 Answers, 1 is accepted

Sort by
0
Martin
Telerik team
answered on 09 Dec 2011, 09:12 AM
Hello Albert Shenker,

Please note that when aggregate function is used, the GridGroupByField should declare a FieldAlias as well:

Dim fId As New GridGroupByField
 fId.FieldName = "ID"
 fId.FieldAlias = "IDs"
 fId.Aggregate = GridAggregateFunction.Count
 fId.FormatString = "({0})"
 fId.HeaderValueSeparator = " "
 fId.HeaderText = " "
  
Dim expr As New GridGroupByExpression
...

Indeed your code worked for versions prior to Q3 2011 or when EnableLinqGrouping is set to false (Q3 2011 and later). Since it is not correct to have different behaviors based on the value of this property, I have forwarded your report to our developers for further investigation.

I hope this helps.

All the best,Martin
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now
0
Albert Shenker
Top achievements
Rank 1
Veteran
Iron
answered on 09 Dec 2011, 04:57 PM
Ok, I have set EnableLInqGrouping to False and the grouping works now. Can you let me know what the benefit of setting this to true is? I'd like to know what I'm missing in the short term until you figure this bug out.
0
Martin
Telerik team
answered on 14 Dec 2011, 04:57 PM
Hello Albert Shenker,

I would suggest that you review the following blog post:

Super-charged Performance Optimizations for Telerik's ASP.NET AJAX Grid in Q3 2011

In addition I would like to note that by default it is required to use FieldAlias for those fields that have aggregate functions set, nevertheless EnableLinqGrouping is enabled or not.

Greetings,
Martin
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now
Tags
Grid
Asked by
Albert Shenker
Top achievements
Rank 1
Veteran
Iron
Answers by
Martin
Telerik team
Albert Shenker
Top achievements
Rank 1
Veteran
Iron
Share this question
or