Our blazing fast Grid component built with pure JavaScript


Post by janan »

https://www.bryntum.com/examples/grid/multipleinstances/. We are trying to use multiinstance example and load our grids so :

 store: {
            fields:   ['name', ].concat(columnsInfo.fields),
            readUrl:  gridProperties.reloadUrl,
            params:   gridProperties.dataParams,
            autoLoad: true,
          },

'

Is there a way to know if all the grids completed store loading?


Post by mats »

Sure, you could just check this flag on your stores: https://bryntum.com/docs/scheduler/#Core/data/AjaxStore#property-isLoading


Post by janan »

Hi,
Thanks for the response. The isLoading function is working. I want to use the resizeToFitContent on the columns when the loading is completed. Could you please help me with where can we do it ? Is there any after listener to know if the widget(all the grids) is loaded?Kindly let me know if you need more clarity.

Last edited by janan on Wed Sep 30, 2020 12:09 pm, edited 1 time in total.

Post by alex.l »

All the best,
Alex


Post by janan »

Hi,
I am not using Ajaxstore, I am updating my data as follows

store: {
            fields:   ['name', ].concat(columnsInfo.fields),
            readUrl:  gridProperties.reloadUrl,
            params:   gridProperties.dataParams,
            autoLoad: true,
          },

To put it clearly, I use the multi instance example, I would like to know if the widget(all the grids) is loaded.


Post by alex.l »

Hi janan,

Core.data.Store doesn't have readUrl property. https://bryntum.com/docs/scheduler/#Core/data/Store
https://bryntum.com/docs/scheduler/#Core/data/AjaxStore#config-readUrl

You need to implement a solution that listen all your stores and switch some flag when the last one is loaded, as example. Or use any other logic, but this logic need to be implemented by yourself. You could use load event (https://bryntum.com/docs/scheduler/#Core/data/AjaxStore#event-load) and/or isLoading flag (https://bryntum.com/docs/scheduler/#Core/data/AjaxStore#property-isLoading) in your solution.

Could you please specify what exactly is not working for you? If so, please attach a runnable test case, this might help us a lot to give you better advice or localize the problem, if any.

Thanks,
Alex

All the best,
Alex


Post Reply