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

How to change celltype on AutoGenerated columns

2 Answers 65 Views
GridView
This is a migrated thread and some comments may be shown as answers.
David Brenchley
Top achievements
Rank 1
David Brenchley asked on 04 Nov 2010, 10:57 PM
How do I change the celltype/celledittype on autogenerated columns?
I've done the following but it doesn't work.  It assigned the template, but doesn't seem to display the template.

private void fullyLoadedCostListRadGridView_AutoGeneratingColumn(object sender, GridViewAutoGeneratingColumnEventArgs e) {
    e.Column.CellTemplate = (DataTemplate)FindResource("telerikContentColumnTemplate");
}

2 Answers, 1 is accepted

Sort by
0
Vlad
Telerik team
answered on 05 Nov 2010, 08:04 AM
Hi,

 Actually this is the right way yo achieve this (and CellEditTemplate for editing). Can you verify using the debugger if this code is executed? Can you post more info about your grid declaration/creation and how the grid is bound?

Sincerely yours,
Vlad
the Telerik team
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 Public Issue Tracking system and vote to affect the priority of the items
0
David Brenchley
Top achievements
Rank 1
answered on 05 Nov 2010, 03:41 PM
Yes the debugger shows this code executing and I can see the template attached after it is executed. 
I have now gone a different route and am not using a datagrid for this anymore so it is no longer an issue. 
Tags
GridView
Asked by
David Brenchley
Top achievements
Rank 1
Answers by
Vlad
Telerik team
David Brenchley
Top achievements
Rank 1
Share this question
or