PDA

View Full Version : Disable rows in PropertyGrid



Urkman
3 Jan 2010, 5:51 AM
Hello,

is it possible to disable a row ( display it readonly )?

Thanks and greetings,
Urkman

3 Jan 2010, 6:36 AM
i remember hooking a 'before edit' event handler to get the job done a while back.

Urkman
3 Jan 2010, 8:04 AM
Thanks for your answer. I handle "beforepropertychange" to get it done...

Urkman

Righi
13 May 2010, 11:54 AM
A very easy way to do this is:


beforeedit: function(e) {
if(e.record.id == 'Field_Name') {
e.cancel = true;
}

devtig
13 Aug 2010, 4:28 AM
beforeedit event works well. Could this be added to the docs? beforeedit allows for cancelling before starting to type, making properties readonly.

beforepropertychange fires later when your already editting. When you return false in that one, the editing is cancelled.