This is a migrated thread and some comments may be shown as answers.

Radgrid paging problem

1 Answer 57 Views
Telerik Trainer
This is a migrated thread and some comments may be shown as answers.
srikanth
Top achievements
Rank 1
srikanth asked on 14 Nov 2010, 02:18 PM
i have two radgrids(asp.net) and my requiremnet is on selection of pagination and changing page size on grid one, the second grid should respond..


here is my code
it is working with secon grid but not with first grid....plz help me out

 

 

protected void radgv1_PageIndexChanged(object source, GridPageChangedEventArgs e)

 

{

 

 

try

 

{

Session[

 

"First"] = radgv1.CurrentPageIndex;

 

 

 

if (Session["Second"] != null)

 

{

Session.Remove(

 

"Second");

 

radgv1.CurrentPageIndex = e.NewPageIndex;

radgv1.Rebind();

}

 

 

else

 

{

radgv2_PageIndexChanged(source, e);

}

}

 

 

catch (Exception ex)

 

{

}

}

 

 

protected void radgv2_PageIndexChanged(object source, GridPageChangedEventArgs e)

 

{

 

 

try

 

{

Session[

 

"Second"] = radgv2.CurrentPageIndex;

 

 

 

if (Session["First"] != null)

 

{

Session.Remove(

 

"First");

 

radgv2.CurrentPageIndex = e.NewPageIndex;

radgv2.Rebind();

}

 

 

else

 

{

radgv1_PageIndexChanged(source, e);

}

}

 

 

catch (Exception ex)

 

{

}

}

1 Answer, 1 is accepted

Sort by
0
Tsvetina
Telerik team
answered on 18 Nov 2010, 10:03 AM
Hello,

Please, try firing Page commands in your methods instead of calling the handlers for events that were not actually fired. You can see how you can fire commands in code behind at that address.

Best wishes,
Tsvetina
the Telerik team
Browse the vast support resources we have to jumpstart your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
Tags
Telerik Trainer
Asked by
srikanth
Top achievements
Rank 1
Answers by
Tsvetina
Telerik team
Share this question
or