question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

var newDta $.ajax({ url: “listRequest”, async: true, crossDomain: true, type: “post”, dataType: “json”, success: function (data) { var newDta = JSON.stringify(data);

     $('#table').bootstrapTable({
            classes: 'table table-responsive table-striped table-bordered',
            undefinedText: '',
            data:data.json,
            iconsPrefix: 'fa',
            showRefresh: false,
            search: true,
            pageSize: 10,
            pagination: true,
            sidePagination: 'client',
            sortable: true,
            cookie: true,
            mobileResponsive: true,
            showExport: true,
            showColumns: true,
            exportDataType: 'all',
            exportTypes: ['csv', 'txt','json','xml','excel','sql','pdf'],
            maintainSelected: true,
            paginationFirstText: "First",
            paginationLastText: "Last",
            paginationPreText: "Previous",
            paginationNextText: "Next",
            pageList: ['10','25','50','100','150','200'],
            icons: {
                paginationSwitchDown: 'fa-caret-square-o-down',
                paginationSwitchUp: 'fa-caret-square-o-up',
                columns: 'fa-columns',
                refresh: 'fa-refresh'
            },
            columns: [
                      {field:'server_id'},
                      {field:'server_id'},
                      {field:'server_id'},
                      {field:'server_id'}


                      ]                  

        }); 



}});
Hello buddy ,

I am getting all json data into data variable, I want to put this data inside boottrap table. i tried lot and lot but fail everything so please help me as soon as possible

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:8 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
wenzhixincommented, Apr 20, 2016

Close this issue because there is no any response in 7 days, if the problem exists reopen it and provide a jsFiddle, thanks!

1reaction
dabroscommented, Apr 10, 2016

@ChiragDhangar - look at the doco + examples and remove ‘is:closed’ filter then search here

http://bootstrap-table.wenzhixin.net.cn/getting-started/ http://bootstrap-table.wenzhixin.net.cn/documentation/#table-options (see ‘url’ and ‘responseHandler’ in particular) http://issues.wenzhixin.net.cn/bootstrap-table/ (examples) https://github.com/wenzhixin/bootstrap-table/issues?utf8=✓&q=is%3Aissue+json

And for fiddle links and guide to how you actually should ask for help: https://github.com/wenzhixin/bootstrap-table/blob/master/CONTRIBUTING.md#bug-reports

You look like you copy pasted code from 3 different places, not sure why you include it in ajax success (you can, but you certainly dont need to, see url option in examples and doco). You also got a JSON.stringify call that looks like it will not only give you an error (Use https://developers.google.com/web/tools/chrome-devtools/?hl=en or similar F12 tool to see errors produced) but which you never use the return from for anything.

Your columns all say ‘server_id’, no idea what thats about, but again just look at doco and examples

No idea what you data looks like, and ect ect ect

Take any of the examples or fiddles then

  1. test the table itself with its dummy data source (so you know your includes/assets loading correct)
  2. test your data source by going to that url or console.log (see if it matches what you see in url option doco)
  3. Look at how the examples load the data, then use url, ajaxOptions or data appropriately
  4. Ensure your column names and other options match up, using responseHandler if you cant affect the json enough to make it mirror exact structure.

Look at the doco, follow the examples, search other issues

Read more comments on GitHub >

github_iconTop Results From Across the Web

Read JSON file using Python - GeeksforGeeks
It's pretty easy to load a JSON object in Python. Python has a built-in package called json, which can be used to work...
Read more >
Working With JSON Data in Python
In the json library, you'll find load() and loads() for turning JSON encoded data into Python objects. Just like serialization, there is a...
Read more >
Loading a JSON File in Python – How to Read and Parse JSON
How to Read JSON Files ... You pass the file path to the open method which opens the file and assigns the stream...
Read more >
Python JSON: Read, Write, Parse JSON (With Examples)
You can use json.load() method to read a file containing JSON object. Suppose, you have a file named person.json which contains a JSON...
Read more >
Python JSON - W3Schools
Python has a built-in package called json , which can be used to work with JSON data. Example. Import the json module: import...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found