1. #1
    Ext GWT Premium Member
    Join Date
    Dec 2010
    Location
    Washington, D.C.
    Posts
    6
    Vote Rating
    0
    dhphuoc is on a distinguished road

      0  

    Default 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.

    Code:
    ColumnConfig name = new ColumnConfig("name", "Name", 300);
    name.setRenderer(new CheckboxTreeGridCellRenderer<ModelData>(true));
    Thanks,
    Phil
    Attached Files

  2. #2
    Sencha User
    Join Date
    Jan 2011
    Posts
    23
    Vote Rating
    0
    jonas sabu is on a distinguished road

      0  

    Default 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..

  3. #3
    Ext GWT Premium Member
    Join Date
    Dec 2010
    Location
    Washington, D.C.
    Posts
    6
    Vote Rating
    0
    dhphuoc is on a distinguished road

      0  

    Default


    Yes, you need to pass "true" to the renderer constructor:
    name.setRenderer(new CheckboxTreeGridCellRenderer<ModelData>(true));

    Phil

  4. #4
    Sencha User
    Join Date
    Jan 2011
    Posts
    23
    Vote Rating
    0
    jonas sabu is on a distinguished road

      0  

    Default 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?

  5. #5
    Ext GWT Premium Member
    Join Date
    Dec 2010
    Location
    Washington, D.C.
    Posts
    6
    Vote Rating
    0
    dhphuoc is on a distinguished road

      0  

    Default


    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

  6. #6
    Sencha User
    Join Date
    Mar 2011
    Posts
    22
    Vote Rating
    0
    denu is on a distinguished road

      0  

    Default widgets

    widgets


    Great work with the Checkboxes! Is there a way to set any other column renderer to return Widget?

    greetz

  7. #7
    Sencha User
    Join Date
    Mar 2011
    Posts
    22
    Vote Rating
    0
    denu is on a distinguished road

      0  

    Question 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?

  8. #8
    Ext GWT Premium Member
    Join Date
    Dec 2010
    Location
    Washington, D.C.
    Posts
    6
    Vote Rating
    0
    dhphuoc is on a distinguished road

      0  

    Default


    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

  9. #9
    Sencha User
    Join Date
    Mar 2011
    Posts
    22
    Vote Rating
    0
    denu is on a distinguished road

      0  

    Default


    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
    PHP Code:
    be.getTreeGrid().expandAll();
    be.getTreeGrid().setCheckedSelection(checkedItems);
    be.getTreeGrid().collapseAll(); 
    For anyone else having the same issues:
    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

  10. #10
    Sencha User
    Join Date
    Mar 2011
    Posts
    22
    Vote Rating
    0
    denu is on a distinguished road

      0  

    Default 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

  1. treegrid checkbox extension
    By yd290276 in forum Ext 3.x: User Extensions and Plugins
    Replies: 7
    Last Post: 13 Jan 2012, 12:22 PM
  2. TreeGrid with checkbox functionality
    By dhphuoc in forum Ext GWT: Discussion
    Replies: 3
    Last Post: 7 Sep 2011, 7:53 AM
  3. How to Add checkbox into TreeGrid?
    By tomasi in forum Ext GWT: Discussion
    Replies: 9
    Last Post: 7 Jun 2010, 6:25 AM
  4. Rendering checkbox in treegrid
    By jazzer in forum Ext GWT: Discussion
    Replies: 1
    Last Post: 5 Apr 2010, 7:13 AM

Thread Participants: 4

Tags for this Thread

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi