solved 1st problem. used GridPanel.getView().refresh(true) inside
onColumnResize. (after secondTable.getColumnModel().setColumnWidth
(colIndex, newSize); )

second problem still not solved. (columns not autoexpanding after
loading,  needs to resize a column first before it expands)

On Jan 5, 7:45 pm, mives29 <[email protected]> wrote:
> I tried firstTable.getView().refresh(true) after loading the store,
> but still, no effect. (for the second problem posted)
>
> On Jan 5, 5:17 pm, mives29 <[email protected]> wrote:
>
> > Also, another problem regarding my grid panels. You can see above that
> > I have setAutoExpandColumn("columnId") right there. All of the columns
> > have columnId as their ID. This other problem is, after loading of the
> > page, the columns are not yet auto-expanded. They will only auto-
> > expand [b]once[/b] youresizeacolumn(whatevercolumn).
>
> > Why is this so? Any ideas? Thanks.
>
> > On Jan 5, 3:44 pm, mives29 <[email protected]> wrote:
>
> > > Hi all. Here's my problem. I have two gridpanels (inside one class),
> > > sharing the samecolumnmodel. What I want is when Iresizeacolumn
> > > on the first grid panel, the second one's samecolumnwill alsoresize
> > > depending on theresizevalues of the first grid panel. This is
> > > implemented using
>
> > > private ColumnListener columnListener = new ColumnListener() {
> > >     public void onColumnResize(BaseTableWidget table, int colIndex,
> > > int newSize) {
> > >                         if(table==firstTable) {
> > >                                 
> > > secondTable.getColumnModel().setColumnWidth(colIndex, newSize);
> > >                         }
> > >     }
> > > .....//other methods here
>
> > > };
>
> > > However, there's a small bug with it. When Iresizeacolumntoo wide,
> > > the 2nd grid panel will be misaligned with the first grid panel. I
> > > need them to sort of "sync", so they must be perfectly aligned after I
> > >resizeacolumnon the first grid panel. If it would help, here are
> > > the configurations I made on the grid panels:
>
> > > //this method is called somewhere on the creation of the two
> > > gridpanels.
> > > public void applyTo(GridPanel grid) {
> > >                 grid.setWidth(1275);
> > >                 grid.setHeight(250);
>
> > >                 try {
> > >                         grid.getView().setAutoFill(true);
> > >                         grid.getView().setForceFit(true);
> > >                         grid.getView().setScrollOffset(19);
> > >                         grid.setAutoExpandColumn("columnId");
> > >                 } catch (Exception e) {
> > >                         GWT.log(e.toString(), e);
> > >                 }
>
> > >                 grid.setAutoScroll(true);
> > >                 grid.setAutoHeight(false);
> > >                 grid.setAutoWidth(false);
> > >                 grid.setBorder(false);
> > >                 grid.setEnableColumnHide(true);
> > >                 grid.setEnableColumnMove(false);
> > >                 grid.setEnableColumnResize(true);
> > >                 grid.setEnableHdMenu(false);
> > >                 grid.setEnableDragDrop(false);
> > >                 grid.setStripeRows(true);
> > >                 grid.setTrackMouseOver(false);
> > >                 grid.setHideColumnHeader(false);
>
> > > }
>
> > > Thanks in advance
--~--~---------~--~----~------------~-------~--~----~
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