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
1010
Set specific cells to be editable in a readonly grid
posted

I have set all columns in the grid to be readonly. 

But, I need few columns in first row to be editable. How can I accomplish this please.

Thanks

Parents
No Data
Reply
  • 17590
    Offline posted

    Hello C R,

    In order to make only a few columns in the first row editable the editCellStarting event, which is cancellable can be handled. You could check from which cell updating is coming from and if this cell is not amongst the cells that should be editable this event is cancelled, which will make them readOnly. For example:

    {
         name: "Updating",
         editCellStarting: function(evt, ui){
           var rowId = ui.rowID;
           //here you could also add a condition about which column keys to be editable
           if(rowId !==1){
          return false;
            }
         }
    }

    I am also attaching a small sample illustrating my suggestion for your reference.

    Please let me know if you need any further assistance with this matter.

    igGridEditing.zip
Children
No Data