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

[Solved] How to rebind RadGrid that resides in PlaceHolder

2 Answers 106 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Kem Arda
Top achievements
Rank 1
Kem Arda asked on 18 Sep 2009, 09:15 AM
First let me explain my scenario:

I have a Default.aspx on which resides a PlaceHolder. I add user controls (ascx) to controls of PlaceHolder. On that user controls, i have RadGrids by which i insert/update/delete records. I popup another aspx from RadGrid to insert/update/delete records. When i insert/update/delete over this popup i use following codes:

on PopUp.aspx:

function

CloseAndRebind(args)

 

{

GetRadWindow().Close();

GetRadWindow().BrowserWindow.refreshGrid(args);  // refreshGrid here refers to  codes from which that popup is called(ascx)

}


on usercontrol.ascx:

 

function

 

 

refreshGrid(arg)

 

{

 

 

 

if(!arg)

 

{

$find(

 

 

"<%= RadAjaxManager1.ClientID %>").ajaxRequest("Rebind");

 

}

 

 

 

else

 

 

 

 

 

 

{

$find(

 

 

"<%= RadAjaxManager1.ClientID %>").ajaxRequest("RebindAndNavigate");

 

}

}

on usercontrol.ascx.cs:

 

 

 

 

protected void RadAjaxManager1_AjaxRequest(object sender, AjaxRequestEventArgs e)

 

{

 

 

 

if (e.Argument == "Rebind")

 

{

RadGridHizmetler.MasterTableView.SortExpressions.Clear();

RadGridHizmetler.MasterTableView.GroupByExpressions.Clear();

RadGridHizmetler.Rebind();

}

 

 

 

else if (e.Argument == "RebindAndNavigate")

 

{

RadGridHizmetler.MasterTableView.SortExpressions.Clear();

RadGridHizmetler.MasterTableView.GroupByExpressions.Clear();

RadGridHizmetler.MasterTableView.CurrentPageIndex = RadGridHizmetler.MasterTableView.PageCount - 1;

RadGridHizmetler.Rebind();

}

}

Popup is closed and (for instance) new record is inserted to the database. That is ok. However when i click nextpage or last page  of RadGrid(on ascx that has been added to control of PlaceHolder), RadGrid just disappears. When i  click  any page number nothing happens and when i click another page number(at the second try) RadGrid disappears again.

How can i resolve this?  Thanks...

 

 

 

 

 

 

2 Answers, 1 is accepted

Sort by
0
Yavor
Telerik team
answered on 23 Sep 2009, 01:22 PM
Hi Kem,

The problem description makes me suspect that there is a problem with the way the grid is databound.
To further investigate this, please open a formal support ticket, and send us a small working project, demonstrating your logic, and showing the discrepancy. We will review it locally, and get back to you with additional information.

Sincerely yours,
Yavor
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Kem Arda
Top achievements
Rank 1
answered on 24 Sep 2009, 01:30 PM
Thanks, actually i have resolved it.
Tags
Grid
Asked by
Kem Arda
Top achievements
Rank 1
Answers by
Yavor
Telerik team
Kem Arda
Top achievements
Rank 1
Share this question
or