Hi,
I am using 2 RadGrids (master/detail) and RadAjaxManager to Ajaxify master detail loading and editing.
To edit the rows in the detail grid I use template columns with asp:Link controls for three different scenarios.
1> Edit (this opens a RadWindow with an edit form)
2> Deactivate/Activate (this opens a different RadWindow for confirmation) - Status column
3> Show/Hide (this also opens a RadWindow for confirmation) - Status column
There is also a Deactivate/Reactivate all link in the filteritem for a Status column (along with a RadComboBox for filtering).
All this functionality is working as desired with the details grid updated using Ajax on row select from the master grid and the filter combobox and various other buttons on the page updating the details grid correctly.
On closing the various Edit/Confirm windows I use a client-side AjaxRequest("Rebind") and handle the ajax request server-side with the ajax manager's OnAjaxRequest event handler (as demonstrated in various Telerik demos).
My one remaining issue is due to the fact that when returning from the "Edit" window I need to update the master grid as well as the detail grid to update various aggregate columns for the master grid. For all the "Confirm" windows, only the details grid needs to be updated.
Using the above code for the radajaxmanager settings I update the controls correctly when a detail row (resource) is edited. But, of course, when a resource is deactivated or hidden etc. the master (unit) grid is also retrieved with the Ajax update (not updated but still adding large size to the response)
I have used RadAjaxWithTarget to update only the resource grid from other controls on the page (asp buttons with onclientclick and onclick event handlers and relevant radajaxmanager settings for the button controls) but when attempting to do this on return from window close I am unsure of what target to use or what arguments.
I attempted to add a "refresh grid" button with Visible="false" and use this as the target then perform the grid refresh in it's onclick event handler as follows:
Script called on window close:
Relevant RadAjaxManager Settings and button control:
Code behind:
Unfortunately this causes a full postback despite the ajax settings suggesting an ajax update on only the resources grid should be performed.
Any ideas?
I am using 2 RadGrids (master/detail) and RadAjaxManager to Ajaxify master detail loading and editing.
To edit the rows in the detail grid I use template columns with asp:Link controls for three different scenarios.
1> Edit (this opens a RadWindow with an edit form)
2> Deactivate/Activate (this opens a different RadWindow for confirmation) - Status column
3> Show/Hide (this also opens a RadWindow for confirmation) - Status column
There is also a Deactivate/Reactivate all link in the filteritem for a Status column (along with a RadComboBox for filtering).
All this functionality is working as desired with the details grid updated using Ajax on row select from the master grid and the filter combobox and various other buttons on the page updating the details grid correctly.
On closing the various Edit/Confirm windows I use a client-side AjaxRequest("Rebind") and handle the ajax request server-side with the ajax manager's OnAjaxRequest event handler (as demonstrated in various Telerik demos).
My one remaining issue is due to the fact that when returning from the "Edit" window I need to update the master grid as well as the detail grid to update various aggregate columns for the master grid. For all the "Confirm" windows, only the details grid needs to be updated.
<
telerik:RadAjaxManager
runat
=
"server"
ID
=
"ramResourceManagement"
OnAjaxRequest
=
"ramResourceManagement_AjaxRequest"
>
<
AjaxSettings
>
...
<
telerik:AjaxSetting
AjaxControlID
=
"ramResourceManagement"
>
<
UpdatedControls
>
<
telerik:AjaxUpdatedControl
ControlID
=
"gridUnits"
LoadingPanelID
=
"ralpResourceManager"
/>
<
telerik:AjaxUpdatedControl
ControlID
=
"gridResources"
LoadingPanelID
=
"ralpResourceManager"
/>
<
telerik:AjaxUpdatedControl
ControlID
=
"headerPanel"
/>
</
UpdatedControls
>
</
telerik:AjaxSetting
>
...
</
AjaxSettings
>
</
telerik:RadAjaxManager
>
<
telerik:RadAjaxLoadingPanel
ID
=
"ralpResourceManager"
runat
=
"server"
EnableEmbeddedSkins
=
"false"
/>
Using the above code for the radajaxmanager settings I update the controls correctly when a detail row (resource) is edited. But, of course, when a resource is deactivated or hidden etc. the master (unit) grid is also retrieved with the Ajax update (not updated but still adding large size to the response)
I have used RadAjaxWithTarget to update only the resource grid from other controls on the page (asp buttons with onclientclick and onclick event handlers and relevant radajaxmanager settings for the button controls) but when attempting to do this on return from window close I am unsure of what target to use or what arguments.
I attempted to add a "refresh grid" button with Visible="false" and use this as the target then perform the grid refresh in it's onclick event handler as follows:
Script called on window close:
function
RefreshResourceGrid()
{
$find(
"<%=ramResourceManagement.ClientID %>"
).ajaxRequestWithTarget(
"<%= btn_refreshGrid.UniqueID %>"
,
""
);
}
Relevant RadAjaxManager Settings and button control:
<
telerik:AjaxSetting
AjaxControlID
=
"btn_refreshGrid"
>
<
UpdatedControls
>
<
telerik:AjaxUpdatedControl
ControlID
=
"gridResources"
LoadingPanelID
=
"ralpResourceManager"
/>
</
UpdatedControls
>
</
telerik:AjaxSetting
>
<
asp:Button
runat
=
"server"
ID
=
"btn_refreshGrid"
OnClick
=
"btn_refreshGrid_Click"
CausesValidation
=
"false"
Visible
=
"false"
/>
Code behind:
protected
void
btn_refreshGrid
_Click(
object
sender, EventArgs e)
{
BindResources();
}
Unfortunately this causes a full postback despite the ajax settings suggesting an ajax update on only the resources grid should be performed.
Any ideas?