[Webinar] Streamline your web hosting managementRegister Today

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1827
  • Last Modified:

Using telerik rad modal window from rad grid

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.
  • 2
1 Solution
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">

beginner_helpAuthor Commented:
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.
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

Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now