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 all,
Whenever we are having multiple records say 200 in the grid.
By default we are loading say 50 rows.
As you scroll down, it keeps loading more 50 rows...However, after loading it scrolls back to the top of the grid.
Please advice on the above concern.
Regards,
Madhavan
Hello,
For now, it could not set via property. Please see my attachment sample for workaround. My idea is selectiong a row where it loads more.
Regards,Handy
Hi Handy,
Why we were not able to maintain the Scroll position?
It is always going top after scrolling down.
So many of our customers are asking for this.
Can you please check with your developers and let us know?
hi Madhavan,
My workaround can also work. Have you tested it? If you don;t want it, please try this new sample. Every time, you load more by scrolling down, it would mantain the scrolling position. Hope this would be more suitable with your scenario.
Thanks for the sample.
I will try and let you know.
In The sample there is no scrollposition getting passed from client side.
I modified the sample based on webgrid 4.0 sample.'
But always grid.RootTable.GetElement(WG40.BODY, WG40.HTMLDIV).scrollTop is returning 0. Please advice. Regards, Madhafunction DoBeforeRequest(gridId,action) { debugger; var grid = ISGetObject(gridId); var vl = grid.RootTable.GetElement(WG40.BODY, WG40.HTMLDIV).scrollTop + ""; if(action=="More") { grid.AddInput("scrollTopPos", vl); } return true; } function ApplyLatestScroll(x) { alert('in'); var grid = ISGetObject("WebGrid1"); grid.RootTable.GetElement(WG40.BODY, WG40.HTMLDIV).scrollTop = x; return true; } void WebGrid1_InitializePostBack(object sender, PostbackEventArgs e) { if (e.Action == "More" ) { ISNet.WebUI.FunctionParameter[] parm = new ISNet.WebUI.FunctionParameter[1]; parm[0].Type = "x"; parm[0].Value = Request.Form["scrollTopPos"]; if (parm[0].Value != null) { WebGrid1.ClientAction.InvokeScript("ApplyLatestScroll", parm); } } }
grid.RootTable.GetElement(WG40.BODY, WG40.HTMLDIV).scrollTop is returning 0.
Please advice.
Madha
function DoBeforeRequest(gridId,action) { debugger; var grid = ISGetObject(gridId); var vl = grid.RootTable.GetElement(WG40.BODY, WG40.HTMLDIV).scrollTop + ""; if(action=="More") { grid.AddInput("scrollTopPos", vl); } return true; } function ApplyLatestScroll(x) { alert('in'); var grid = ISGetObject("WebGrid1"); grid.RootTable.GetElement(WG40.BODY, WG40.HTMLDIV).scrollTop = x; return true; } void WebGrid1_InitializePostBack(object sender, PostbackEventArgs e) { if (e.Action == "More" ) { ISNet.WebUI.FunctionParameter[] parm = new ISNet.WebUI.FunctionParameter[1]; parm[0].Type = "x"; parm[0].Value = Request.Form["scrollTopPos"]; if (parm[0].Value != null) { WebGrid1.ClientAction.InvokeScript("ApplyLatestScroll", parm); } } }
void WebGrid1_InitializePostBack(object sender, PostbackEventArgs e) { if (e.Action == "More" ) { ISNet.WebUI.FunctionParameter[] parm = new ISNet.WebUI.FunctionParameter[1]; parm[0].Type = "x"; parm[0].Value = Request.Form["scrollTopPos"]; if (parm[0].Value != null) { WebGrid1.ClientAction.InvokeScript("ApplyLatestScroll", parm); } } }
But my sample works fine, right? I think maybe different stuctures can have different result. It would be more helpful if you can send me a simple working sample and i will investigate for you.
Your sample is not working fine.
You are checking the following code in server side.
protected void WebGrid1_InitializePostBack(object sender, PostbackEventArgs e) {
{
FunctionParameter[] parm = new FunctionParameter[1];parm[0].Type = "x";
parm[0].Type = "x";
parm[0].Value = Request.Form["scrollTopPos"];
WebGrid1.ClientAction.InvokeScript("ApplyLatestScroll", parm);}}} But the Request.Form["scrollTopPos"] is not getting passed from aspx page.Please check and let me know.Regards,Madhavan
}
But the Request.Form["scrollTopPos"] is not getting passed from aspx page.
Please check and let me know.
In my sample, could you record a video to show me when Request.Form["scrollTopPos"] is not getting from aspx page? I need to know to check in what behaviour that can cause the issue you told about.
I have copied your sample page contents to my test project.
Please find the attached sample.
To be more clear Say if we are having 100 records and virtualpagesize is 20.
First we are in Page1 where we are seeing 20 records.
When we do a scrolling or click on LoadMore Icon the Scrollbar should point it around 38th record position or so.
Thanks in advance,
madhavan
My previous scenario only supports to pesrsist the scrollbar not the selecting row. In fact, it is only working when scrolling, not click on LoadMore. Based on your scenario, i think the best approach is my first work around which is selecting a record after load more. Here is the modification i made on your modified sample. Hope this snippet codes could help you mantain your scenario.
function WebGrid1_OnAfterResponseProcess_1(controlId, actionName, lastRequestObject, xmlResponseObject) { var grid = ISGetObject(controlId); window.setTimeout(function() { if (grid.TotalLoadedRows <= grid.TotalRows) grid.RootTable.GetRow(grid.TotalLoadedRows - 2).Select(); }, 1000); return true; }
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