Title: Readonly row in propertygrid Post by: esteen on June 11, 2012, 12:39:17 PM I would like to use the propertygrid component. However, not all the properties I want to display are mutable. How can I specify that a certain property is readonly.
I have tried to configure an empty editor, but this gives a javascript error: Error: $(this).datagrid("getEditors", _57b)[0] is undefined Source File: https://localhost:8443/IntakeBE/include/scripts/jquery-easyui/jquery.easyui.min.js Line: 7680 Title: Re: Readonly row in propertygrid Post by: stworthy on June 12, 2012, 12:48:43 AM Disable a row editing is not allowed in current version. This issue will be solved in next release version. The simple way to solve this issue is to define an 'empty' editor that do nothing when clicking a row. Assigning the row editor type to 'empty' type will prevent the row from editing. The 'empty' editor is defined as:
Code: $.fn.datagrid.defaults.editors.empty = { Title: Re: Readonly row in propertygrid Post by: esteen on June 12, 2012, 11:33:20 AM Thanks, this solves our problem. When you implement this for the next version, it would be nice to have the possibility for a different styling for a read-only property (greyed out or italic..)
Title: Re: Readonly row in propertygrid Post by: JeroenNL on May 03, 2014, 12:22:15 AM Is disabling a row possible in the current version? I couldn't figure out how.
If not, where do I put that code which defines an 'empty' editor? I shouldn't put it in the jquery.easyui.min.js file, should I? Finally, if I just want to disable the entire propertygrid (just use it to show some values, but not allow the user to alter them), what would be the best way to accomplish that? |