javascript & datagrid

  • Thread starter Thread starter Joe
  • Start date Start date
J

Joe

I have got a button in my datagrid and this is calling
a javascript function.

how do I pass the selected index of the datagrid to this
javascript function.. Is this possible

thanks in advance
 
In the OnItemDataBound event set the attribute for your button. So it will
look something like:

btnFunc.Attributes["onClick"] = "Javascript:callfunction('" +
myGrid.SelectedIndex.ToString() + "');";
 

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

Back
Top