We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

grid page control values

Thread ID:





50751 Oct 18,2006 08:15 AM Oct 19,2006 04:36 PM ASP.NET Web Forms (Classic) 3
Tags: GridGroupingControl
Asked On October 18, 2006 08:15 AM

I would like to manually extract what value was entered in the GotoPage text for the button bar control. I would also like to be able to set the page number total for the SelectPage button bar control if possible. We return some data from the db using our own filtering and page size code and I would like to use the syncfusion buttonbar control in the .cs for the web page. I am capturing the previous and next page events but don't know if I can get/set the value through code that is entered in the GogoPage item.

Thanks in advance,

Administrator [Syncfusion]
Replied On October 19, 2006 01:57 AM

Hi Sandy,

I assume you want to display Some number in the textbox in the ButtonBar, which is not the one by default, this is not possible directly and here is the workaround for doing this.

Copy the below script after closing the form tag in your aspx page. See the comments on the script for more details. please feel free to let us know if you face any issues.

script type="text/javascript">

//Here the Id is of the form grid''''s name + "GoToPageEdit" + "Button''''s Id"
// you will have to figure out your controls buttonID in your sample.
//one easy way is to see your html source and search for the ''''GoToPageEdit'''' string,

var pagerIndexVal=document.getElementById(''''GridGroupingControl1'''' + "GoToPageEdit" + "0~3");

//Say We need to display 1 on the text Box instead of '2' which will be by default. use the following code to do


// The OnBBGoToPageCl will be the function actually triggered when the ''''GoToPageEdit'''' button is clicked,
// so we write it locally and this will be getting triggered.

I assume you are trying to go to some page which is not a default option provided in textbox.

function OnBBGoToPageCl(evt, gridName, buttonId)

var gridObj = __EssentialGridCollection.Get(gridName);
//We are getting the page Index and then increasing the pageIndex internally because of we will have to move to
//page number 2, when the page number is ''''1''''
var pageIndex = document.getElementById(gridName + "GoToPageEdit" + buttonId).value;
pageIndex=Number(pageIndex)+1;// here instead of '1' you can use your own paging numbers.
gridObj.DoPostBack("GOTOPAGE:BB:" + pageIndex + ":" + buttonId);


Please feel free to let us know if you face any trouble when doing this.


Administrator [Syncfusion]
Replied On October 19, 2006 07:57 AM

Unfortunately I was doing this in the .cs page and could use the c# version of this please.

Sivakumar [Syncfusion]
Replied On October 19, 2006 04:36 PM

Hi Sandy,

I couldn't find any easy way to do this in server side, but one of the way to acheive this is, by getting the CurrentPage in the c# code and saving it in some hidden control's value, then in client side after the page is loaded, you can set the above value to the TextBox in the button bar as mentioned in the script.

Code for acheiving this :

In .cs file


Now in client side , you can get the value of the above HiddenControl and then set it to the textbox as mentioned in the previous post.

Hope we are on the right direction and this is what you are looking for.

Let us know if you need more info.



This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.