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 have a WebGrid using BatchUpdate and need a way to prevent the user from entering input. The WebGrid's "Enabled" property prevents the user from clicking into a cell and entering data. However, if the Grid has focus the user can still enter data into the cells. They cannot click on a cell and enter but they can tab from cell to cell and use the keyboard.
Also, is there a way to update the Grid's UI to show the Grid is disabled via JavaScript?
function <%=this.ClientID%>_SetEnabled(isEnabled) { try { // Enable/Disable var treatyClaimsGrid = ISGetObject("<%=this.grdTreatyClaims.ClientID%>"); if (treatyClaimsGrid == null) { return; } if (isEnabled == false) { treatyClaimsGrid.UndoAllChanges(); } treatyClaimsGrid.Enabled = isEnabled; } catch (ex) { ShowJSException(ex); } }
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?
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.
I’m sorry for not thoroughly read your previous message.
I was able to repro the issue on my local test and have forwarded the issue to WebGrid development team to be fixed. The issue is filed under work item #828.
I’ll keep you updated with any new I heard from the team regarding work item #828.
I’m sorry for the inconvenience.
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