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

How do I change the type of an auto-generated column after generation?

2 Answers 82 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Roxane
Top achievements
Rank 1
Roxane asked on 18 May 2015, 02:00 PM

Hello Telerik-Team,

we would like to use our own columntypes in a RadGrid in order to make the filter control a combobox.

We have the following code in the ColumnCreated-Event:

if (boundColumn.UniqueName.Equals("CaseStage"))
 
{
    grid.MasterTableView.Columns.Remove(boundColumn);
 
    CustomFilteringColumn cfBoundColumn = new CustomFilteringColumn();
    grid.MasterTableView.Columns.Add(cfBoundColumn);
     
    cfBoundColumn.DataField = "CaseStage";
    cfBoundColumn.HeaderText = "CaseStage";
}

 

When we then try to filter the Grid using one of the other filter fields we get the following error message:

Uncaught Sys.WebForms.PageRequestManagerServerErrorException: Sys.WebForms.PageRequestManagerServerErrorException: Cannot create column with the specified type name: CustomFilteringColumn

 

Can you help us interpret the error message or perhaps suggest an alternative way to make the filtercontrol a combobox when using auto-generated columns?

 

Thank you in advance!

Roxane

 

2 Answers, 1 is accepted

Sort by
0
Eyup
Telerik team
answered on 21 May 2015, 10:38 AM
Hi Roxane,

I am sending a sample RadGrid web site to demonstrate how you can achieve this requirement. Please run the attached application and let me know if it helps you.

Regards,
Eyup
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
0
Roxane
Top achievements
Rank 1
answered on 22 May 2015, 06:09 AM

Thank  you, that works perfectly!

 

Tags
Grid
Asked by
Roxane
Top achievements
Rank 1
Answers by
Eyup
Telerik team
Roxane
Top achievements
Rank 1
Share this question
or