I am unable to exclude ajax enabled control (Button2) that resides inside panel (PanelButtons) as shown below. I tried to use the following code, I don't get any errors, but the button click is not working. I tried by using RadScriptManager's RegisterPostBackControl method. I also tried to disable AJAX via the OnRequestStart event as well as InitializeRequest event. None of them seems to work. So, is there any better solution for this scenario? Thanks.
<asp:Content runat="server" ContentPlaceHolderID="Content1">
<telerik:RadAjaxManagerProxy ID="RadAjaxManagerProxy1" runat="server">
<AjaxSettings>
<telerik:AjaxSetting AjaxControlID="RadGrid1">
<UpdatedControls>
<telerik:AjaxUpdatedControl ControlID="RadWindow1" />
<telerik:AjaxUpdatedControl ControlID="PanelButtons" />
</UpdatedControls>
</telerik:AjaxSetting>
</AjaxSettings>
</telerik:RadAjaxManagerProxy>
<telerik:RadGrid ID="RadGrid1" runat="server" OnNeedDataSource="RadGrid1_NeedDataSource">
<MasterTableView>
<Columns>
</Columns>
</MasterTableView>
<ClientSettings EnablePostBackOnRowClick="false" >
<Selecting AllowRowSelect="true" />
<ClientEvents OnRowClick="openRadWindow" OnRowSelected="RadGrid1_RowSelect" />
</ClientSettings>
</telerik:RadGrid>
<telerik:RadWindow ID="RadWindow1" runat="server" >
<ContentTemplate>
<div>...</div>
<asp:Panel ID="PanelButtons" runat="server">
<telerik:RadButton ID="Button1" Text="Save" runat="server">
<telerik:RadButton ID="Button2" Text="Save" runat="server" OnClientClicking="Button2_Click"
OnClick="Button2_Click" AutoPostBack="false">
<telerik:RadButton ID="Button3" Text="Save" runat="server">
<telerik:RadButton ID="Button4" Text="Save" runat="server">
</asp:Panel>
</ContentTemplate>
</telerik:RadWindow>
</asp:Content>
<telerik:RadCodeBlock runat="server">
<script type="text/javascript">
function pageLoad()
{
win = $find("<%= RadWindow1.ClientID %>");
}
function openRadWindow() {
win.show();
}
function Button2_Click()
{
__doPostBack("<%= Button2.ClientID %>", "");
}
</script>
</telerik:RadCodeBlock>
Server side:
protected void Page_Load(object sender, EventArgs e)
{
var mngr = RadScriptManager.GetCurrent(this.Page);
mngr.RegisterPostBackControl(Button2);
}