This is a migrated thread and some comments may be shown as answers.

work with data in window

1 Answer 45 Views
Window
This is a migrated thread and some comments may be shown as answers.
Kurt Kluth
Top achievements
Rank 1
Kurt Kluth asked on 28 Oct 2013, 08:06 PM
With the following code I have been able to pop-up a Radwindow with the results of my Radgrid populated.  What I would like is for the user to be able to now work with the data within that window.  (Sort, export, filter, etc.)  However whenever I go to do that it closes the window and I have to click the button again to see the filtered results.  Any suggestions on how to get it to stay?

When I have "EnableAJAX" set to false the result RadGrid show properly in the Results Window, however if I set it to "True" then it will not display properly. 

Suggestions on how to get this all to work as I hope it would? 
<telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server"
    LoadingPanelID="RadAjaxLoadingPanel1" Width="100%" EnableAJAX="True">


<telerik:RadWindowManager ID="RadWindowManager1" runat="server" width="700px" Height="525px" ReloadOnShow="True">
<Windows>
<telerik:RadWindow runat="server" ID="Window"
 
            Behaviors="Move, Resize, Close, Reload"
 
            VisibleStatusbar="false">
 
               <ContentTemplate>
               <telerik:RadGrid ID="_SearchResults" runat="server"
    AllowPaging="True" CellSpacing="0"
    GridLines="None" ShowGroupPanel="True"
    AllowSorting="True" PageSize="25" Width="100%" Height="700px"
    AllowFilteringByColumn="True" OnItemCommand="_SearchResults_ItemCommand">
    <GroupingSettings CaseSensitive="False" />
    <ExportSettings IgnorePaging="True" OpenInNewWindow="True"
        ExportOnlyData="True" FileName="CUCustomSearch">
        <Excel AutoFitImages="True" Format="ExcelML" />
        <Pdf PageHeight="210mm" PageWidth="297mm" DefaultFontFamily="Arial Unicode MS" PageTopMargin="45mm"
            BorderStyle="Medium" BorderColor="#666666">
        </Pdf>
    </ExportSettings>
    <ClientSettings AllowDragToGroup="True" AllowColumnsReorder="True"
        ReorderColumnsOnClient="True">
        <Scrolling AllowScroll="True" UseStaticHeaders="True" />
    </ClientSettings>
    <MasterTableView CommandItemDisplay="Top" InsertItemDisplay="Bottom" TableLayout="Fixed">
    <CommandItemSettings ShowAddNewRecordButton="False"
        ShowExportToCsvButton="False" ShowExportToExcelButton="true" ShowRefreshButton="False" ShowExportToPdfButton="True" />
        <RowIndicatorColumn FilterControlAltText="Filter RowIndicator column"
            Visible="True">
        </RowIndicatorColumn>
        <ExpandCollapseColumn FilterControlAltText="Filter ExpandColumn column"
            Visible="True">
        </ExpandCollapseColumn>
        <EditFormSettings>
            <EditColumn FilterControlAltText="Filter EditCommandColumn column">
            </EditColumn>
        </EditFormSettings>
    </MasterTableView>
    <FilterMenu EnableImageSprites="False">
    </FilterMenu>
</telerik:RadGrid>
</ContentTemplate>
</telerik:RadWindow>
</Windows>
 
 
</telerik:RadWindowManager>
Protected Sub _btnUpdateResults_Click(sender As Object, e As System.EventArgs) Handles _btnUpdateResults.Click
    SetCriteria()
    PopulateDateResults()
    Dim script As String = String.Format("function ShowRadWindow() {{ $find(""{0}"").show(); Sys.Application.remove_load(ShowRadWindow); }} Sys.Application.add_load(ShowRadWindow);", Me.Window.ClientID)
 
    RadScriptManager.RegisterStartupScript(Page, Page.[GetType](), "ShowRadWindow", script, True)
End Sub

1 Answer, 1 is accepted

Sort by
0
Marin Bratanov
Telerik team
answered on 29 Oct 2013, 06:56 AM
Hi Kurt,

Take a look at this article to see how to use AJAX in the ContentTemplate of a RadWindow: http://www.telerik.com/help/aspnet-ajax/radwindow-ajaxifying.html. You can add an UpdatePanel and call its Update() server method when you show the RadWindow, if its UpdateMode is Conditional.

I also advise that you move the RadWindow out of the RadWindowManager when its ContentTemplate is used.


Regards,
Marin Bratanov
Telerik
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
Tags
Window
Asked by
Kurt Kluth
Top achievements
Rank 1
Answers by
Marin Bratanov
Telerik team
Share this question
or