Hybrid View
-
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
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