hi,
I have a project with a page that contains 2 radgrids.
in code behind I open a radwindow that does an update on a row in one grid, and changes the status, so that it appears in the other grid.
this is the code for opening the window
Now, upon returning he fires the clientside Refresh function which contains following code:
<telerik:RadCodeBlock ID="Block2" runat="server">
<script type="text/javascript">
function RefreshGrid() {
var grdGeneralOverview = $find("<%= grdGeneralOverview.ClientID %>").get_masterTableView();
grdGeneralOverview.rebind();
var grdApproveDecline = $find("<%= grdApproveDecline.ClientID %>").get_masterTableView();
grdApproveDecline.rebind();
</script>
</telerik:RadCodeBlock>
The OnNeedDatasource functions for both grids in code behind are fired, and the datasources contain the updated data for both grids.
However, and this is the catch, on the screen only the second grid is updated (grdApproveDecline
)
if I switch the 2 rebinds around, the other gets updated on screen.
Does anyone know why this happens?
I have a project with a page that contains 2 radgrids.
in code behind I open a radwindow that does an update on a row in one grid, and changes the status, so that it appears in the other grid.
this is the code for opening the window
RadWindow ConfirmWindow = new RadWindow();
<
br
>ConfirmWindow.NavigateUrl = "HolidayApproveDecline.aspx?Type=" + ((Byte)Type).ToString() + "&IDs=" + IDBuilder.ToString();<
br
>ConfirmWindow.Width = 450;
<
br
> ConfirmWindow.Height = 430;
<
br
> ConfirmWindow.ID = "wndUserAddHoliday";
<
br
> ConfirmWindow.VisibleOnPageLoad = true;
<
br
> ConfirmWindow.OnClientClose = "RefreshGrid";
<
br
> ConfirmWindow.VisibleStatusbar = false;
<
br
> ConfirmWindow.IconUrl = "../Images/address_book.png";
<
br
> ConfirmWindow.Title = "Bevestigen";
<
br
> WindowBehaviors Behaviors = new WindowBehaviors();
<
br
> Behaviors |= WindowBehaviors.Close;
<
br
> ConfirmWindow.Behaviors = Behaviors;<
br
>
<
br
> ConfirmWindow.Modal = true;<
br
> RadWindowManager MasterWindowManager = (RadWindowManager)this.Master.FindControl("MasterWindowManager");<
br
> MasterWindowManager.Windows.Add(ConfirmWindow);
Now, upon returning he fires the clientside Refresh function which contains following code:
<telerik:RadCodeBlock ID="Block2" runat="server">
<script type="text/javascript">
function RefreshGrid() {
var grdGeneralOverview = $find("<%= grdGeneralOverview.ClientID %>").get_masterTableView();
grdGeneralOverview.rebind();
var grdApproveDecline = $find("<%= grdApproveDecline.ClientID %>").get_masterTableView();
grdApproveDecline.rebind();
</script>
</telerik:RadCodeBlock>
The OnNeedDatasource functions for both grids in code behind are fired, and the datasources contain the updated data for both grids.
However, and this is the catch, on the screen only the second grid is updated (grdApproveDecline
)
if I switch the 2 rebinds around, the other gets updated on screen.
Does anyone know why this happens?