jQuery UI Widgets Forums Grid Disable Column Edit

This topic contains 1 reply, has 2 voices, and was last updated by  Dimitar 8 years, 2 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • Disable Column Edit #85613

    jkapasi
    Participant

    Hello,

    I am trying to disable editing of a particular column based on some condition.

    But somehow I am not able to figure out how to implement it.

    Thank You.

    Regards,
    Jash Kapasi

    Disable Column Edit #85632

    Dimitar
    Participant

    Hello Jash Kapasi,

    You can use the callback function cellbeginedit to achieve this. In its implementation, if the condition is met, return false and cells in the column will not be editable. This functionality is showcased in the demo Disable Editing of Rows.

    If you wish to determine whether the column is editable or not at initialization, please set its editable property instead, e.g.:

    var firstNameEditable = false;
    // ...
    columns: [{
                text: 'First Name',
                columntype: 'textbox',
                datafield: 'firstname',
                width: 80,
                editable: firstNameEditable
            },
            // ...

    Best Regards,
    Dimitar

    jQWidgets team
    http://www.jqwidgets.com/

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.