Hi there.
We have a Sharepoint application page and within the main content placeholder we want to host a RadWindow. Opening this window will show the user a search screen where they can enter a couple of parameters and when hitting "search" a Grid will be populated.
If we test the code in a separate page it all works fine, including paging and sorting the Grid's results (we want Ajax postbacks).
However when we have the same markup and same code included within the RadWindow, binding the Grid for the first time works, but then paging and sorting events never happen, the Grid just disappears. Here's the markup (simplified) in the page we're trying it to work:
...
And pretty much the code behind is about binding data to the grid (currently testing with Northwind).
Separately, in a simple ASPX page it all works, but here it doesn't:
Any clues on what can be happening? Why are the events not triggering?
Thank you very much.
We have a Sharepoint application page and within the main content placeholder we want to host a RadWindow. Opening this window will show the user a search screen where they can enter a couple of parameters and when hitting "search" a Grid will be populated.
If we test the code in a separate page it all works fine, including paging and sorting the Grid's results (we want Ajax postbacks).
However when we have the same markup and same code included within the RadWindow, binding the Grid for the first time works, but then paging and sorting events never happen, the Grid just disappears. Here's the markup (simplified) in the page we're trying it to work:
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server"> <AjaxSettings> <telerik:AjaxSetting AjaxControlID="btnSearchSIC"> <UpdatedControls> <telerik:AjaxUpdatedControl ControlID="grdTelerik" /> </UpdatedControls> </telerik:AjaxSetting> <telerik:AjaxSetting AjaxControlID="grdTelerik"> <UpdatedControls> <telerik:AjaxUpdatedControl ControlID="grdTelerik" /> </UpdatedControls> </telerik:AjaxSetting> </AjaxSettings> </telerik:RadAjaxManager>
...
<telerik:RadWindow runat="server" ID="RadWindow_ContentTemplate" Skin="Vista" KeepInScreenBounds="true" VisibleOnPageLoad="false" Modal="true" Title="Search Client" Behaviors="Close,Maximize,Move" Width="500" Height="500"> <ContentTemplate> <div> SIC Code: <telerik:RadTextBox ID="txtSICCode" runat="server" Text="" EmptyMessage="Enter SIC code" MaxLength="20" ShowButton="false" Skin="Vista"></telerik:RadTextBox><br /> SIC Description: <telerik:RadTextBox ID="txtSICDescription" runat="server" Text="" EmptyMessage="Enter SIC description" MaxLength="20" ShowButton="false" Skin="Vista"></telerik:RadTextBox><br /> <telerik:RadButton ID="btnSearchSIC" runat="server" Skin="Vista" Text="Search" ToolTip="Search SIC" AutoPostBack="true" OnClick="btnSearch_Click"> </telerik:RadButton><br /><br /> <telerik:RadGrid ID="grdTelerik" runat="server" Skin="Vista" ShowStatusBar="true" AllowSorting="true" AllowPaging="true" PageSize="10" OnSortCommand="grdTelerik_SortCommand" OnPageIndexChanged="grdTelerik_PageIndexChanged"> <PagerStyle Mode="NumericPages"></PagerStyle> <MasterTableView ClientDataKeyNames="Amount,Name"></MasterTableView> <ClientSettings EnableRowHoverStyle="true"> <Selecting AllowRowSelect="true" /> <ClientEvents OnRowDblClick="RowDblClick" /> </ClientSettings> </telerik:RadGrid> </div> </ContentTemplate> </telerik:RadWindow>
And pretty much the code behind is about binding data to the grid (currently testing with Northwind).
Separately, in a simple ASPX page it all works, but here it doesn't:
private void LoadData() { ISampleProvider provider = UnityHelper.Resolve<ISampleProvider>(); this.grdTelerik.DataSource = provider.GetCustomerOrderHistoryByName("ANTON"); this.grdTelerik.DataBind(); } protected void grdTelerik_PageIndexChanged(object source, Telerik.Web.UI.GridPageChangedEventArgs e) { LoadData(); } protected void grdTelerik_SortCommand(object source, Telerik.Web.UI.GridSortCommandEventArgs e) { LoadData(); } protected void btnSearch_Click(object sender, EventArgs e) { LoadData(); }
Any clues on what can be happening? Why are the events not triggering?
Thank you very much.