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

MasterGridViewTemplate.AutoGenerateColumns incompatible with grouping?

1 Answer 46 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Jim
Top achievements
Rank 1
Jim asked on 20 Jan 2009, 06:06 PM
I have been tearing my hair out trying to figure out how to get a grid to show grouped items on startup.  That is, when the grid initiallly displays, it's automatically in group mode.  The group panel is not visible, and the user cannot change the grid groupings.

No matter what I tried I couldn't make it work.  Then, I noticed I had a line like:

myGrid.MasterGridView.AutoGenerateColumns = false;

If I remove this line -- voila, the startup mode of the grid is in group mode.  It works as advertised. 

Now, this is causing me other problems; namely, columns that I don't want to appear show up in the grid.  So how can I get these two to happily coexist? 

BTW, why can't you select AutoGenerateColumns in the designer?  Seems to be missing.

1 Answer, 1 is accepted

Sort by
0
Martin Vasilev
Telerik team
answered on 23 Jan 2009, 06:45 PM
Hello Jim,

Thank you for writing.

We do not have a known issue that anyhow changes the grouping behavior when columns are not auto-generated. I have tried a simple scenario like the described one and the grouping is working. You can find an example project as an attachment to this message.

Nevertheless, there could be something specific in your application that causes the issue. If you still experience it, please send me more details on your project or it will be better if you send me an example that demonstrates undesired behavior.

Concerning AutoGenerateColumns, it is only available at runtime because as soon as you choose DataSource in design-time the columns have been generated and technically, it is difficult to maintain AutoGenerateColumns property's functionality in the PropertyBuilder.

Do not hesitate to contact me again if you have other questions.

Best wishes,
Martin Vasilev
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
GridView
Asked by
Jim
Top achievements
Rank 1
Answers by
Martin Vasilev
Telerik team
Share this question
or