Using telerik rad modal window from rad grid

Posted on 2011-10-20
Last Modified: 2013-12-16
I have a telerik rad grid. When I select a row on the grid,
 I want to a open telerik rad modal window and display the values in the rad modal window.
I am able to capture the values of the selected using SelectedIndexChanged property of rad grid control.
Please help mewith the pop up window when a row is selected.
Question by:beginner_help
    LVL 14

    Expert Comment

    Have you thought about using the radgrid built in modal popup for editing rows / fields?  Its as simple as setting the editmode in the MasterTableView.

    <MasterTableView Width="100%" PageSize="13" Name="Sectors" DataKeyNames="Sector" EditMode="InPlace">


    Author Comment

    I do not want to edit the values in the rad grid. I just want to export the some of values from the selected row to pop up window on the button click.
    LVL 14

    Accepted Solution

    You don't have to necessarily edit them you can just specify in the edit template of the grid to show the values as a label... Ive done this on several occasions.  This is probably the quickest and smiliest was to make it work however, with that being said another way you could do it is use the item command telerik event like so:

            protected void rgMain_ItemCommand(object source, GridCommandEventArgs e)
                this.lblError.Visible = false;
                this.lblMessage.Visible = false;
                GridDataItem currentGridItem = this.rgMain.Items[Convert.ToInt32(e.CommandArgument)];
                if (e.CommandName == "ExecuteLink")
                    string body = string.Empty;
                    int vendorID = Convert.ToInt32(Server.HtmlDecode(currentGridItem["CurrentVendorID"].Text));
                    int proposalID = Convert.ToInt32(Server.HtmlDecode(currentGridItem["ProposalID"].Text));
                    _proposal.ProposalID = proposalID;
                    DropDownList dropCommands = currentGridItem.FindControl("dropCommands") as DropDownList;
                    switch (Convert.ToInt32(dropCommands.SelectedValue))
                        case 0:     //edit
                            Server.Transfer("~/Forms/Portals/Employee/Sales/ProposalEdit.aspx?Var=" + proposalID.ToString() + "&Loc=" + base.LocationQueryString);

    Open in new window


    Featured Post

    How your wiki can always stay up-to-date

    Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
    - Increase transparency
    - Onboard new hires faster
    - Access from mobile/offline

    Join & Write a Comment

    Suggested Solutions

    Wouldn’t it be nice if you could test whether an element is contained in an array by using a Contains method just like the one available on List objects? Wouldn’t it be good if you could write code like this? (CODE) In .NET 3.5, this is possible…
    A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
    This video discusses moving either the default database or any database to a new volume.
    In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor ( If you're interested in additional methods for monitoring bandwidt…

    734 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    19 Experts available now in Live!

    Get 1:1 Help Now