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

Open RadWindow from within RadGrid template column - image button

2 Answers 80 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Gavin
Top achievements
Rank 1
Gavin asked on 04 Nov 2015, 12:40 PM

On my aspx page I have a RadGrid with the following:

<telerik:GridTemplateColumn HeaderText="View Order Details" UniqueName="OrderDetails">
<ItemTemplate>
<div style="vertical-align: middle; text-align: center;">
<asp:ImageButton ID="btnOrder" ImageUrl="~\Content\Images\list.png" runat="server" Height="25px" Width="25px"  OnClick="openOrderDetails_Click"/>
</div>
</ItemTemplate>
</telerik:GridTemplateColumn>

 

I have also tried replacing the onclick method with the below and calling the relevant switch statement (after putting in the OnItemCommand in the grid) :

CommandName="OrderDetails" CommandArgument='<%# Bind("identity") %>'

 

I have a test button outside my radgrid and when I click on this the window opens without any issues:

<telerik:RadButton ID="test" runat="server" Text="Test" Skin="MetroTouch" OnClick="openOrderDetails_Click"></telerik:RadButton>

 

Can anyone help with getting this to open from the button within the grid

2 Answers, 1 is accepted

Sort by
0
Accepted
Marin Bratanov
Telerik team
answered on 04 Nov 2015, 01:31 PM

Hello Gavin,

I advise you start from the following articles on opening a RadWindow:

Thus, you can attach client-side handlers to the button that will do the job, much like shown in this demo: http://demos.telerik.com/aspnet-ajax/controls/examples/integration/gridandwindow/defaultcs.aspx?product=window (the handler is set from the code-behind but that is not really relevant).

As for the original problem - it is most likely due to AJAX being used and the RadWindow not being updated, especially if you try to show it via its VisibleOnPageLoad property.

Regards,

Marin Bratanov
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Gavin
Top achievements
Rank 1
answered on 04 Nov 2015, 02:28 PM

Hi Marin,

Attaching the client-side handlers to the button has done the trick! Thanks for the help with this

 Regards

Gavin

Tags
Grid
Asked by
Gavin
Top achievements
Rank 1
Answers by
Marin Bratanov
Telerik team
Gavin
Top achievements
Rank 1
Share this question
or