Hi all, I have a radgrid that triggers an opening of a radwindow which is inside of a user control. This user control handles the update and insertion of data and then closes to refresh the grid. However, everything seems to work fine except for refreshing the grid, and I can't seem to figure out why.
Here is the main page:
<
telerik:RadAjaxLoadingPanel
ID
=
"RadAjaxLoadingPanel1"
runat
=
"server"
Skin
=
"Silk"
>
</
telerik:RadAjaxLoadingPanel
>
<
telerik:RadAjaxManager
ID
=
"RadAjaxManager1"
runat
=
"server"
ClientEvents-OnResponseEnd
=
"responseEnd"
>
<
AjaxSettings
>
<
telerik:AjaxSetting
AjaxControlID
=
"telerik"
>
<
UpdatedControls
>
<
telerik:AjaxUpdatedControl
ControlID
=
"RadAjaxPanel1"
/>
<
telerik:AjaxUpdatedControl
ControlID
=
"telerik"
/>
<
telerik:AjaxUpdatedControl
ControlID
=
"contactEditor"
/>
</
UpdatedControls
>
</
telerik:AjaxSetting
>
</
AjaxSettings
>
</
telerik:RadAjaxManager
>
<
telerik:RadAjaxPanel
ID
=
"RadAjaxPanel1"
runat
=
"server"
LoadingPanelID
=
"RadAjaxLoadingPanel1"
>
<
telerik:RadGrid
runat
=
"server"
ID
=
"telerik"
AutoGenerateColumns
=
"False"
OnNeedDataSource
=
"telerik_OnNeedDataSource"
OnInsertCommand
=
"telerik_OnInsertCommand"
OnUpdateCommand
=
"telerik_OnUpdateCommand"
OnItemDataBound
=
"telerik_OnItemDataBound"
GroupingSettings-CaseSensitive
=
"False"
OnItemCommand
=
"telerik_OnItemCommand"
>
<
MasterTableView
DataKeyNames
=
"PRIMARY_KEY"
>
<
Columns
>
<
telerik:GridButtonColumn
ButtonType
=
"ImageButton"
Text
=
"E"
CommandName
=
"Edit2"
HeaderText
=
"Edit"
/>
<%-- My other columns to display --%>
</
Columns
>
</
MasterTableView
>
<
ClientSettings
Resizing-AllowColumnResize
=
"True"
Scrolling-AllowScroll
=
"True"
Selecting-AllowRowSelect
=
"True"
ClientEvents-OnPopUpShowing
=
"PopUpShowing"
/>
</
telerik:RadGrid
>
<
icl:ContactEditor
runat
=
"server"
ID
=
"contactEditor"
OnCommitedEvent
=
"contactEditor_OnCommitedEvent"
/>
</
telerik:RadAjaxPanel
>
​Here is the user control:
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="ContactEditor.ascx.cs" Inherits="ICL_V2.controls.ContactEditor" %>
<
telerik:RadWindow
ID
=
"radwindow"
runat
=
"server"
MinWidth
=
"600px"
AutoSize
=
"True"
DestroyOnClose
=
"True"
Behaviors
=
"Move,Resize, Close"
>
<
ContentTemplate
>
<
telerik:RadAjaxPanel
ID
=
"RadAjaxPanel1"
runat
=
"server"
LoadingPanelID
=
"RadAjaxLoadingPanel1"
>
<
telerik:RadAjaxManagerProxy
ID
=
"RadAjaxManagerProxy1"
runat
=
"server"
>
<
AjaxSettings
>
<
telerik:AjaxSetting
AjaxControlID
=
"btnCommit"
/>
</
AjaxSettings
>
</
telerik:RadAjaxManagerProxy
>
<
div
class
=
"form-template"
>
<
table
>
<%-- My textbox's and dropdowns --%>
</
table
>
<
asp:Button
ID
=
"btnCommit"
runat
=
"server"
class
=
"form-cmd-button"
ValidationGroup
=
"form"
OnClick
=
"btnCommit_OnClick"
/>
</
div
>
</
telerik:RadAjaxPanel
>
</
ContentTemplate
>
</
telerik:RadWindow
>
​When btnCommit is pressed, the corresponding db update/insert is done and then the event OnCommittedEvent is triggered to refresh the grid. The end of the btn click event:
CloseWindow();
OnCommitedEvent(EventArgs.Empty);
And then back in the main page
protected void contactEditor_OnCommitedEvent(object sender, EventArgs e)
{
setDataSource();
telerik.Rebind();
}
{
setDataSource();
telerik.Rebind();
}
This all works without any ajax enabled, but when the ajax is enabled everything works except for the grid refresh at the end. Can anyone point me in the right direction here?
Thanks!