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
I can delete one row,but When I delete multi_Rows by "Delete Selection"(see the picture below),popup infor:"Please wait while webgrid is inprocessing requesting...".
I can delete multi_Rows on cilentSide to avoid the popup infor,but I want to knowhow to to avoid the popup infor when I delete multi_Rows on Serverside ????
Please help me,thanks!jsCode: function Unprocess() { var grid = ISGetObject("WebGrid1"); grid.XmlHttp.Asynchronous = false; //any way,it seems that it does not run on serverside! } C#Code:
protected void WebGrid1_DeleteRow(object sender, RowEventArgs e) { DataSet ds = (DataSet)WebGrid1.DataSource; da.DeleteCommand = builder.GetDeleteCommand(); WebGrid1.ClientAction.InvokeScript("Unprocess();"); ((DataRowView)e.Row.DataRow).Row.Delete(); WebGrid1.ClientAction.InvokeScript("Unprocess();"); da.Update(ds); e.ReturnValue = false; WebGrid1.ClientAction.Refresh(); }
I made a simple test of WebGrid based on your scenario. In my test page, I added an ASP.NET button to delete the first and second row of WebGrid.
The OnClick server-side event of the ASP.NET Button control will invoke a javascript function. The Javascript function will delete the first two row of WebGrid.
I enclosed my test page as attachment. please have the attached sample tested on your end and let me know whether it helps or not.
I am sorry that I have known the way to delete rows below by client way(or call js code on severside),but I want to know how to to avoid the popup infor when I delete multi_Rows by deleterow event on Serverside ????(please pay attention to the question ! thanks)
//delete rows :one wayfunction deleteMutRows() { var grid = ISGetObject("WebGrid1"); var checkedRows = grid.RootTable.GetCheckedRows(); if(checkedRows.length==0) { alert(' please select row !'); } else { for(i=0;i<=checkedRows.length - 1;i++) { row = grid.RootTable.ToRowObject(checkedRows[i]); grid.XmlHttp.Asynchronous = false; row.Delete(); } } } //delete rows :the other wayfunction deleteRows() { var grid = ISGetObject("WebGrid1"); var i=0; var maxRow=5;//the count of Deleting rows var updateProcess = setInterval (function () { if (!grid.IsInProgress && i < maxRow) { var rows = grid.RootTable.GetCheckedRows(); var row = grid.RootTable.ToRowObject(rows[i]) row .Delete(); i++; } if (i >= maxRow) { clearInterval(updateProcess); updateProcess = null; } }, 1); }
Sorry for the inconvenience.
The alternative in order to avoid the alert, “Please wait while WebGrid is in progress processing request…”, to be shown when deleting multiple rows of WebGrid is by enabling BatchUpdate feature of WebGrid.
By using BatchUpdate, you can delete multiple rows and save the changes on a single-click button.
Hope this helps.
BatchUpdate can achieve my basic aim,but that is not my goal__Because batchUpdate runs more slowly than "WebGrid1_DeleteRow"!Maybe it has no way to avoid the popup infor(“Please wait while WebGrid is in progress processing request…”) when I delete multi_Rows by WebGrid1_DeleteRow event on Serverside ! Thank you all the same Yudi_
I have forwarded and informed this to WebGrid development team to be checked.
By default, deleting multiple rows will shows “Please wait while WebGrid is in progress processing request…” message. Based on the WebGrid’s event life cycle, there are WebGrid’s events (server-side) that will be executed. There is a flag that will tell whether WebGrid is still busy or ready to execute next command. The message “Please wait while WebGrid is in progress processing request…” appear because WebGrid is still busy while there is another request to delete the next row.
I’ll keep you updated with any news I heard from development team regarding this.
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