i am using jqgrid to show the contents on page, but i want to change the contents of the list of the current row depending on the value i have selected in previous row. Like we do in onchange event in javascript by sending ajax request to the server.
So supposing your data is selected from a drop-down in one of the rows, it should make an AJAX call and populate the next row accordingly. See if the following code provides any help to you.
$('#select-id').on("change", function(){
//make an AJAX call, retrieve data in 'data' variable
var trdata = '<td>'+data.element1+'</td>'+'<td>'+data.element2+'</td>';
$(this).closest('tr').next().html(trdata);
});
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.