Prevent Column Auto-Generation
As you know, if AutoGenerateColumns="True" (which is by default), RadGridView creates a column for each property of the underlying business object. This article shows how to not auto generate a column for a specific property.
There are two ways to accomplish this:
- Using DataAnnotations.
Apllying this approach you need to add a reference to the System.ComponentModel.DataAnnotations assembly and mark your property with [Display(AutoGenerateField = false)] attribute.
Example 1: Using DataAnnotations.
Now, RadGridView will not generate a column for the Players property.
- Canceling AutoGeneratingColumn event for a particular column.