jQWidgets Forums
jQuery UI Widgets › Forums › Grid › Performance issues when updating the grid
Tagged: edit cell, grid, performance, update, update row
This topic contains 7 replies, has 2 voices, and was last updated by Peter Stoev 11 years ago.
-
Author
-
Hi,
We have the following scenario when we edit a cell in our grid:
– Onkeydown event is fired to end cell editing in a custom way
– The cellvaluechanged event is fired and here we go to the server to update the database
– The server response have some new values for some specific cells from the modified row and maybe some others.
– We update the data source and call the grid updatebounddata function to refresh the grid.That works fine with only one refresh and all modified cells are updated according to new data that server sends back to the grid. The problem is that we have a poor performance because jqxGrid renders ALL the rows when updatebounddata is done, and not only the specified rows/cells.
We would like to have a function where we could specify a row index or similar to only render the affected row. Why is it that all rows are renderded everytime? updaterow method doesn’t do any better.
Also, when you enter to edit mode, all rows are rendered again only to show an input in the specified cell, so I don’t get the idea of re-rendering all the rows.
Thank you!
Hi dpibt,
If you want to improve the performance in your case, then you can implement virtual mode, enable paging, turn off autoheight, decrease the grid’s size, use filter menu instead of filter row. Things like that. Another option is to use jqxDataTable if you don’t need advanced features. It is your choice, but we would not discuss why the Grid does something in a specific way. The rendering of the widget requires refreshing of the view port. If you rebind the widget, then we will re-render it and it is necessary to do it.
Best Regards,
Peter StoevjQWidgets Team
http://www.jqwidgets.comOk,
So just to be clear, there is no way to avoid re-rendering all visible rows/cells every time that a cell begins and ends edition mode?
How should we update a cell/row value without render all again?
Thanks in advance.
Hi dpibt,
The Grid performs a refresh if a cell/row is updated. It does not re-render everything. It will re-render if you rebind it through “updatebounddata”, setting “source” property and in some additional special cases. It is not so simple to be explained. No, you would not be able to customize the rendering logic of jqxGrid i.e when and what it does. You can decide which features to use and which to do not.
Best Regards,
Peter StoevjQWidgets Team
http://www.jqwidgets.comHi Peter,
But the refresh applies to all visiblerows , so then all visible rows are redrawn isn’t it? I meant, the jqxgrid is not fully rendered but the rows are.
Could you tell me the fastest way to update only the desired row/cell without or minimizing the complete redrawns?
Thanks
Hi dpibt,
There is only one way to update a cell – setcellvalue method. To update a row, updaterow. There are not other options.
Best Regards,
Peter StoevjQWidgets Team
http://www.jqwidgets.comAnd to avoid the complete visual rows redrawn when begincelledit and endcelledit? It is posible to redraw only the row/cell being edited?
Thanks
Hi dpibt,
You can customize which features to turn on and which to turn off. I already wrote you that you cannot modify the widget’s rendering.
Best Regards,
Peter StoevjQWidgets Team
http://www.jqwidgets.com -
AuthorPosts
You must be logged in to reply to this topic.