PDA

View Full Version : GWT Ext 2.1.0 Grid setEnabled now masking



Matt Kleweno
25 Nov 2009, 10:16 AM
When you call the setEnabled() for a Grid, it appears it the method also calls mask() or unmask(). This is a change in the new release.

What about when you just wanted to disable the grid from any editing but still allow for scrolling/column changes? Is there a function to allow for that?

This was useful on the EditorGrid when you wanted to display a read-only version of the data. Now, you can't scroll through all the data because the mask() does not allow it.

sven
25 Nov 2009, 10:18 AM
Yes it was needed so you cannot reach any content of it, no headers, and no footer (as they can contain widget that needs to be disabled too.

This is not a bug, so i move it out of this forum. Also please read the bug forum guidelines before posting in that forum.

When you want to disable editing, this is also the wrong approach. You need to add a beforeedit event listener, that you can cancel.

Matt Kleweno
25 Nov 2009, 10:26 AM
Ok. Sorry about the wrong forum.

The beforeEdit Listener would work except I want the grid to look like it is disabled as well. I will just manually add/remove the old styles so it works as it did in the previous versions.

Thanks for the quick response.




grid.addStyleName("x-unselectable");
grid.addStyleName("x-item-disabled");