I have a dgrid within a BorderContainer with "liveSplitters" enabled (using Dojo 1.8). The dgrid comes up nicely, but when I move the splitter between the left column and the "leading" column (that the dgrid is within), the dgrid does not properly resize. However, if I resize the window a tad, then the dgrid snaps back into a proper size (i.e. filling 100% of the "leading" pane of the BorderContainer).
I have dgrid set to 100% width in CSS. Is there some way I need to tell dgrid to refresh its size after the splitter moves?
Look at this example I wrote answering another
dgrid
related question: http://jsfiddle.net/phusick/VjJBT/The CSS rule you are looking for is:
EDIT: I thought it might have been a problem of
dgrid
version, so I updated mydgrid
to the latest version 0.3.3 and created a test for the issue of yours: http://jsfiddle.net/phusick/5mHTS/.Well, it was not the issue of versions and both 0.3.1 and 0.3.3 works fine when resizing
BorderContainer
, but only in Chrome and Firefox. I reproduced the issue in IE9 and Opera 12.10:The grid needs to invoke
grid.resize()
to resize properly, which does not happen in IE9/Opera, when resizingBorderContainer
, but happens always when you resize the window.DijitRegistry
fixes the issue, because layout components, likeBorderContainer
andContentPane
, callresize()
on all their dijit children when resized.So either subclass
DijitRegistry
ordojo/aspect
listen forresize
on parentContentPane
of the grid and invokegrid::resize()
: