Topic: Bootsrap table from external json file
Klaudia free asked 5 years ago
Could you please provide me some example of bootstrap table with data from external json file? Source of json file should be dependent on variable in combobox ( fiscal week for example)
FREE CONSULTATION
Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.
Status
Resolved
Specification of the issue
- ForumUser: Free
- Premium support: No
- Technology: MDB jQuery
- MDB Version: 4.8.10
- Device: Dell
- Browser: Chrome
- OS: Windows 10
- Provided sample code: No
- Provided link: No
MDBootstrap staff commented 5 years ago
Hi, Right now I don't have a ready example for you. Which type of table you would like to see? If you can give me the link to the desired table style from our page that would be great. I might prepare the example for you in spare time :)
Best Regards, Piotr
Klaudia free commented 5 years ago
Hi! here is the link with the example of what I would like to obtain https://mdbootstrap.com/snippets/jquery/garncarczyk/1304799eIn the linkt there is the source with fiscal week value. Without that it work but I don't know if local source is a good approach :) So what I would like to have is possibilty to import data frome external json file with will have in the source value from the combobox connected with fiscal week and year. Additioanlly It could be perfect to import information about each cell's color also from the file
MDBootstrap staff commented 5 years ago
Hi, If you want to use our datatables component you have to be a pro user with our license.
In our snippets, you can build code in separate sections and link to the cdns in snippet options. To top it off everything needed to work with MDB is loaded automaticly that means, jquery, bootstrap and all dependencies of these libraries. I edited your snippet to this proper standards. Is it ok? https://mdbootstrap.com/snippets/jquery/pjoter-2-0/1309818 After purchasing the package loading the data will work properly.
Best Regards, Piotr
Klaudia free commented 5 years ago
Hi! But my question was how to upload the data from external json file with not frozen path- I cannot see the answer to this issue in the code you wrote for me - you mean that you will be able to help after purchasing the license?
MDBootstrap staff commented 5 years ago
I am willing to help you no matter what type of client you are :) Do you load the source of datatable.js to your project?
Right now If you want to dynamically change the source of ajax call simply assigns the value to the variable which will contain a string. If you want to load the data from many sources simply load it with ajax calls and combine into 1 object that will be loaded to the table. If you want to load the data from different sources while using the table I am worried that we do not grant this feature.
Best Regards, Piotr
Klaudia free commented 5 years ago
So are you able to give me some example of code into my snippets? I would really appreciate it
Klaudia free commented 5 years ago
Ok I have finally found an example, so you dont have to provide it. Thanks! https://www.youtube.com/watch?v=pUQFToFrMF4
Bartłomiej Malanowski staff commented 5 years ago
Great! Thank you for sharing your solution