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
The PerformBacthUpdate method already have the option to update the WebGrid UI automatically by passing true in the second parameter of the method. However, since passing True causes JS error in the previous build; as a workaround, you will need to manually call refresh method for the WebGrid to update UI properly.Since in the latest build this issue has been fix, passing true in the second parameter does not cause JS error, passing true in the PerformBacthUpdate method will update the WebGrid UI properly.
The PerformBacthUpdate method already have the option to update the WebGrid UI automatically by passing true in the second parameter of the method. However, since passing True causes JS error in the previous build; as a workaround, you will need to manually call refresh method for the WebGrid to update UI properly.
Since in the latest build this issue has been fix, passing true in the second parameter does not cause JS error, passing true in the PerformBacthUpdate method will update the WebGrid UI properly.
Awesome. That confirms that #2 has been fixed.
Can you also confirm that this is fixed too: 1) The 'rowErrors' start tag on line 2 does not match the end tag of 'BatchUpdateResult'. Line 2, position 167.
The current definition for PerformBathUpdate method accepts 2 parameter, public bool PerformBatchUpdate(bool throwExceptionOnError, bool UpdateUI). The reported issue is passing True as UpdateUI paramater value will result in WebGrid error. Since the UpdateUI value is false, WebGrid will not update the UI after batch update execution so we need to call the refresh method manually in order to update the UI. With the fix, UpdateUI value could be set to true and the UI will be updated properly after batch update execution.
So, the latest build, build 405 and build 756 respectively which can be obtained by installing the WebUI 2010 R1 SP1 fixes both bugs:
1) The 'rowErrors' start tag on line 2 does not match the end tag of 'BatchUpdateResult'. Line 2, position 167.
2) Updates the Grid's UI without needed to call the WebGrid's JavaScript Refresh method
???
The fix for the issue I refer to in my previous post is the UpdateUI parameter set to True in PerformBatchUpdate method. With the fix in the latest build, we could pass True in the UpdateUI parameter in PerformBatchUpdate method so the UI will be updated properly.Did you find another issue when using the latest build?
The fix for the issue I refer to in my previous post is the UpdateUI parameter set to True in PerformBatchUpdate method. With the fix in the latest build, we could pass True in the UpdateUI parameter in PerformBatchUpdate method so the UI will be updated properly.
Did you find another issue when using the latest build?
Please explain. My last post refers to two seperate issues regarding the PerformBatchUpdate method. The first is that exception which appears to be fixed (I need to test but we are going through a deployment cycle) The second is the UI not updating properly after the PerformBatchUpdate is called and the Intersoft workaround was to call the "WebGrid's Refresh" method which basically called a second postback. This won't work for us so I am trying to see if this bug is fixed as well.
Thanks!
Sorry about the late reply. Based on my discussion with the developer, the issue has been fixed in the latest build. Have you tried updating you WebGrid and WebUI Framework control to the latest build, build 405 and build 756 respectively, by installing the WebUI 2010 R1 SP1?
Sorry about the late reply.
Based on my discussion with the developer, the issue has been fixed in the latest build. Have you tried updating you WebGrid and WebUI Framework control to the latest build, build 405 and build 756 respectively, by installing the WebUI 2010 R1 SP1?
Thanks! I will check it out.
Can you also check with the developer on the issue where the method does not update the UI properly? The previous work around was to call the JS's RefreshGrid method from the server-side which basically did another postback. This is not a valid workaround as we have pages with multiple grids and the performance would be terrible.
Please let me know. This is a very high priority bug for us.
Do you mind providing a simple runable sample? Using an ASP button to invoke the PerformBatchUpdate in the batch update provided sample I could not replicate the issue. I could discuss the issue further with our developer if the issue is replicable in our environment.
It will take some time given the complexity of our software. Can you talk to the developer on what the exception might be? That might shed some light given it's a specific error message.
Have you tried the suggested solution in the thread you mention? The workaround is invoking a refresh client side method after calling the PerformBatchUpdate. Here is the snippet:protected void Button1_Click(object sender, EventArgs e){ WebGrid1.PerformBatchUpdate(true, false); Page.ClientScript.RegisterStartupScript(this.GetType(), "RefreshGrid", "<script>RefreshGrid()</script>");}Refresh client side method:function RefreshGrid() { var grid = ISGetObject("WebGrid1"); grid.Refresh();}
Have you tried the suggested solution in the thread you mention?
The workaround is invoking a refresh client side method after calling the PerformBatchUpdate. Here is the snippet:
protected void Button1_Click(object sender, EventArgs e){ WebGrid1.PerformBatchUpdate(true, false); Page.ClientScript.RegisterStartupScript(this.GetType(), "RefreshGrid", "<script>RefreshGrid()</script>");}
Refresh client side method:
function RefreshGrid() { var grid = ISGetObject("WebGrid1"); grid.Refresh();}
I'd like to avoid doing a double postback to fix this bug. Also, we have pages with multiple WebGrids.
I'd like to address the bug instead of trying another work-around.
Thanks.
This is not a bug.The Enabled property of WebGrid only works on full PostBack action. For example, set the value of Enabled property on the click event of ASP.NET button will get WebGrid in non-editable state (prevent users from entering input).I enclosed one simple sample of WebGrid that will be disabled during the click event of ASP.NET button. WebFlyPostBackManager is utilized in order to turns the full PostBack of ASP.NET Button into FlyPostBack request (a.k.a callback) without javascript codes.Please have the attached sample tested on your end and let us know whether it helps or not.
This is not a bug.
The Enabled property of WebGrid only works on full PostBack action. For example, set the value of Enabled property on the click event of ASP.NET button will get WebGrid in non-editable state (prevent users from entering input).
I enclosed one simple sample of WebGrid that will be disabled during the click event of ASP.NET button. WebFlyPostBackManager is utilized in order to turns the full PostBack of ASP.NET Button into FlyPostBack request (a.k.a callback) without javascript codes.
Please have the attached sample tested on your end and let us know whether it helps or not.
I disagree. I don't understand how this could not be a bug. It's a client-side javascript property to enable/disable a grid but it doensn't fully enable/disable. What is the purpose of the property if I have to iterate through every single cell to set its SetForceNoEdit property which can be a huge performance hit or have to use a DIV element to prevent input? Also, I don't see why a PostBack would be necessary given it's client-side property. That makes no sense to me.
I was able to use this workaround but this should be addressed or the property removed because it doesn't work as expected.
In order to prevent users from entering input, you can try following workaround.Utilize z-index of a div layer.When WebGrid is disabled, the z-index of the div layer will be higher than the z-index of WebGrid. and when WebGrid is enabled, the z-index of the div layer is set back to lower than the z-index of WebGrid.Utilize SetForceNoEdit() method.When WebGrid is disabled, invoke SetForceNoEdit() method over cell objects of WebGrid.I enclosed a simple sample that shows how to implement both of those workaround mentioned above. Please let us know whether it helps or not.
In order to prevent users from entering input, you can try following workaround.
Utilize z-index of a div layer.
When WebGrid is disabled, the z-index of the div layer will be higher than the z-index of WebGrid. and when WebGrid is enabled, the z-index of the div layer is set back to lower than the z-index of WebGrid.
Utilize SetForceNoEdit() method.
When WebGrid is disabled, invoke SetForceNoEdit() method over cell objects of WebGrid.
I enclosed a simple sample that shows how to implement both of those workaround mentioned above. Please let us know whether it helps or not.
I confirmed the z-index works. However, I choose not to use the SetForceNoEdit() to avoid any performance hit. Will this bug be fixed in the next release?
You could check the Client_ProgrammaticEdit.aspx provided WebGrid sample for implementation of WebGrid editing client side API. In short, you will need to be able to retrieve the new row object and invoke the update function. Here is the snippet assuming the new row is the selected row:var grid = ISGetObject("WebGrid1");grid.GetSelectedObject().ToRowObject().Update();
You could check the Client_ProgrammaticEdit.aspx provided WebGrid sample for implementation of WebGrid editing client side API. In short, you will need to be able to retrieve the new row object and invoke the update function. Here is the snippet assuming the new row is the selected row:
var grid = ISGetObject("WebGrid1");grid.GetSelectedObject().ToRowObject().Update();
You don't understand my problem. The WebGrid will postback and update the data as focus is lost from the WebGrid. For instance, a user enters data in a new row and then clicks on a button. In my scenario, I have a WinForms application that uses a WebBrowser object to display a web page. This application has nodes that transports the user from web page to web page. In this case, the WebGrid doesn't detect focus lost so the update does not occur.
To fix, the WinForms calls a method on the web page that just calls window.focus() which triggers the update.
Hi Adrian Cunningham,Yes, deeply apologize for the late respond. Could you kindly get our latest build of WebGrid? In our new hotfix, we introduced PerformBatchUpdate(throwOnError, updateUI).In your case, you can simply try to use PerformBatchUpdate(true,true)I hope it can help. Thank you and have a nice day!Best Regards,Andi Santoso
Hi Adrian Cunningham,
Yes, deeply apologize for the late respond. Could you kindly get our latest build of WebGrid? In our new hotfix, we introduced PerformBatchUpdate(throwOnError, updateUI).
In your case, you can simply try to use PerformBatchUpdate(true,true)
I hope it can help. Thank you and have a nice day!
Best Regards,
Andi Santoso
I believe this method already exists in my release. Was it updated to fix this bug?
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