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

Custom Paging

3 Answers 75 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Karthik
Top achievements
Rank 1
Karthik asked on 19 Feb 2014, 12:16 PM
Hi,
I am using radgrid and binding the grid from client side and my requirement is I need to enter custom page  number like GoTo "x" page number instead of clicking on the grid footer and the grid need to hold the sorting before and after the jump from one page to other

Currently m implemented GoTo feature out side the grid and facing the problem with sort expression, Please suggest

3 Answers, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 19 Feb 2014, 12:55 PM
Hi Karthik,

I guess you want to page through the RadGrid by entering the page number. You can use the PagerStyle, Mode="Advanced". Please take a look at this documentation on Pager Item for different pager modes.

ASPX:
<telerik:RadGrid ID="RadGrid1" runat="server" >         
 <PagerStyle Mode="Advanced" />
    <MasterTableView>
      . . . . .

Thanks,
Princy
0
Karthik
Top achievements
Rank 1
answered on 19 Feb 2014, 01:53 PM
Hi Princy,

Thanks for Your suggestion it is very helpful but i want to increase width of page number text box as it is good only for one digit and i nee to show more than 3 digits in some cases,

Please refer to the attachment and suggest

thanks  in advance
0
Princy
Top achievements
Rank 2
answered on 20 Feb 2014, 04:37 AM
Hi Karthik,

You can try the following code snippet to increase the textbox width in the ItemCreated event of the RadGrid.

C#:
protected void RadGrid1_ItemCreated(object sender, GridItemEventArgs e)
{
  if (e.Item is GridPagerItem)
  {
     RadNumericTextBox ChangePageSizeTextBox = (RadNumericTextBox)e.Item.FindControl("ChangePageSizeTextBox");
     ChangePageSizeTextBox.Width = Unit.Pixel(100);
  }
}

Please take a look at this article to know more about Accessing the Elements of Advanced Type Pager.

Thanks,
Princy
Tags
Grid
Asked by
Karthik
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Karthik
Top achievements
Rank 1
Share this question
or