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

Autogenerated Columns

1 Answer 83 Views
GridView
This is a migrated thread and some comments may be shown as answers.
rayala25
Top achievements
Rank 1
rayala25 asked on 09 Nov 2008, 04:47 AM
Hi, I'm new on RadGridView , i need to have the grid in design view with the columns generated, and from code fill the grid, it's OK but at runtime it creates twice each column, i'm looking for MasterGridViewTemplate.Autogenetarecolumns in properties window to set it to false but i can't find it,  where shoud it be?  or is there other way to prevent duplicating the columns?

I'm using Q2 2008 for winforms.


UPDATE::

RESOLVED:
I was looking in the wrong place (design view)  i used in code "GridView1.MasterGridViewTemplate.AutoGenerateColumns = False" , that resolved this issue,  many thanks!!!

Roberto.

 

1 Answer, 1 is accepted

Sort by
0
Nikolay
Telerik team
answered on 12 Nov 2008, 04:47 PM
Hello rayala25,

Thank you for your interest in our products.

You are correct. When having columns generated at design-time and setting the DataSource runtime, you should set also:
this.radGridView1.MasterGridViewTemplate.AutoGenerateColumns = false

Otherwise, you will have two sets of the columns - the first one generated by you at design-time, and the second one generated by RadGridView when DataSource its set.

If you have additional questions, feel free to contact me.

All the best,
Nikolay
the Telerik team

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