Hi,
I am having radgrid and other controls like textbox in parent page .from parent page i open a radwindow and select some
values and when i close that radwinow ,i want to refresh my radgrid only not the other control so that it should show new values .Is that possible. if yes could u please tell me how.
Thanks
I am having radgrid and other controls like textbox in parent page .from parent page i open a radwindow and select some
values and when i close that radwinow ,i want to refresh my radgrid only not the other control so that it should show new values .Is that possible. if yes could u please tell me how.
Thanks
3 Answers, 1 is accepted
0
Shinu
Top achievements
Rank 2
answered on 16 Jun 2009, 07:36 AM
Hi Ratndeep,
Add RadAjaxManager on page so that you can call the AjaxRequest from "OnClientClose" client side event of RadWindow. Then rebind the RadGrid from server side, in "AjaxRequest" server event. Have a look at the following code snippet.
.aspx:
javascript:
.cs:
Hope this helps,
-Shinu.
Add RadAjaxManager on page so that you can call the AjaxRequest from "OnClientClose" client side event of RadWindow. Then rebind the RadGrid from server side, in "AjaxRequest" server event. Have a look at the following code snippet.
.aspx:
| <telerik:RadWindowManager ID="RadWindowManager1" runat="server"> |
| <Windows> |
| <telerik:RadWindow runat="server" Behavior="Default" InitialBehavior="None" OnClientClose="OnClientClose" NavigateUrl="MyPage.aspx" OpenerElementID="Button2" > |
| </telerik:RadWindow> |
| </Windows> |
| </telerik:RadWindowManager> |
| <telerik:radgrid id="RadGrid1" runat="server" datasourceid="SqlDataSource1" > |
| <MasterTableView DataSourceID="SqlDataSource1" EditMode="InPlace"> |
| <Columns> |
| . . . |
| </Columns> |
| </MasterTableView> |
| </telerik:radgrid> |
| <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" OnAjaxRequest="RadAjaxManager1_AjaxRequest"> |
| <AjaxSettings> |
| <telerik:AjaxSetting AjaxControlID="RadGrid1"> |
| <UpdatedControls> |
| <telerik:AjaxUpdatedControl ControlID="RadGrid1" /> |
| </UpdatedControls> |
| </telerik:AjaxSetting> |
| <telerik:AjaxSetting AjaxControlID="RadAjaxManager1"> |
| <UpdatedControls> |
| <telerik:AjaxUpdatedControl ControlID="RadGrid1" /> |
| </UpdatedControls> |
| </telerik:AjaxSetting> |
| </AjaxSettings> |
| </telerik:RadAjaxManager> |
| <asp:Button ID="Button2" runat="server" Text="Open Window" /> |
javascript:
| <script type="text/javascript"> |
| function OnClientClose() |
| { |
| $find("<%= RadAjaxManager1.ClientID %>").ajaxRequest(); |
| } |
| </script> |
.cs:
| protected void RadAjaxManager1_AjaxRequest(object sender, AjaxRequestEventArgs e) |
| { |
| RadGrid1.Rebind(); |
| } |
Hope this helps,
-Shinu.
0
Ratndeep
Top achievements
Rank 1
answered on 16 Jun 2009, 08:39 AM
Thanks for your reply shinu.
If i want to call this event in parent page when radwindow is closed .Could u please tell me how to do that..
If i want to call this event in parent page when radwindow is closed .Could u please tell me how to do that..
protected override void RaisePostBackEvent(IPostBackEventHandler sourceControl, string eventArgument)
{
}
0
Nirmal
Top achievements
Rank 1
answered on 16 Jun 2009, 11:49 AM
Hi,
Just add it in ur clientwindow close.
Just add it in ur clientwindow close.
function
CancelEdit()
{
GetRadWindow().Close();
GetRadWindow().BrowserWindow.refreshList();
}
parentwindow:
function refreshList()
{
$find(
"<%= RadAjaxManager1.ClientID %>").ajaxRequest();
}
Nirmal