Id like to be able to prevent these columns from being added and just the group headers be shown as additional rows, either with or without the ability to expand or collapse.
I have attached an image of what is happening. The red section highlights the newly added column when I group, and the green section highlights the grid and its data being forced out to the right.
I have to set the width of the rows or they all come out the same size making the header row twice as tall as I want it. If there is an easy way to have the entire grid set to a width and the columns size automatically then please tell me how.
11 Answers, 1 is accepted
The group splitter column has not been designed to be easily hidden, but you can use the approach shown below.
When you use scrolling with static headers and at least one column has explicit width (in this case - the GroupSplitterColumn), then the TableLayout is automatically switched to Fixed. This means that all columns with no explicit width will become equally wide. Removing the group column's width is hardly an option, as it will become too wide.
the Telerik team
I couldn't quite get this to work, The column always appeared still, but after having a tinker (as you'd put me on the right path at least) I ended up with the following...
I ended up with
which hides the columns nicely. Is this a new feature with Q3 2010?
However, I now want to hide the collapse/expand icons that appear at the start of the group header rows... :)
Give a try with the following approach to hide the group ExpandCollapse column.
That worked a treat, thank you!
I also added the line
as GridGroupHeaderItem).Cells.Visible = false;
immediately after the line
to hide this now empty cell and to pull the grouping text to the left.
now your method reads...
The above code is working fine at my end. Please try the following CSS to hide the ExpandCollapseColumn.
Works for me. But not in the markup..... Not too happy about that as it would be desirable in this instance to be able to put it in the markup .
I'm afraid currently the group expand column can be hidden only on the code-behind.
Please excuse us for any inconvenience this might have caused you.
Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.