How to set a RadWindow to be visible on a page with a RadAjaxPanel and a two second refresh timer.

1 Answer 268 Views
Ajax Grid Window
Jack
Top achievements
Rank 1
Jack asked on 08 Dec 2021, 03:17 PM

Hello,

To provide a bit of background, I have a page which refreshes it's data every two seconds but doesn't actually visibly refresh (By using a RadAjaxPanel). I'd like to click a button on a data row and populate the data from that row into a RadWindow (Like an edit dialog), and also have additional buttons in that dialog for various operations.

I have a RadWindow and code attached to a button which should set the RadWindow to be visible, however the RadWindow does not appear.

Example Code:

In Example.aspx -

<telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server" Style="width: 100%">

//////Some MasterTableViews and RadGrids with various data here with buttons to pop up an edit dialog////

</telerik:RadAjaxPanel>

<telerik:radwindow runat="server" id="RadWindow1" Visible="False">
    <ContentTemplate>
        <asp:UpdatePanel ID="Updatepanel1" runat="server" UpdateMode="Conditional">
            <ContentTemplate>
                <asp:Label ID="Label1" Text="I am an example" runat="server" />
            </ContentTemplate>
        </asp:UpdatePanel>
    </ContentTemplate>
</telerik:radwindow>

In Example.aspx.cs

   protected void RadGrid_ItemCommand(object sender, GridCommandEventArgs e)
    {

         this.RadWindow1.Visible= true;

}

 

When I click the button in the RadGrid to set the RadWindow to be visible, the .cs code executes but the RadWindow does not appear on the page.

 

Any help will be much appreciated.

 

Thanks,

 

Jack

1 Answer, 1 is accepted

Sort by
0
Attila Antal
Telerik team
answered on 13 Dec 2021, 12:34 PM

Hi Jack,

We have an online Example showing how to use RadWindow to edit Grid records, see Edit Dialog for RadGrid

In general, opening Telerik RadWindows can be done either by setting the VisibleOnPageLoad property to True, or by executing a JavaScript code. 

Check out the following articles:

You can also open the Windows from the server by Registering a StartupScript. This script will be executed upon Page load, see Executing JavaScript Code from Server-side in Web Forms and ASP.NET AJAX.

Regards,
Attila Antal
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Tags
Ajax Grid Window
Asked by
Jack
Top achievements
Rank 1
Answers by
Attila Antal
Telerik team
Share this question
or