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

[Solved] Grouping field's DisplayName not respected when column is not in grid

2 Answers 83 Views
Grid
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Victor
Top achievements
Rank 1
Victor asked on 09 Jun 2011, 08:00 AM
Hi!

We just encountered a strange behavior in the Grid component - Grouping field's displayname not respected when column is not shown in the grid.

We have set up the grid to show 5 of 6 fields in the model and group on the last one. This setup makes the grouping header have the default name. When adding the 6th field as a visible column in the grid, the DisplayName is respected in both the column header and the grouping label.


Also, slightly related, is it possible to remove the "grouping toolbar"? That is: is it possible to set a fixed grouping that cannot be changed by the user? If not that would be a very nice feature to have for us.

Thanks
/Victor

2 Answers, 1 is accepted

Sort by
0
Rosen
Telerik team
answered on 09 Jun 2011, 09:12 AM
Hello Victor,

Indeed, this is expected behavior. When grouped on a field which is available as column the group text will be the column's title, however as there is no column in this case the member will be used as group text. Therefore, you may consider setting the group column as hidden instead of not declaring it.

As to your other question you may hide the group panel by setting groupable settings' Visible property to false:

.Groupable(settings => settings.Groups(groups => groups.Add(o => o.OrderDate)).Visible(false))


Greetings,
Rosen
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
Victor
Top achievements
Rank 1
answered on 09 Jun 2011, 09:14 AM
Ok, thanks for that and for the solution. Although for "expected" behaviour I would expect it to respect DisplayName since most other parts of the grid do :)

Anyway, thanks again for the solutions to both problems!

/Victor
Tags
Grid
Asked by
Victor
Top achievements
Rank 1
Answers by
Rosen
Telerik team
Victor
Top achievements
Rank 1
Share this question
or