Apr 15, 2009, 6:31 PM
[CLOSED] live update of grid rows
You guys use stock market quotes in a lot of your examples, so let's stick with that theme. Let's say I have a gridPanel loaded with 100 stock quotes. I want this grid to update in real time, so I have a task manager on the page that calls an AjaxMethod every 5 seconds. Now I don't want to refresh the entire grid, so the AjaxMethod makes a database call and gets a System.Data.DataTable that contains only the rows that have changed since the last call.
OK, so now I'm on the server side in the middle of an AjaxMethod with a DataTable that contains rows to update. What is the best way to proceed from this point. It looks like the Store.LoadData() method may be a possibility which brings me to the following questions:
1. The LoadData() method requires a string parameter. I have been unsuccessful in converting a DataTable to a json string with your Coolite.Ext.Web.JSON.Serialize method. Any suggestions?
2. If the LoadData() method works, will it call the appropriate renderer functions on the grid itself?
Thank you for any assistance you can provide!
OK, so now I'm on the server side in the middle of an AjaxMethod with a DataTable that contains rows to update. What is the best way to proceed from this point. It looks like the Store.LoadData() method may be a possibility which brings me to the following questions:
1. The LoadData() method requires a string parameter. I have been unsuccessful in converting a DataTable to a json string with your Coolite.Ext.Web.JSON.Serialize method. Any suggestions?
2. If the LoadData() method works, will it call the appropriate renderer functions on the grid itself?
Thank you for any assistance you can provide!