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

Open radwindow using gridbuttoncolumn of radgrid

1 Answer 304 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Naveen kumar
Top achievements
Rank 1
Naveen kumar asked on 22 Oct 2012, 01:39 PM
Hi All,
   I have a scenario where when I click a gridbuttoncolumn of a radgrid with buttontype as linkbutton would like to open a radwindow which should display a .aspx page. ALL should be done dynamically from code behind.


1 Answer, 1 is accepted

Sort by
0
Accepted
Shinu
Top achievements
Rank 2
answered on 25 Oct 2012, 04:35 AM
Hi,

Please take a look into the following code snippet I tried.

ASPX:
<telerik:RadWindowManager ID="RadWindowManager1" runat="server"></telerik:RadWindowManager>
<telerik:RadGrid ID="RadGrid1" runat="server" DataSourceID="SqlDataSource1" AutoGenerateColumns="false">
    <MasterTableView>
       <Columns>
          <telerik:GridButtonColumn Text="link" UniqueName="link" CommandName="window"></telerik:GridButtonColumn>
       </Columns>
    </MasterTableView>
</telerik:RadGrid>

C#:
protected void RadGrid1_ItemCommand(object sender, GridCommandEventArgs e)
{
    if (e.CommandName == "window")
    {
        RadWindow win = new RadWindow();
        win.ID = "window1";
        win.VisibleOnPageLoad = true;
        win.NavigateUrl = "Display dtae.aspx";
        RadWindowManager1.Controls.Add(win);
    }
}

Thanks,
Shinu.
Tags
Grid
Asked by
Naveen kumar
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Share this question
or