4 Answers, 1 is accepted
0
Hello ahmad,
Pleae, review the following online example on using column editors: Grid/Using column editors, and if it is not relevant to your implementation, could you provide more details on your scenario.
Thank you.
Best Regards,
Tsvetoslav
the Telerik team
Check out Telerik Trainer , the state of the art learning tool for Telerik products.
Pleae, review the following online example on using column editors: Grid/Using column editors, and if it is not relevant to your implementation, could you provide more details on your scenario.
Thank you.
Best Regards,
Tsvetoslav
the Telerik team
Check out Telerik Trainer , the state of the art learning tool for Telerik products.
0
ahmad
Top achievements
Rank 1
answered on 31 Mar 2009, 12:35 PM
Hello Telerik,
Can i write this:
Can i write this:
protected void RadGrid1_CreateColumnEditor(object sender, Telerik.Web.UI.GridCreateColumnEditorEventArgs e)
{
if ( e.Column is GridBoundColumn )
{
if ( (e.Column as GridBoundColumn).DataField == "Country" )
{
e.ColumnEditor = new GridDropDownListColumnEditor();
}
}
}
That is i replace MultiLineTextBoxColumnEditor by GridDropDownListColumnEditor.
It gave me error.
Regards,
Ahmad
{
if ( e.Column is GridBoundColumn )
{
if ( (e.Column as GridBoundColumn).DataField == "Country" )
{
e.ColumnEditor = new GridDropDownListColumnEditor();
}
}
}
That is i replace MultiLineTextBoxColumnEditor by GridDropDownListColumnEditor.
It gave me error.
Regards,
Ahmad
0
Princy
Top achievements
Rank 2
answered on 01 Apr 2009, 06:18 AM
Hello Ahmad,
Generally a GridBoundColumn would accept only editors of the type GridTextColumnEditor. So if you require to display a DropDownList for a specific column when its in EditMode, then i would suggest you to either use a GridTemplateColumn with a Label in its ItemTemplate and a DropDownList in its EditItemTemplate or use a GridDropDownColumn which automatically displays data as in GridBoundColumn when in normal mode and displays a dropdownlist when in edit mode. You can also refer to the following document to understand better the diffferent types of columns:
Column types
Thanks
Princy.
Generally a GridBoundColumn would accept only editors of the type GridTextColumnEditor. So if you require to display a DropDownList for a specific column when its in EditMode, then i would suggest you to either use a GridTemplateColumn with a Label in its ItemTemplate and a DropDownList in its EditItemTemplate or use a GridDropDownColumn which automatically displays data as in GridBoundColumn when in normal mode and displays a dropdownlist when in edit mode. You can also refer to the following document to understand better the diffferent types of columns:
Column types
Thanks
Princy.
0
ahmad
Top achievements
Rank 1
answered on 01 Apr 2009, 03:51 PM
Thank You.