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() + "');";
 
Back
Top