i have a gridview witch contain 4 databound columns and 2 templated column. in one of template column i placed a dropdownlist(witch contain number of items). and 2nd column of gridview contains prices. so in last column i want that when i select value in dropdownlist that value should multiply with 2nd column’s value of datagrid and place result in last column of gridview using java script.
please tell me what to do..
You can get the row and column cell data using javascript. Here is a nice article on
Traversing an HTML table with JavaScript and DOM Interfaces
Also take a look at table.rows
Sample Code
HTML
javascript
You have to use textContent instead of innerText to work in FF.
jQuery solution
Remove the onchange event from the combo box and use the following function