The above works when the grid is not a dynamic so the above code is
not suitable for the
events that make changes to the grid. In line with searching for the
answer on how to check all the checkboxes, I tried to
implement the select/check all to the checkboxes in the example
http://www.gwt-ext.com/demo/#checkboxSelectionGrid using the code
below:

//
=====================================================================
Button button2 = new Button("Test Events", new ButtonListenerAdapter()
{
            public void onClick(Button button, EventObject e) {
                 grid.getSelectionModel().selectAll();
                 panel.doLayout(); //the panel is where the grid is
attached
          }
        });

//
=====================================================================
This code works!But when I applied this code to my project that deals
with RPC(Remote Procedure Call), this strategy
doesn't work. I am really puzzled with this.Below is my code:

         public void onCheckChange(TreeNode node, boolean checked) {//this is
the event listener triggerred upon checking the tree's node

                               ...

                                 //method that fills the store  --> to
be used by the grid for the product items
                                 //corresponding to category as node
                                 //grid is the grid for product
items
                                 fillGrid(Integer.valueOf
(node.getAttribute("id")).intValue(),grid.getStore());

                            grid.getSelectionModel().selectAll(); // Selecting 
all the
values
                            grid.doLayout();
                            centerPanel.doLayout();// This contains grid
                            middlePanel.doLayout();  // This contains 
centerPanel
                              System.out.println("\n -->>After
doLayout" );
                              ...

           }//end onCheckChange

The string " -->>After doLayout" showed in the console but the grid
rows were not all selected. No rows were selected indeed.
Please help. I am stucked here. Your ideas are welcome. Thanks!
-- 
You received this message because you are subscribed to the Google Groups 
"GWT-Ext Developer Forum" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/gwt-ext?hl=en.


Reply via email to