jQuery UI Widgets › Forums › Grid › grid always updated in real time
Tagged: autoshowloadelement, database, edit, grid, jqxgrid, load, load element, loading, post, real time, server, update, updatebounddata, updaterow
This topic contains 9 replies, has 2 voices, and was last updated by Hugo 9 years, 11 months ago.
-
Author
-
Good Morning,
can anyone help?
as leaving the grid always updated in real time?Hello Hugo,
The grid is updated in real time – when you leave a cell’s edit mode, the cell value will be updated. Please clarify your question if you need more information on another topic, such as updating the database after cell edit.
Best Regards,
DimitarjQWidgets team
http://www.jqwidgets.com/Hi Dimitar 🙂
example:
     Admin -> insert a new resgistro
     User -> grid view in realtime WHAT entered the AdminStyle Chat, a guy writes something while another guy viewing.
understand?Hi Hugo,
I understand your requirement. To achieve this, the changes to the admin grid will have to be posted to the server (on each change made), through the source updaterow callback. The user grid will have to be updated on some time interval with the updatebounddata method. Depending on the technology you use, please check out the guides Build CRUD Web App with jqxGrid using PHP and MySQL or CRUD with jqxGrid, ASP.NET MVC3 and SQL to see how you may implement the “admin part”.
Best Regards,
DimitarjQWidgets team
http://www.jqwidgets.com/Dimitar thank you so much 😉
Is not good, the grid lock and the user can not use the grid
would not have a way to update the data without interfering with filters?plus the message appears on the console -> Uncaught TypeError: Cannot read property ‘0’ of null
my code:
window.setInterval(function(){ $("#jqxgrid").jqxGrid('updatebounddata'); }, 2000);
Hi Hugo,
Please read the extra information about updatebounddata from the jqxGrid API Documentation:
Updates the bound data and refreshes the grid. You can pass ‘filter’ or ‘sort’ as parameter, if the update reason is change in ‘filtering’ or ‘sorting’. To update only the data without the columns, use the ‘data’ parameter. To make a quick update of the cells, pass “cells” as parameter. Passing “cells” will refresh only the cells values when the new rows count is equal to the previous rows count. To make a full update, do not pass any parameter.
Best Regards,
DimitarjQWidgets team
http://www.jqwidgets.com/@dimitar Sorry, should have read more carefully the documentation.
Help me with one more question,
how to let the invisible loadelement when execute the updatebounddata.
used the parameter"showdefaultloadelement: false"
more keeps appearingHi Hugo,
You should rather set the property autoshowloadelement to false.
Best Regards,
DimitarjQWidgets team
http://www.jqwidgets.com/thank you so much
-
AuthorPosts
You must be logged in to reply to this topic.