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

runtime columns auto-generation

1 Answer 101 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Nikodem
Top achievements
Rank 1
Nikodem asked on 11 May 2009, 10:39 AM

Hi, could you help me with RadGridView

I'm binding it to BindingSource object, selecting couple of columns in Grid's designer,

but when a start my aplication, and i'm setting my bindingSource DataSource property,

it generate lots of columns that I'm not interessted.

I set AutoGenerateHierarchy = false

Thanks in advance,

Nikodem Rafalski

1 Answer, 1 is accepted

Sort by
0
Nikolay
Telerik team
answered on 13 May 2009, 12:53 PM
Hello Nikodem,

Thank you for the question.

When you are setting the DataSource of your BindingSource or when you are setting the DataSource of RadGridView, you need to set this.radGridView1.MasterGridViewTemplate.AutoGenerateColumns = false. With this setting RadGridView will not create all the columns from the DataSource automatically, so you will get only the columns set at design-time.
 
I am attaching a sample project to demonstrate this behavior. If you have additional questions, feel free to contact me.

All the best,
Nikolay
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
GridView
Asked by
Nikodem
Top achievements
Rank 1
Answers by
Nikolay
Telerik team
Share this question
or