dGrid Startup

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

dGrid Startup

Rob Gillan-2
Hello again,

We’re trying to get to the bottom of what appear to be startup issues with our dGrids.  Previously (with dojo/store) we created the grids on app startup, then forced grid.startup() at the first time the container was shown (such as selecting the tab that contains the grid).

We have tried numerous/many combinations of where we call grid.startup(), when we call grid.refresh() etc.  The grid is built with an empty dStore (with idProperty correctly set).

Data is loaded from the server, in chunks of 500 rows returned and put into the Memory store (sync), and then after the last chunk the server sends a refresh and we perform grid.refresh().  We have even tried setting the collection (store) at this point with no different result.  We call grid.startup soon after creating the grid and assigning columns, setting event  handlers.

There’s a scenario where if the grid is visible by the time the refresh happens then everything works well.  The grid happily scrolls around the data.  if the grid is not visible then only the first page of data is shown in the grid and it will not scroll through the rest of the store.  We are using onDemandGrids throughout our application.

I’ve not been able to find any examples or info and know that we had to slightly delay the grid.startup() call in our previous version of the app.  Any clues as to where we should look to resolve this are very much appreciated.

Thanks and regards
Rob
--
Dojo Toolkit: http://dojotoolkit.org/
Tutorials: http://dojotoolkit.org/documentation/

[hidden email]
To unsubscribe, visit: http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest
Reply | Threaded
Open this post in threaded view
|

Re: dGrid Startup

Kenneth G. Franqueiro
This sounds a whole lot like
https://github.com/SitePen/dgrid/issues/1251 and may indeed be due to
startup being called at a point where the grid isn't actually in flow.

