We are programmatically creating the grid in the code base.
We have added a DateTime column in the Grid by the following way
When we click on Edit button on the row of the Grid.
I am trying to fetch the GridDateTimeColumnEditor by the following line of code
We have added a DateTime column in the Grid by the following way
public GridDateTimeColumn AddGridDateTimeColumn(string columnHeader,string columnDataField,string uniqueName,string formatString,double percentWidth,bool readOnly,bool visible) { GridDateTimeColumn dateTimeColumn = new GridDateTimeColumn { HeaderText = columnHeader, DataField = columnDataField, UniqueName = uniqueName, ReadOnly = readOnly, Visible = visible, DataFormatString = formatString, PickerType = GridDateTimeColumnPickerType.DatePicker, DataType = typeof(DateTime) }; dateTimeColumn.ItemStyle.Width = Unit.Percentage(percentWidth); TelerikGrid.MasterTableView.Columns.Add(dateTimeColumn); return dateTimeColumn; }
When we click on Edit button on the row of the Grid.
I am trying to fetch the GridDateTimeColumnEditor by the following line of code
GridEditableItem editedItem = e.Item as GridEditableItem; GridEditManager editMan = editedItem.EditManager;if (!(e.Item is GridEditFormInsertItem)){GridDateTimeColumnEditor dateTimeEditor = editMan.GetColumnEditor("StatementEndDateUniqueName") as GridDateTimeColumnEditor;} The GetColumnEditor method throws error Uncaught Sys.WebForms.PageRequestManagerServerErrorException: Sys.WebForms.PageRequestManagerServerErrorException: Editor cannot be initialized for column: StatementEndDateUniqueName The StatementEndDateUniqueName is valid. I am able to view the data , but while in Edit Mode, I get the error. Can someone help me with this? Thanks, Sunil Dixit