i want to open a radwindow from a button in a radgrid. the grid has ajax settings so that it can filter columns and display loading image without postback. However that appears to prevent the radwindow from displaying when a radgrid button is clicked (i think because a postback doesn't occur because i can step through the code that opens the window but the screen doesn't update). If i use a button outside the grid then the window pops up.
so my question is what's the best way to get the window to pop up from a button in the grid and still allow the ajax column filtering? i thought if i could force the buttons in the grid to postback then the window will pop up just like it does with the buttons outside the grid. The client setting EnablePostBackOnRowClick sounds promising but the buttons still aren't causing a postback.
Here's some code in case it helps:
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
<AjaxSettings>
<telerik:AjaxSetting AjaxControlID="AccountGrid">
<UpdatedControls>
<telerik:AjaxUpdatedControl ControlID="AccountGrid" LoadingPanelID="RadAjaxLoadingPanel1" />
</UpdatedControls>
</telerik:AjaxSetting>
</AjaxSettings>
</telerik:RadAjaxManager>
<telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" BackgroundPosition="Center" Transparency="25">
<div class="loading" style="width:100%; height:100%; background-color:#ddd">
<img src="./../../images/loading.gif" style="position:relative; top:120px;" />
</div>
</telerik:RadAjaxLoadingPanel>
<asp:Button ID="PopUpWindowButton" runat="server" OnClick="PopUpWindowButton_Click" Text="Pop Up Window" />
<telerik:RadGrid ID="AccountGrid" runat="server"
DataSourceID="AccountSqlDataSource" OnItemCommand="AccountGrid_ItemCommand"
AutoGenerateColumns="false" AllowFilteringByColumn="True"
AllowSorting="true" AllowPaging="True" PageSize="15" ShowFooter="True"
BorderStyle="Solid">
<ClientSettings EnablePostBackOnRowClick="true">
</ClientSettings>
<GroupingSettings CaseSensitive="false" />
<AlternatingItemStyle BorderStyle="Solid" />
<MasterTableView>
<Columns>
<telerik:GridButtonColumn Text="Select" CommandName="Select" UniqueName="SelectColumn" ButtonCssClass="ButtonSmGray" AutoPostBackOnFilter="true" />
<telerik:GridNumericColumn
DataField="AccountID" UniqueName="AccountNumberColumn" HeaderText="Account #"
FilterDelay="1000" AutoPostBackOnFilter="true" FilterControlWidth="60" ShowFilterIcon="false">
</telerik:GridNumericColumn>
<telerik:GridBoundColumn
DataField="Phone" UniqueName="PhoneColumn" HeaderText="Phone"
FilterDelay="1000" AutoPostBackOnFilter="true" CurrentFilterFunction="Contains" ShowFilterIcon="false">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn
DataField="ContactName" UniqueName="NameColumn" HeaderText="Name"
FilterDelay="1000" AutoPostBackOnFilter="true" CurrentFilterFunction="Contains" ShowFilterIcon="false" FilterControlWidth="70">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn
DataField="Address" UniqueName="AddressColumn" HeaderText="Address"
FilterDelay="1000" AutoPostBackOnFilter="true" ShowFilterIcon="false">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn
DataField="City" UniqueName="CityColumn" HeaderText="City"
FilterDelay="1000" AutoPostBackOnFilter="true" CurrentFilterFunction="Contains" ShowFilterIcon="false">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn
DataField="State" UniqueName="StateColumn" HeaderText="State"
FilterDelay="1000" AutoPostBackOnFilter="true" CurrentFilterFunction="Contains" ShowFilterIcon="false">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn
DataField="DisplayZipCode" UniqueName="ZipColumn" HeaderText="Zip"
FilterDelay="1000" AutoPostBackOnFilter="true" CurrentFilterFunction="Contains" ShowFilterIcon="false">
</telerik:GridBoundColumn>
</Columns>
</MasterTableView>
<ActiveItemStyle BorderStyle="Solid" />
<HeaderContextMenu EnableAutoScroll="True"></HeaderContextMenu>
</telerik:RadGrid>
so my question is what's the best way to get the window to pop up from a button in the grid and still allow the ajax column filtering? i thought if i could force the buttons in the grid to postback then the window will pop up just like it does with the buttons outside the grid. The client setting EnablePostBackOnRowClick sounds promising but the buttons still aren't causing a postback.
Here's some code in case it helps:
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
<AjaxSettings>
<telerik:AjaxSetting AjaxControlID="AccountGrid">
<UpdatedControls>
<telerik:AjaxUpdatedControl ControlID="AccountGrid" LoadingPanelID="RadAjaxLoadingPanel1" />
</UpdatedControls>
</telerik:AjaxSetting>
</AjaxSettings>
</telerik:RadAjaxManager>
<telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" BackgroundPosition="Center" Transparency="25">
<div class="loading" style="width:100%; height:100%; background-color:#ddd">
<img src="./../../images/loading.gif" style="position:relative; top:120px;" />
</div>
</telerik:RadAjaxLoadingPanel>
<asp:Button ID="PopUpWindowButton" runat="server" OnClick="PopUpWindowButton_Click" Text="Pop Up Window" />
<telerik:RadGrid ID="AccountGrid" runat="server"
DataSourceID="AccountSqlDataSource" OnItemCommand="AccountGrid_ItemCommand"
AutoGenerateColumns="false" AllowFilteringByColumn="True"
AllowSorting="true" AllowPaging="True" PageSize="15" ShowFooter="True"
BorderStyle="Solid">
<ClientSettings EnablePostBackOnRowClick="true">
</ClientSettings>
<GroupingSettings CaseSensitive="false" />
<AlternatingItemStyle BorderStyle="Solid" />
<MasterTableView>
<Columns>
<telerik:GridButtonColumn Text="Select" CommandName="Select" UniqueName="SelectColumn" ButtonCssClass="ButtonSmGray" AutoPostBackOnFilter="true" />
<telerik:GridNumericColumn
DataField="AccountID" UniqueName="AccountNumberColumn" HeaderText="Account #"
FilterDelay="1000" AutoPostBackOnFilter="true" FilterControlWidth="60" ShowFilterIcon="false">
</telerik:GridNumericColumn>
<telerik:GridBoundColumn
DataField="Phone" UniqueName="PhoneColumn" HeaderText="Phone"
FilterDelay="1000" AutoPostBackOnFilter="true" CurrentFilterFunction="Contains" ShowFilterIcon="false">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn
DataField="ContactName" UniqueName="NameColumn" HeaderText="Name"
FilterDelay="1000" AutoPostBackOnFilter="true" CurrentFilterFunction="Contains" ShowFilterIcon="false" FilterControlWidth="70">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn
DataField="Address" UniqueName="AddressColumn" HeaderText="Address"
FilterDelay="1000" AutoPostBackOnFilter="true" ShowFilterIcon="false">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn
DataField="City" UniqueName="CityColumn" HeaderText="City"
FilterDelay="1000" AutoPostBackOnFilter="true" CurrentFilterFunction="Contains" ShowFilterIcon="false">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn
DataField="State" UniqueName="StateColumn" HeaderText="State"
FilterDelay="1000" AutoPostBackOnFilter="true" CurrentFilterFunction="Contains" ShowFilterIcon="false">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn
DataField="DisplayZipCode" UniqueName="ZipColumn" HeaderText="Zip"
FilterDelay="1000" AutoPostBackOnFilter="true" CurrentFilterFunction="Contains" ShowFilterIcon="false">
</telerik:GridBoundColumn>
</Columns>
</MasterTableView>
<ActiveItemStyle BorderStyle="Solid" />
<HeaderContextMenu EnableAutoScroll="True"></HeaderContextMenu>
</telerik:RadGrid>