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
1280
How to set AllowEditing for GridRecordItem
posted

Hi,

Iam using Infragistics 13.1.

GridRecordItem must be used instead of UltraGridCell in 13.1.

Please let me know how to set AllowEditing for GridRecordItem.

Earlier code - UltraGridCell cellRename = e.Row.Cells.FromKey(sRename);

                  cellRename.AllowEditing = AllowEditing.Yes;

Expecting your response asap. Its urgent.

Thanks in advance.

Parents
No Data
Reply
  • 16310
    Suggested Answer
    Offline posted

    Hello,

    1) If there is editing behavior set on the grid then you can access the column settings of the editing behavior and change it as follows:

    WebDataGrid1.Behaviors.EditingCore.Behaviors.CellEditing.ColumnSettings["Number"].ReadOnly = false;

    2) If editing on the grid has not been configured you can add it programmatically as follows:

    this.WebDataGrid1.Behaviors.CreateBehavior();
    this.WebDataGrid1.Behaviors.EditingCore.Behaviors.CreateBehavior();

    // and then add different settings for each column of the grid

    EditingColumnSetting settingColumn1 = new EditingColumnSetting();
    settingColumn1.ColumnKey = "Number";
    settingColumn1.ReadOnly = false;

    EditingColumnSetting settingColumn2 = new EditingColumnSetting();
    settingColumn2.ColumnKey = "Date";
    settingColumn2.ReadOnly = true;

    this.WebDataGrid1.Behaviors.EditingCore.Behaviors.CellEditing.ColumnSettings.Add(settingColumn1);
    this.WebDataGrid1.Behaviors.EditingCore.Behaviors.CellEditing.ColumnSettings.Add(settingColumn2);

    Please refer for more details to http://help.infragistics.com/Help/Doc/ASPNET/2013.1/CLR4.0/html/WebDataGrid_Setting_Column_Settings_for_a_Behavior.html

    I hope this helps. If you have further questions on the issue, please let me know, I will be glad to help.

Children