User Profile & Activity

Madhavan G Member
Page
of 12
Posted: October 30, 2009 5:23 AM

Hi Handy,

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,

Regards,

madhavan

 

 

Posted: October 30, 2009 12:24 AM

Hi Handy,

Your sample is not working fine.

You are checking the following code in server side.

protected void WebGrid1_InitializePostBack(object sender, PostbackEventArgs e)

{

void WebGrid1_InitializePostBack(object sender, PostbackEventArgs e)

{

// only perform the below function // when the last action performed by the // grid OTFPB is 'Refresh' if ((e.Action == "Refresh" || e.Action == "More") && WebGrid1.SelectedRowKeyValue != null)

{

// prepare the parameter to be // passed over to the client side // in order to set back the previous // vertical scroll position

FunctionParameter[] parm = new FunctionParameter[1];

parm[0].Type = "x";

new FunctionParameter[1];

parm[0].Type = "x";

"x";// obtain the value passed from the client // side using AddInput method

parm[0].Value = Request.Form["scrollTopPos"];

"scrollTopPos"];if (parm[0].Value != null)

{

// invoke the js function // in order to set the vertical scroll position

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

 

 

"ApplyLatestScroll", parm);

}

}

}

 

But the Request.Form["scrollTopPos"] is not getting passed from aspx page.

Please check and let me know.

Regards,

Madhavan

 

 

Posted: October 29, 2009 6:06 AM

Hi Handy,

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,

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);
            }
        }
    }

grid.RootTable.GetElement(WG40.BODY, WG40.HTMLDIV).scrollTop is returning 0.

 

Please advice.

Regards,

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);
            }
        }
    }
Posted: October 29, 2009 4:30 AM

Hi Handy,

Thanks for the sample.

I will try and let you know.

Regards,

 Madhavan

 

Posted: October 27, 2009 5:54 AM

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?

 

Regards,

Madhavan

Posted: October 7, 2009 6:06 AM

Hi Handy,

 

I didn't Understand your term of "Inconsistent data and UI".

Please explain me on this.

Regards,

madhavan

Posted: October 6, 2009 5:59 AM

Hi Handy,

 

Can you please elaborate little more?

 

Regards,

Madhavan

Hi,

We are not using entire Webui Studio.

We are using Webgrid 6.0 alone.

Still the hotfix will be applicable right.

Regards,

Madhavan

All times are GMT -5. The time now is 3:41 PM.
Previous Next