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

[Solved] Should GridGroupSplitterColumn be included in FrozenColumCount?

3 Answers 164 Views
Grid
This is a migrated thread and some comments may be shown as answers.
PVR
Top achievements
Rank 1
PVR asked on 03 Nov 2009, 06:08 AM
Hi,

It seems that when Grouping is enabled on the grid, the GridGroupSplitterColumns are being included as part of the FrozenColumnCount, is this by design?
I think GridGroupSplitterColumns should be excluded from the FrozenColumnCount.

Anyway, as a workaround, for those interested had to increase/decrease 'grid.ClientSettings.Scrolling.FrozenColumnsCount' within GroupsChanging event.

Also, programatically setting GroupByExpressions does not seem to fire GroupsChanging event, I think because GroupsChanging it is part of drag/un-drag column header to GroupPanel, so also had to increase FrozenColumnCount during this action.

3 Answers, 1 is accepted

Sort by
0
Schlurk
Top achievements
Rank 2
answered on 04 Nov 2009, 10:56 PM
Was your SplitterColumn your first column? Since FrozenColumnCount goes from the first column to the left and over to the right until the count reaches 0 this could explain why it was included.
0
PVR
Top achievements
Rank 1
answered on 06 Nov 2009, 03:28 AM
Hi,

Perhaps an example would clear things up:
If I have a grid with columns A, B, C ... Z.
When I set FrozenColumnCount = 3, I see columns A, B, C in frozen section, then columns D to Z in scrollable section.

The issue is when I send a column in group header, the grid will auto add a GridGroupSplitterColumn (GGS1).
So now the columns in frozen section will be GGS1, A, B and the columns C-Z in scrollable section.
This in my opinion is confusing, perhaps this is by design, but I was expecting to see columns in frozen section to be GGS1, A, B, C and columns D-Z in scrollable section.
If you group the grid by more columns it will get to the point where all the frozen columns are now taken by GridGroupSplitterColumns.

So I think
1) at best, there should be an setting say called 'ExcludeGroupSplitterColumnFromFrozenColumnCount' (perhaps too long but you get the idea). Defaulted to False (so that existing grids are not broken)
2) at minimum, this issue (even if intentional by design) to be documented in demos and documentation so a customer is aware they will have to make code changes to handle this.

Thanks


0
Carl
Telerik team
answered on 11 Nov 2009, 06:59 AM
Hi Pablo,

The behavior you are experiencing is by design, since the FrozenColumnsCount freezes columns starting from the leftmost one. Since you are adding columns to the left of the columns you have frozen they will be included in the list of columns to freeze, while the right-most will be removed since it is now out of the FrozenColumnsCount range. This feature is meant to mimic the behavior of frozen columns in Excel and the two behave the same.

Both our demo and documentation article regarding this property do state that the columns to be frozen are counted from the leftmost going to the right:
  • "To enable static columns, set the ClientSettings.Scrolling.FrozenColumnsCount property to a value greater than 0. The value of FrozenColumnsCount specifies the number of columns (starting with the leftmost column) that do not scroll when the of the user scrolls the grid horizontally, using the horizontal scroll bar. This feature is functional even when in hierarchical grids and grids that support grouping."
  • "To enable this grid functionality, merely set the ClientSettings -> Scrolling -> FrozenColumnsCount property of the control which determines the count of columns (starting from the leftmost column) which will be statically positioned when you drag the horizontal scroll in the grid. This feature is functional with hierarchy/grouping presentation as well."

As for your first suggestion we do appreciate your feedback on this matter.

Kind regards,
Carl
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
Grid
Asked by
PVR
Top achievements
Rank 1
Answers by
Schlurk
Top achievements
Rank 2
PVR
Top achievements
Rank 1
Carl
Telerik team
Share this question
or