$(document).on("loaded.rs.jquery.bootgrid", function()
{
productTable.find(".update").on("click", function(event)
{
var product_id = $(this).data("row-id");
$.ajax({
url:"fetch_single.php",
method:"POST",
data:{product_id:product_id},
dataType:"json",
success:function(data)
{
$('#productModal').modal('show');
$('#category_id').val(data.category_id);
$('#product_name').val(data.product_name);
$('#product_qty').val(data.product_qty);
$('#product_price').val(data.product_price);
$('.modal-title').text("Edit Product");
$('#product_id').val(product_id);
$('#action').val("Edit");
$('#operation').val("Edit");
}
});
});
});