Allow editing of only certain columns

Posted by: munjal on 8 September 2017, 9:18 am EST

  • Posted 8 September 2017, 9:18 am EST

    Hello,

    I added `allowEdition: true` to the layout engine config and it works fine.
    But, I only want users to change values of certain columns.
    How can I disable editing for rest of the grid and enable it only for certain columns?

    const engine = new GC.Spread.Views.DataView.Plugins.GridLayoutEngine({allowGrouping: true, grouping, allowSorting: true, allowEditing: true});
  • Marked as Answer

    Replied 8 September 2017, 9:18 am EST

    Hi,

    You can apply allowEditing: false to the column definition for those columns you don't want to allow editing by the user, as in this demo for Editor Mode. Note that the "Id" column is not editable in the demo:
    var columns = [{
    id: 'id',
    caption: 'Id',
    dataField: 'id',
    width: 80,
    allowEditing: false
    ...

    Regards,
    -Sean
Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels