6 Answers, 1 is accepted
Here is the code snippet to highlight the current page number in the Grid pager. Give a try with the following code and see if it meets your requirement.
In RadGrid, when i click on pageIndex 4 first time . it show CurrentpagesIndex 0.
protected void Page_Load(object sender, EventArgs e)
int CurrentPageIndex = 0;
if (Session["EmployerCurrentPageIndex"] != null)
int.TryParse(Convert.ToString(Session["EmployerCurrentPageIndex"]), out CurrentPageIndex);
EmployerLinkGrid1.CurrentPageIndex = CurrentPageIndex;
string strCurrentPageIndex = EmployerLinkGrid1.MasterTableView.CurrentPageIndex.ToString();
protected void EmployerLinkGrid1_ItemCommand(object sender, GridCommandEventArgs e)
Session["EmployerCurrentPageIndex"] = EmployerLinkGrid1.CurrentPageIndex;
I check it many way, when click on PagesIndex 4 , it should not show 0. everytime it show previous value.
When click on pageIndex 4, it show 0
then click on pageIndex 1, it show 3
Its really confusing.
the Telerik Team
protected void EmployerLinkGrid1_PageIndexChanged(object sender, Telerik.Web.UI.GridPageChangedEventArgs e)
string str = e.NewPageIndex.ToString();
the Telerik team
Sweet exactly what I was searching for,
Works like a charm.
Thank you for the valuable feedback we received from you via email and here at the Telerik forums! It is much appreciated!
If the Telerik UI for ASP.NET AJAX suite does not match your requirements for solely C# development, you might be interested in to check our other offerings which are entirely C# based:
If you have any questions, please open a support ticket or open a new forum thread and we will be glad to provide the needed information and to assist you.
Our thoughts here at Progress are with those affected by the outbreak.