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
In a certain page type of our project, WebGrid is contained within a div which is absolutely positioned on the page. There may be more that one DIVs like this and the whole look resembles to a MDI windows application.
Depending on the size and position of each DIV, the actual page size might exceed the physical size of the browser window. In this case, scrollbars appear on the browser window and the user can use them to scroll around the page.
In the latter case, if a record is edited, the corresponding textbox on the grid is misplaced. The offset is equal to the amount of window scrolling.
I created a simple page of WebGrid based on your description and managed to reproduce the reported problem in my local test.
Adding the following JS code fix the edit box misplaced problem in my local end. Thanks to Leo Chandra for providing the script.
function EnterEditMode(controlId, tblName, editObject) { if (IS.chrome || IS.moz) { var grid = ISGetObject(controlId) var element = editObject.element; if (editObject.element.GetFrameElement) element = editObject.element.GetFrameElement(); var offsetLeft = ISPosLib.getLeftNonIE(grid.FrameObj) - ISPosLib.getLeft(grid.FrameObj); element.style.left = (parseInt(element.style.left) + (offsetLeft)) + "px"; } }
Try to assign the above script to WebGrid's OnEnterEditMode client-side event. Please feel free to let me know if you have different result.
I've added the code you proposed and it works great now.
Many thanks!
Glad to hear that the snippet code helps to resolve the problem - WebGrid edit box misplaced when browser's window is scrolled.
Should you need further assistance or run into any problems regarding our controls, feel free to post it into our forum. We would be happy to assist you again.
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