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

RadButtonColumn - OnClientClick call javascript

1 Answer 135 Views
Grid
This is a migrated thread and some comments may be shown as answers.
mSchmidt
Top achievements
Rank 1
mSchmidt asked on 03 Nov 2008, 07:09 PM

 

Hi i have a Grid where i have a GridButtonColumn which i would like when clicked to call a JavaScript method, which takes the ingredient_id as a parameter which in turn opens a RadWindow.

Is there any way for me to do something like the snippet below ?

<
telerik:GridButtonColumn ButtonType="ImageButton"

 

 

Text="Slet" UniqueName="DeleteColumn"

 

 

OnClientClick="openDeleteConfirm(<%# DataBinder.Eval(Container.DataItem, "ingredient_id") %>)">

 

 

</telerik:GridButtonColumn>

 

 

1 Answer, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 04 Nov 2008, 05:31 AM
Hi,

You can see a similar approach in the following online demo. In the demo a GridTemplateColumn with a hyperlink in its ItemTemplate has been used to open a Radwindow. You can either replace Hyperlink with an asp Button in the ItemTemplate or else you can use GridButtonColumn.
Window Editing

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