-
Notifications
You must be signed in to change notification settings - Fork 351
Passing json variable to bootgrid table #434
Copy link
Copy link
Open
Description
I am trying to use ajax function in codeignitor to fetch data from the database and show the results in the bootgrid table.
I received a valid json from controller. My json response is https://pastebin.com/As7gehP6
My script :
$(function() {
var data = {
csrfName: csrfHash
};
$.ajax({
type: 'POST',
data: data,
dataType: "json",
url: '<?php echo base_url();?>Cinvoice/CheckProfarmaInvoiceList',
success: function(json, statut) {
localStorage.setItem('json', JSON.stringify(json));
});
});
var grid = $("#document_data").bootgrid({
ajax: false,
url: '<?php echo base_url();?>Cinvoice/CheckProfarmaInvoiceList'
});
grid.bootgrid('append', localStorage.getItem('json'));
But data is not displaying in bootgrid table,the table is empty and Showing 1 to 10 of 1792 entries
My output is :

Kindly helpme to solve this issue.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels