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. Image for the cookie policy date
close icon

Callback Question (Grid)

I have a GridGrouping control that has a popupcontainer dynamically built with a menu control that is assigned to a column in the grid. I also have some buttons that handle paging for the grid (I handle the paging by accessing the SQL datatable and manually binding to the Grid). The buttons for the paging work fine and I can page to the next page, previous page, etc. And the first time I load the page I can do a right-click on the header column that has the popup and get my menu to show up and work (I am displaying a graph if the user clicks the menu Graph item). The problem I have is that if I page to a new set of records (ie, new page) the popup menu no longer works. In the Page_Init routine I call BindButtons (this builds my popupcontainer and menus) right after I bind the datatable to the grid. If I click a NextPage button I am trying to call BindButtons right after I bind the new datatable to the grid. But no popup comes up. I have tried putting the call to BindButtons everywhere I can think of but it either breaks the paging (ie, no new data comes up if a button is clicked) or paging works but the popup still does not come up.

Thanks.
David.

4 Replies

AD Administrator Syncfusion Team October 12, 2006 02:10 PM UTC

Hi David,

Are you using ''Callback'' when you click on the ''Next Button''? and is it like you are getting this issue only when you are using Callback mode?

Sorry for any inconvenience caused

Thanks
A.Sivakumar


DA David A. Gonzales October 12, 2006 03:40 PM UTC

Yes,
This issue is with a Callback. The Next, Prev button clickes are handled by a onButtonClick() which is sent back through the __sfCallbackPanel1.callback(param) where param lets me know which button is pressed. Then the CallbackRefresh has something like the following:

if (myOp == "NextPage")
{
NextPage();
}

:
:

protected void NextPage()
{
DataTable dt = GetUserInfo(nStartRow, nEndRow)
this.GridGroupingControl1.DataMember = "defaultView";
this.GridGroupingControl1.DataSource = dt;
this.GridGroupingControl1.DataBind();

//Call routine to rebuild popup, menus, etc
BindButtons();
}

Thanks.
David.


AD Administrator Syncfusion Team October 12, 2006 06:11 PM UTC

Hi David.

Thanks for your detailed response. I think the issue you are facing should be because the popup and menus will not be inside the Callback panel directly.

Could you please keep these controls inside another callback panel and then use our Callback Multiplexer to trigger the Callback? In the CallbackMultiplexer1_Callback event you can refresh controls inside various Callback panel.

Please have a look at our LoginInfo sample that ship with our Essential Studio install. you can see this sample under Tools.Web/CallbackControls/LoginInfo Category.

Let us know if this helps.

Thanks,
A.Sivakumar


DA David A. Gonzales October 12, 2006 06:48 PM UTC

Thanks. I will take a look at the sample.

David.

Loader.
Live Chat Icon For mobile
Up arrow icon