DataGrid Button Colums Javascript !!

A

Amit Garg

Hi !!
I am using datagrid control with a button column i want to associate
some javascript code onto that button. it is possible and if yes how ??

Here is the code:

<asp:DataGrid id="dgProducts" runat="server"
OnItemCommand="dispDetails">
<Columns>
<asp:ButtonColumn Text="Delete" ButtonType="PushButton"
HeaderText="Delete" CommandName="delete" >
</asp:ButtonColumn>
</Columns>
</asp:DataGrid>


As you can see I have a button column in my datagrid . I want to
associate some javascript on this button .. if its a normal button we
can do it on codebehind page with adding an onClick attribute .. but
how can i do it if its a ButtonColumn inside datagrid ... it is
possible?


Amit Garg
Senior Developer
Transform AS
Web: http://www.transformgroup.no
Email: (e-mail address removed)
Norway
Mobile: +47 98296005
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,995
Messages
2,570,226
Members
46,816
Latest member
nipsseyhussle

Latest Threads

Top