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
10240
determining a read-only field in js
posted
How can I check to see if a field of the WebDataGrid is read-only field?
  • 10240
    posted
    One way to do this is the handle the WDG ActiveCellChanged client-side event. This js function is an example of how you can check to see if a field of the grid is set as Read-Only:


    var colkey = eventArgs.getActiveCell().get_column().get_key();


     


     


    var i sender.get_behaviors().get_editingCore().get_behaviors().get_cellEditing().get_columnSettings()._items.length;


                debugger;


     


                for (var k = 0; k


               


                    if (sender.get_behaviors().get_editingCore().get_behaviors().get_cellEditing().get_columnSettings()._items[k]._readOnly == true) {


                        if (sender.get_behaviors().get_editingCore().get_behaviors().get_cellEditing().get_columnSettings()._items[k]._address == colkey) {


                            alert(eventArgs.getActiveCell().get_column().get_key());


                        }


     


                    }


                }

    Let me know if you need any additional assistance regarding this matter.