PDA

View Full Version : Configure roweditor on treegrid depending on the line



Nico33
17 Dec 2009, 2:59 AM
Hi all,

Take this sample : http://www.extjs.com/examples/explorer.html#roweditortreegrid

Is this possible to allow cell editing depending on the selected line ?
For example, I would like to allow full edit of music lines and block editing of direct folder parent.

I know I can set roweditor plugin on the treegrid and allow collums to be edited or not, but it's for the entire collumn, not depending on the line type.

How can this be achieved ?

Thanks in advance for any help

sven
17 Dec 2009, 3:04 AM
The roweditor has a BeforeEdit event which is cancelable. Just listen to that and cacnel the event if you dont want to allow editing.

I suggest to use the forum search next time.

Nico33
17 Dec 2009, 4:27 AM
sorry, I didn't really knew what to look for.

Thanks for your help

Nico33
21 Dec 2009, 2:28 AM
Finally, to solve my problem I add a listener for BeforeEdit event, and in the event, I test the selecteditem, and I set a LabelField to the editor of the collumn I want to disable editing.

This is working, but maybe not the best way.