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

Automatic Column Generation and Attribute

1 Answer 106 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Marco
Top achievements
Rank 2
Veteran
Marco asked on 24 Nov 2015, 11:07 AM

Hello Telerik,

I'm used to disable the automatic column generation in GridView because most of time it's just generate something you really don't want to deliver to your Customer.

But today, I have decided to take a little extra time, to understant how this automatic column generation works and found something in the documentation about preventing the generation of a column for specific property.

http://www.telerik.com/help/winforms/gridview-columns-generating-columns.html

That's a really nice and cool feature. But when I build a GridView most of time as developer we need more "options" to configure our grid. Do you have some more advanced resources about managing Automatic Column Generation with Properties Attribute ? I needed to configure for a given property the type of column used (could be an homemade custom column), the headertext of the column.

Of course if there is something generic about changing any properties of the column generated, it will be great ! 

1 Answer, 1 is accepted

Sort by
0
Dess | Tech Support Engineer, Principal
Telerik team
answered on 26 Nov 2015, 09:32 AM
Hello Marco,

Thank you for writing.

Auto-generation of columns means that when you set the DataSource property of the RadGridView control to a collection of for example, a separate column will be created for each one of the public properties of your Employee object. Setting the AutoGenerateColumns property to false allows the developer to add manually unbound or bound columns from the data source. In this case, columns are added by using the Columns collection of a template. Thus, you can control what column that will be created for the specific property and adjust its properties according to your requirement. Please refer to the GridView >> Columns section in the online documentation.

I hope this information helps. Should you have further questions I would be glad to help.
 
Regards,
Dess
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
GridView
Asked by
Marco
Top achievements
Rank 2
Veteran
Answers by
Dess | Tech Support Engineer, Principal
Telerik team
Share this question
or