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 ,
I meet a problem when using BatchUpdate method to update data of webgrid . It is a alert said "Unable to find the record in the datasource" . However , the data in the webgrid is updated and the data in the database is also updated . It means update success .
I do not know why was that . The following code is key code about BatchUpdate method .
protected void WG1_BatchUpdate(object sender, BatchUpdateEventArgs e) { string TypeGuid=""; foreach (WebGridRowChanges rowChanges in e.PendingChanges) { if (rowChanges.RowState == RowState.Modified) { TypeGuid = rowChanges.KeyValue.ToString(); UpdateHandleType(rowChanges.Data, TypeGuid); } } WG1.ClientAction.InvokeScript("alert('Update Success!');ISGetObject('" + WG1.ClientID + "').Refresh();"); }
private CommonDataRow UpdateHandleType(List<WebGridCellData> data, string typeGuid){ CommonDataRow row = new CommonDataRow("Frame_WaitHandleTypes", "TypeGuid", typeGuid, "Frame_ConnectionString"); foreach (WebGridCellData cellData in data) { row[cellData.Column.DataMember] = cellData.NewValue; } row.Update(); return row;}
The image in the attach file is that alert .
Anyone can help me ? Thanks a lot !
Hello Handy ,
Thank you for your reply and help . I think I have solved this problem . Thank you very much !
Hello,
It would very helpfull if you can send a simple runable project that replicates the issue. We need this to investigate the issue.Also, in your code, I saw that you call invoke script to refresh WebGrid. I think this is no need to do because WebGrid would automatically refresh if after accept the pending changes in batch update.
Regards,Handy
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