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

Paging Not Works for Runtime created RadGrid

5 Answers 63 Views
Grid
This is a migrated thread and some comments may be shown as answers.
vinod
Top achievements
Rank 1
vinod asked on 10 Oct 2008, 11:39 AM
Hello All,
 
I am creating RadGrid Runtime it works fine for paging i am adding follwing code.but paging doesn't Works please provide me solution asap with example.

            RadGridRow.PagerStyle.FirstPageImageUrl = "PagingFirst.gif";
            RadGridRow.PagerStyle.LastPageImageUrl = "PagingLast.gif";
            RadGridRow.PagerStyle.NextPageImageUrl = "PagingNext.gif";
            RadGridRow.PagerStyle.PrevPageImageUrl = "PagingPrev.gif";
            RadGridRow.PagerStyle.Mode = PagerMode.NextPrevAndNumeric;
            RadGridRow.PagerStyle.PagerTextFormat =
           "Displaying Items {2}    to {3} of {5}.";

5 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 13 Oct 2008, 03:53 AM
Hi Vinod,

Try setting the pager for the Grid as shown below.

CS:
           RadGrid1.AllowPaging = true
        RadGrid1.PagerStyle.FirstPageImageUrl = "PagingFirst.gif"
        RadGrid1.PagerStyle.LastPageImageUrl = "PagingLast.gif"
        RadGrid1.PagerStyle.NextPageImageUrl = "PagingNext.gif"
        RadGrid1.PagerStyle.PrevPageImageUrl = "PagingPrev.gif"
        RadGrid1.PagerStyle.Mode = GridPagerMode.NextPrevAndNumeric; 



Thanks
Shinu.
0
vinod
Top achievements
Rank 1
answered on 13 Oct 2008, 05:29 AM
Thanx shinu for replay .0

i already givin RadGridRow.AllowPaging = true;
it is working fine when click om perticuler number of paging
but when i clicked on left or right Arrow paging doesn't work.
please have a look on this issue.plase suggest any solution...

follwing Code i am using for Paging...

           RadGridRow.AllowPaging = true;
           RadGridRow.PagerStyle.FirstPageImageUrl = "PagingFirst.gif";
            RadGridRow.PagerStyle.LastPageImageUrl = "PagingLast.gif";
            RadGridRow.PagerStyle.NextPageImageUrl = "PagingNext.gif";
            RadGridRow.PagerStyle.PrevPageImageUrl = "PagingPrev.gif";
          RadGridRow.PagerStyle.Mode =    GridPagerMode.NextPrevAndNumeric;
           RadGridRow.PagerStyle.PagerTextFormat = "Displaying Items {2} to {3} of {5}.";

0
vinod
Top achievements
Rank 1
answered on 13 Oct 2008, 06:16 AM
i already givin RadGridRow.AllowPaging = true;
it is working fine when click om perticuler number of paging
but when i clicked on left or right Arrow paging doesn't work.
please have a look on this issue.plase suggest any solution...

follwing Code i am using for Paging...

           RadGridRow.AllowPaging = true;
           RadGridRow.PagerStyle.FirstPageImageUrl = "PagingFirst.gif";
            RadGridRow.PagerStyle.LastPageImageUrl = "PagingLast.gif";
            RadGridRow.PagerStyle.NextPageImageUrl = "PagingNext.gif";
            RadGridRow.PagerStyle.PrevPageImageUrl = "PagingPrev.gif";
          RadGridRow.PagerStyle.Mode =    GridPagerMode.NextPrevAndNumeric;
           RadGridRow.PagerStyle.PagerTextFormat = "Displaying Items {2} to {3} of {5}.";
0
Princy
Top achievements
Rank 2
answered on 13 Oct 2008, 06:27 AM
Hi Vinod,

I tried with the above given code on my end and it is working correctly. Try rebinding the Grid and see is if it helps.

CS:
 protected void RadGrid1_PreRender(object sender, EventArgs e) 
    { 
        RadGrid1.AllowPaging = true
        RadGrid1.PagerStyle.Mode = GridPagerMode.NextPrevAndNumeric; 
        RadGrid1.PagerStyle.FirstPageImageUrl = "Images/Pic1.gif"
        RadGrid1.PagerStyle.LastPageImageUrl = "Images/Pic2.gif"
        RadGrid1.PagerStyle.NextPageImageUrl = "Images/Pic3.gif"
        RadGrid1.PagerStyle.PrevPageImageUrl = "Images/Pic4.gif"
        RadGrid1.Rebind(); 
   } 


Princy
0
vinod
Top achievements
Rank 1
answered on 13 Oct 2008, 07:33 AM
hello Princy,

Now Works Fine.
the issue occurs due to  i am adding RadGridRow.Rebind() statement
in protected void RadGridRow_PreRender(object sender, EventArgs e)
event i just Removed this statement Paging &  Refresh Work fine...
Tags
Grid
Asked by
vinod
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
vinod
Top achievements
Rank 1
Princy
Top achievements
Rank 2
Share this question
or