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.

A way to give Json Data as input to the Bootstrap table

See original GitHub issue

I have Json Data in my JS .I want to populate my bootstraptable with “items” items= #{ListPortletDefaultviewView.jsonList};

I am not getting the data from a remote request.how do i set that?

<table data-toggle="table"  id="table" class="table"  DATA-URL="" data-sort-name="PR_x0020_Spec" data-sort-order="desc">
    <thead>
        <tr>
        <th style="width:20%" data-sortable="true" data-field="PR_x0020_Spec"> PR Spec </th>
        <th data-sortable="true" >Revision</th>
        <th data-sortable="true">Product name</th>
        <th data-sortable="true" >Product Geographical Scope</th>
        <th data-sortable="true">ERP  Code</th>
        </tr>
     </thead>
</table>

Issue Analytics

  • State:closed
  • Created 9 years ago
  • Comments:9 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
Tahichecommented, Jul 18, 2017

Hi, It seems that when “data-toggle=‘table’” is specified any calls to “$(‘#table’).bootstrapTable()” are completely ignored. All options, etc are not rendered. I beleive if you use “data-toggle=‘table’” you must set ALL options via data-* attributes (data-url=“mydata.json”,etc …), not through the {options} object. I haven´t thoroughly tested this or debugged the code, but through trial-and-error this seems to be the case. A console waring message would´ve been nice. BTW, are there any “debugging” options?. In cases like this where nothing is loaded it´d be nice to see what´s actually happening.

0reactions
ash-aroracommented, Mar 25, 2017

I am very pleased with this add-on table library but this is the first time i have found a major issue with that I cannot seem to get my arms around.

@wenzhixin - can you clarify please? I am sure we are doing something wrong here but we don’t know.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to load data from JSON into a Bootstrap Table?
Displaying JSON data after importing it from a file: The JSON data to be displayed is stored in a local folder in a...
Read more >
How to load JSON data into Bootstrap table? - Stack Overflow
There is way using javascript (http://jsfiddle.net/8svjf80g/1/) to load JSON data into Bootstrap table but same example is not working with me.
Read more >
Usage - Bootstrap Table
Call a bootstrap table with id table via JavaScript. We can also use remote URL data by setting url: 'data1. json' . You...
Read more >
Bootstrap JSON Table - YouTube
Fetching API data and displaying API data inside table. · How to create JSON Server and Fetch Data For Front-end · Loading data...
Read more >
Display JSON data in HTML table using JavaScript - YouTube
Hello everyone, in this video we are going to fetch data from a JSON file, and we are going to display them in...
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