Skip to main content

How to: Create Columns in Code

The example below demonstrates how to create and add a filter column in code:

private void CreateSpinEditColumn(ASPxFilterControl filterControl, string propertyName, 
    string displayName) {
    FilterControlSpinEditColumn filterColumn = new FilterControlSpinEditColumn();
    filterColumn.PropertyName = propertyName;
    filterColumn.DisplayName = displayName;
    filterControl.Columns.Add(filterColumn);
}