Quote:
i have done but the selected value changed is executes final row only
What else should the following code do?
var itcode = $('.ItemCode').closest("tr").find('.ItemCode').last();
var ircode = $('.IRCode').closest("tr").find('.IRCode').last();
var unitprice = $('.UnitPrice').closest("tr").find('.UnitPrice').last();
ircode.val(data.rcode);
itcode.val(data.icode);
unitprice.val(data.unitprice);
You are telling JavaScript to use the last element in the collection, remove that and use something else, try to use an index.
Tip: Start by the top level e.g.
<table>
and find the row (
<tr>
) you want to target, you can do easily by passing the index or calculating that.