Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
265
WebEditor in Grid defaulting to original value
posted

Hi all, i have succesfully added a webdatetimeeditor to a column on my grid, however when i click out to change the value of the cell, the value is restored to the previous value client side, how to i stop this happpening?

Parents
  • 24497
    posted

    Hi,

    Maybe configuration of grid column is not correct. To use WebDateTimeEdit, the column should have settings for following properties: Type, EditorControlID and optional DataType (in case if column in DataTable.Columns was not created with that type). The column.Format should not be used, because format will be defined by WebDateTimeEditor.

    //DataTable dt = new DataTable("Customer");
    //dt.Columns.Add("DateColumn", typeof(DateTime));
    //
    this.UltraWebGrid1.DataSource = dt;

    this.UltraWebGrid1.Columns[0].EditorControlID = this.WebDateTimeEdit1.UniqueID;
    this.UltraWebGrid1.Columns[0].Type = Infragistics.WebUI.UltraWebGrid.ColumnType.Custom;
    //
    this.UltraWebGrid1.Columns[0].DataType = "System.DateTime";

Reply Children