-
4 Feb 2011 7:22 AM #1
Checkbox TreeGrid
Checkbox TreeGrid
If you have a need to use a checkbox TreeGrid that works similarly as the TreePanel, and can't wait for the GXT v3.0, you may want to consider the attached custom TreeGrid. I am not aware of any issues with it at this time. You would use the CheckboxTreeGrid as you normally would with a TreeGrid, with the following difference configuration for the first column that contains the check boxes.
Thanks,Code:ColumnConfig name = new ColumnConfig("name", "Name", 300); name.setRenderer(new CheckboxTreeGridCellRenderer<ModelData>(true));
Phil
-
15 Feb 2011 7:43 AM #2
No checkboxes shown
No checkboxes shown
Hey,
I used your CheckBoxTreeGrid and it compiles and runs without errors.
The problem is that it doesn't show any checkboxes...
I do :
ColumnConfig name = new ColumnConfig("name", "Name", 100);
name.setRenderer(new CheckboxTreeGridCellRenderer<ModelData>());
ColumnModel cm = new ColumnModel(columns);
CheckboxTreeGrid<ModelData> tree = new CheckboxTreeGrid<ModelData>(store, cm);
Do i have to do anything else to show the checkboxes? Like in TreePanel we do .setCheckable(true) or something..
-
15 Feb 2011 10:26 AM #3
Yes, you need to pass "true" to the renderer constructor:
name.setRenderer(new CheckboxTreeGridCellRenderer<ModelData>(true));
Phil
-
15 Feb 2011 11:42 AM #4
Works now :)
Works now :)
Thanks alot, that was the problem.
You know if is it possible to add a checkbox to the grid's columns to select all the elements?
-
15 Feb 2011 1:32 PM #5
Right now the checkbox tree grid follows the same cascade behaviors in a TreePanel, i.e. if you check a root node, all child nodes will be checked. So you may consider this feature as you build your tree store. Other than that, I don't know if what you are looking to do is possible or if it should be done that way. Good luck.
Phil
-
18 Oct 2011 11:04 PM #6
widgets
widgets
Great work with the Checkboxes! Is there a way to set any other column renderer to return Widget?
greetz
-
26 Oct 2011 11:15 PM #7
setting checkbox initially checked
setting checkbox initially checked
I've dealt with widget issue, but now I've encountered another problem.
How can I set some of the checkboxes initially checked? Is it store-dependent or should I check them manually after render?
-
27 Oct 2011 5:45 AM #8
Hi Denu, I think you probably need to set them after they are rendered. This custom treegrid was quickly put together when GXT 3.0 was not available, so the features/issues like those you reported were not thought through. Now you may want to consider 3.0 instead.
Best regards,
Phil
-
27 Oct 2011 11:12 PM #9
I'm using your CheckboxTreeGrid because our development team don't want to use unstable version of GXT 3.0.
I've dealt with custom widgets in grid (by cloning GridCellRenderer changed to work with CheckboxTreeGrid) as well as setting initial checked checkboxes - with
For anyone else having the same issues:PHP Code:be.getTreeGrid().expandAll();
be.getTreeGrid().setCheckedSelection(checkedItems);
be.getTreeGrid().collapseAll();
It must have been done in Events.ViewReady event, because nodes in root weren't rendered before. Then expandAll() was used to render all tree children (lazy init can be sometimes a "pain in the class").
thanks for your time & reply!
greetz
denu
-
2 Jan 2012 2:59 PM #10
three state checkboxes
three state checkboxes
Hi again

Could you give me some tip with creating a three state checkboxes within this extension?
Similar Threads
-
treegrid checkbox extension
By yd290276 in forum Ext 3.x: User Extensions and PluginsReplies: 7Last Post: 13 Jan 2012, 12:22 PM -
TreeGrid with checkbox functionality
By dhphuoc in forum Ext GWT: DiscussionReplies: 3Last Post: 7 Sep 2011, 7:53 AM -
How to Add checkbox into TreeGrid?
By tomasi in forum Ext GWT: DiscussionReplies: 9Last Post: 7 Jun 2010, 6:25 AM -
Rendering checkbox in treegrid
By jazzer in forum Ext GWT: DiscussionReplies: 1Last Post: 5 Apr 2010, 7:13 AM


Reply With Quote