iSeller Commerce
iSeller POS Retail
iSeller POS F&B
iSeller POS Express
Crosslight
WebUI
ClientUI
What's New
Download Trial
Web Solution
Mobile Solution
Enterprise Solution
Custom Development
Blog
Community
Latest Development Blogs
ForumPostTopic
Browse By Tag
Hi support,
in the client side by javascript, I have change more cell values of row for different rows and I need to do a bulk update of rows in asynchronous mode, is there a clue to do it ?
If I use the method row.Update(false) for the single row in the cycle 'for', only the first update works.
thanks in advance
regards
Fabrizio
In a multiple row update scenario, you will need to set some time before invoking another Update function call. Here is the snippet, using BindtoAccessDataSource.aspx provided sample, I add a client side function to update the first 3 row of data:
function EditRows(){ var grid = ISGetObject("WebGrid1"); //Update first 3 row var maxLoop = 3; var idx = 0; var intervalObj = setInterval(function() { if (idx < maxLoop) { var selectedRow = grid.RootTable.GetRow(idx); var cells = selectedRow.GetCells(); cells.GetNamedItem("ContactName").SetText(selectedRow.GetCell("ContactName").Text + " " + idx, true); cells.GetNamedItem("Region").SetText("Region #" + idx, true); selectedRow.Update(false); idx++; } else { clearInterval(intervalObj); intervalObj = null; } }, 500);}
Another suggestion would be to use WebGrid BatchUpdate feature, by setting AllowBatchUpdate = "true" under LayoutSettings and invoking AcceptAllChanges after updating all the rows. Here is the snippet:
function EditRowsV2(){ var grid = ISGetObject("WebGrid1"); //Update first 3 row for (var i = 0; i < 3; i++) { var selectedRow = grid.RootTable.GetRow(i); var cells = selectedRow.GetCells(); cells.GetNamedItem("ContactName").SetText(selectedRow.GetCell("ContactName").Text + " " + i, true); cells.GetNamedItem("Region").SetText("Region #" + i, true); selectedRow.Update(); } grid.AcceptAllChanges();}
Thank you for the information
or
Choose this if you're already a member of Intersoft Community Forum. You can link your OpenID account to your existing Intersoft Social ID.
Choose this if you don't have an Intersoft account yet. Your authenticated OpenID will be automatically linked to your new Intersoft account.
Enter your Wordpress Blogname