Hi
We are using IgGrid with virtualization enabled. During data bind to the grid a black spinner (loading) image comes for few seconds.
How can we avoid showing this black loading image.
Thanks,
Kiran Kumar L
Hello Kiran,
You can simply select the DOM element of the spinner on DataBinding event and prevent it from showing like this:
$("#grid").igGrid({ dataBinding: function(evt, ui) { $("#grid_container_loading").css("display", "none"); }});
In this case "grid" is the id of your igGrid control.
Please let me know if you have further questions on the matter.
Hi Hristo,
Still black spinner comes up even after adding the dataBinding event as mentioned. Could you please provide another alternative.
Thanks Kiran..
It seems that the element is still not rendered on dataBinding event. I suggest you try on dataRendering event and it is also better to remove the element rather than setting its attributes:
dataRendering: function (evt, ui) {
$("#grid_container_loading").remove(); // this will work if your igGrid id is "grid"
},
Please let me know if this helps.
Removing the dom element as explained works. Thanks for the reply.
Is there a way I can remove this in once central place which can avoid adding this code to all grids in the application.
Thanks - Kiran
A more general approach that will work for all your grids on all pages of your application would be to modify the code where the igLoading widget is defined in the "infragistics.ui.shared.js" file. You can find it in the default installation folder - C:\Program Files (x86)\Infragistics\2014.1\Ignite UI\js\modules\
However it is strongly recommended to avoid that.
Antoher possibility is if you have more than one grid on the page to remove all loading indicators like this:
$("span[id*='container_loading']").remove()
However the earliest point at which you could select all these elements is after the last grid on the page has been rendered, which mean it is possible to have the spinner show before that.
I hope this helps.
Thanks for your recommendation and support on this issue. This can be closed now
Kiran
If you need any further assistance regarding this issue, please let me know.