While debugging that issue, I seemed to observe that Dijit
StackContainer & co. actually call startup on *all* their children (even
the ones that shouldn't be in flow yet), which would seemingly be
breaking Dijit's own rules of when startup is supposed to be called...

Maybe try applying the patch from my commit
(https://github.com/kfranqueiro/dgrid/commit/631ddd95a3fbdea7ffa663199e652d4314425261.patch)
and see if that helps your case?

--Ken

On 3/8/2016 11:47 PM, Rob Gillan wrote:

> Hello again,
>
> We’re trying to get to the bottom of what appear to be startup issues with our dGrids.  Previously (with dojo/store) we created the grids on app startup, then forced grid.startup() at the first time the container was shown (such as selecting the tab that contains the grid).
>
> We have tried numerous/many combinations of where we call grid.startup(), when we call grid.refresh() etc.  The grid is built with an empty dStore (with idProperty correctly set).
>
> Data is loaded from the server, in chunks of 500 rows returned and put into the Memory store (sync), and then after the last chunk the server sends a refresh and we perform grid.refresh().  We have even tried setting the collection (store) at this point with no different result.  We call grid.startup soon after creating the grid and assigning columns, setting event  handlers.
>
> There’s a scenario where if the grid is visible by the time the refresh happens then everything works well.  The grid happily scrolls around the data.  if the grid is not visible then only the first page of data is shown in the grid and it will not scroll through the rest of the store.  We are using onDemandGrids throughout our application.
>
> I’ve not been able to find any examples or info and know that we had to slightly delay the grid.startup() call in our previous version of the app.  Any clues as to where we should look to resolve this are very much appreciated.
>
> Thanks and regards
> Rob
>
--
Dojo Toolkit: http://dojotoolkit.org/
Tutorials: http://dojotoolkit.org/documentation/

[hidden email]
To unsubscribe, visit: http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest
Reply | Threaded
Open this post in threaded view
|

Re: dGrid Startup

Rob Gillan-2
Ken,

Outstanding, solved the issue.  And yes the grid in question is in a StackContainer hidden child at initial load.

Cheers
Rob

> On 9 Mar 2016, at 4:13 pm, Kenneth G. Franqueiro <[hidden email]> wrote:
>
> This sounds a whole lot like
> https://github.com/SitePen/dgrid/issues/1251 and may indeed be due to
> startup being called at a point where the grid isn't actually in flow.
>
> While debugging that issue, I seemed to observe that Dijit
> StackContainer & co. actually call startup on *all* their children (even
> the ones that shouldn't be in flow yet), which would seemingly be
> breaking Dijit's own rules of when startup is supposed to be called...
>
> Maybe try applying the patch from my commit
> (https://github.com/kfranqueiro/dgrid/commit/631ddd95a3fbdea7ffa663199e652d4314425261.patch)
> and see if that helps your case?
>
> --Ken
>
> On 3/8/2016 11:47 PM, Rob Gillan wrote:
>> Hello again,
>>
>> We’re trying to get to the bottom of what appear to be startup issues with our dGrids.  Previously (with dojo/store) we created the grids on app startup, then forced grid.startup() at the first time the container was shown (such as selecting the tab that contains the grid).
>>
>> We have tried numerous/many combinations of where we call grid.startup(), when we call grid.refresh() etc.  The grid is built with an empty dStore (with idProperty correctly set).
>>
>> Data is loaded from the server, in chunks of 500 rows returned and put into the Memory store (sync), and then after the last chunk the server sends a refresh and we perform grid.refresh().  We have even tried setting the collection (store) at this point with no different result.  We call grid.startup soon after creating the grid and assigning columns, setting event  handlers.
>>
>> There’s a scenario where if the grid is visible by the time the refresh happens then everything works well.  The grid happily scrolls around the data.  if the grid is not visible then only the first page of data is shown in the grid and it will not scroll through the rest of the store.  We are using onDemandGrids throughout our application.
>>
>> I’ve not been able to find any examples or info and know that we had to slightly delay the grid.startup() call in our previous version of the app.  Any clues as to where we should look to resolve this are very much appreciated.
>>
>> Thanks and regards
>> Rob
>>
> --
> Dojo Toolkit: http://dojotoolkit.org/
> Tutorials: http://dojotoolkit.org/documentation/
>
> [hidden email]
> To unsubscribe, visit: http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest

--
Dojo Toolkit: http://dojotoolkit.org/
Tutorials: http://dojotoolkit.org/documentation/

[hidden email]
To unsubscribe, visit: http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest
Reply | Threaded
Open this post in threaded view
|

Re: dGrid Startup

Rob Gillan-2
In reply to this post by Kenneth G. Franqueiro
Seems to have also solved my other question re scroll bar, appearing reliably now as well.

Happy camper.  As always, thanks for your prompt and insightful help

Cheers
Rob

> On 9 Mar 2016, at 4:13 pm, Kenneth G. Franqueiro <[hidden email]> wrote:
>
> This sounds a whole lot like
> https://github.com/SitePen/dgrid/issues/1251 and may indeed be due to
> startup being called at a point where the grid isn't actually in flow.
>
> While debugging that issue, I seemed to observe that Dijit
> StackContainer & co. actually call startup on *all* their children (even
> the ones that shouldn't be in flow yet), which would seemingly be
> breaking Dijit's own rules of when startup is supposed to be called...
>
> Maybe try applying the patch from my commit
> (https://github.com/kfranqueiro/dgrid/commit/631ddd95a3fbdea7ffa663199e652d4314425261.patch)
> and see if that helps your case?
>
> --Ken
>
> On 3/8/2016 11:47 PM, Rob Gillan wrote:
>> Hello again,
>>
>> We’re trying to get to the bottom of what appear to be startup issues with our dGrids.  Previously (with dojo/store) we created the grids on app startup, then forced grid.startup() at the first time the container was shown (such as selecting the tab that contains the grid).
>>
>> We have tried numerous/many combinations of where we call grid.startup(), when we call grid.refresh() etc.  The grid is built with an empty dStore (with idProperty correctly set).
>>
>> Data is loaded from the server, in chunks of 500 rows returned and put into the Memory store (sync), and then after the last chunk the server sends a refresh and we perform grid.refresh().  We have even tried setting the collection (store) at this point with no different result.  We call grid.startup soon after creating the grid and assigning columns, setting event  handlers.
>>
>> There’s a scenario where if the grid is visible by the time the refresh happens then everything works well.  The grid happily scrolls around the data.  if the grid is not visible then only the first page of data is shown in the grid and it will not scroll through the rest of the store.  We are using onDemandGrids throughout our application.
>>
>> I’ve not been able to find any examples or info and know that we had to slightly delay the grid.startup() call in our previous version of the app.  Any clues as to where we should look to resolve this are very much appreciated.
>>
>> Thanks and regards
>> Rob
>>
> --
> Dojo Toolkit: http://dojotoolkit.org/
> Tutorials: http://dojotoolkit.org/documentation/
>
> [hidden email]
> To unsubscribe, visit: http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest

--
Dojo Toolkit: http://dojotoolkit.org/
Tutorials: http://dojotoolkit.org/documentation/

[hidden email]
To unsubscribe, visit: http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest