How can I prevent render grid?
Simple example:
https://blazorplayground.syncfusion.com/VDhfZANoLSRVmcnc
When i select/deselect row in second grid, this is very slowly.
Beacuse (I think so) the first grid is all time re-rendered.
Hi Tomasz,
We would like to inform you that it is always recommended to use either paging/virtualization while rendering larger number of records in WASM application for better performance.
In your shared sample you have used EnableToolbarItemsAsync method inside the RowSelectEvent handlers which increases the delay while performing selection.
We have modified the implementation order inside the RowSelect and RowDeselect events and reattached the shared sample, the performance is improved compare to the shared sample. Kindly check the below attached sample and code snippet for your reference.
|
public async Task RowSelectHandler1(RowSelectEventArgs<Order> args) { DataGrid1.PreventRender(); await this.DataGrid2.EnableToolbarItemsAsync(new List<string>() { "Edit", "Delete" }, true);
args.PreventRender = true;
}
public async Task RowDeselectHandler1(RowDeselectEventArgs<Order> args) { DataGrid1.PreventRender(); await this.DataGrid2.EnableToolbarItemsAsync(new List<string>() { "Edit", "Delete" }, false);
args.PreventRender = true;
}
|
Please let us know if you have any concerns.
Regards,
Monisha
Super.
Changing the order of actions in the method solves the problem.
Thanks.
Hi Tomasz,
Glad that the issue is resolved. Please get back to us if you need any other assistance.
Regards,
Getsy
I also have a similer question to ask, can I ask it here?
Hi
William,
Yes, you can ask your question here. Please share the following details to
proceed further. It will be very helpful for us to validate the reported query
and provide a solution as soon as possible:
Regards,
Prathap Senthil