Automatic Column Generation and Attribute

2 posts, 0 answers
  1. Marco
    Marco avatar
    87 posts
    Member since:
    Apr 2011

    Posted 24 Nov 2015 Link to this post

    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 ! 

  2. Dess
    Admin
    Dess avatar
    1607 posts

    Posted 26 Nov 2015 Link to this post

    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 employees 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
  3. UI for WinForms is Visual Studio 2017 Ready
Back to Top