Hi!
I'm trying to do something.
I need to have different inline editor base on the type of edition...
It can be an insert or an edit.
I want to be able to have different ColumnEditor defined in the event CreateColumnEditor of the RadGrid depending on if it's edit mode or insert mode.
The event gives object but I have no clue if it is an insert or an edit.
Is there a way to identify if the event was fired for an insert or an edit?
Thanks!
I'm trying to do something.
I need to have different inline editor base on the type of edition...
It can be an insert or an edit.
I want to be able to have different ColumnEditor defined in the event CreateColumnEditor of the RadGrid depending on if it's edit mode or insert mode.
The event gives object but I have no clue if it is an insert or an edit.
Is there a way to identify if the event was fired for an insert or an edit?
Thanks!
protected void RadGrid_OnCreateColumnEditor(object sender, Telerik.Web.UI.GridCreateColumnEditorEventArgs e) { if (e.Column is GridBoundColumn) { if ((e.Column as GridBoundColumn).DataField == "UserValue") { e.ColumnEditor = new NumericColumnEditor("UserValue"); } else if ((e.Column as GridBoundColumn).DataField == "UserId") { e.ColumnEditor = new LabelColumnEditor("UserId"); } else if ((e.Column as GridBoundColumn).DataField == "UserName") { e.ColumnEditor = new LabelColumnEditor("UserName"); } } } 