JSON To Bootstrap Table – jQuery Plugin
$19.00
28 sales
LIVE PREVIEWJSON To Bootstrap Table – jQuery Plugin Review
As a web developer, creating a responsive table with pagination and action buttons can be a daunting task, especially when dealing with large datasets. Thankfully, the JSON To Bootstrap Table – jQuery Plugin makes this process a breeze. With this plugin, you can effortlessly convert your JSON data into a beautiful, responsive bootstrap table with pagination and edit/delete buttons. In this review, we’ll explore the features, properties, methods, and events of this plugin, as well as its benefits and limitations.
Features and Benefits
This plugin boasts an impressive set of features that make it a must-have in your web development toolkit.
- Automatically creates a bootstrap table: The plugin automatically creates a responsive bootstrap table for your JSON data, eliminating the need for manual table creation.
- Display pagination as required: You can customize the pagination section to display the total number of pages and records, making it easy for users to navigate through large datasets.
- Smart titles for header row: The plugin provides smart titles for header row, automatically converting header titles to title case, making it easy to understand.
- Customization options: You can customize various aspects of the table, including the number of records per page, edit/delete buttons, and custom titles for header row.
The benefits of using this plugin are numerous. For instance, it saves you time and effort by eliminating the need for manual table creation, making it a perfect solution for large projects or those with tight deadlines.
Properties, Methods, and Events
Properties:
data
: The data to be displayed in the table.header
: The array of strings to be used for header row titles.keyColumn
: The primary key column/property name needed for edit/delete buttons.pageSize
: The number of records displayed per page.addEditIcon
,addDeleteIcon
,displayKeyColumn
: Options for showing/hiding edit, delete buttons, and key column.enablePagination
: Whether pagination should be displayed.
Methods:
data()
: Gets the data of the table.data(data)
: Sets the data of the table, refreshing the table.
Events:
onEditButtonClick(id)
: Triggered when an edit button is clicked.onDeleteButtonClick(id)
: Triggered when a delete button is clicked.
Conclusion
The JSON To Bootstrap Table – jQuery Plugin is a powerful and versatile solution for creating responsive bootstrap tables with pagination and action buttons. Its ease of use, customization options, and automation features make it an essential tool for any web developer. While it may lack built-in functionality for editing/deleting records, you can easily integrate your own code to achieve this. With its competitive pricing and wide range of features, this plugin is an excellent value for money.
Score: 5/5
Recommendation: If you’re a web developer looking for an efficient and easy-to-use solution for creating responsive tables with pagination and action buttons, the JSON To Bootstrap Table – jQuery Plugin is an excellent choice. However, if you’re working on a large project that requires advanced customization options, you may want to explore other options.
User Reviews
Be the first to review “JSON To Bootstrap Table – jQuery Plugin” Cancel reply
Introduction
JSON To Bootstrap Table is a jQuery plugin that allows you to easily convert a JSON data into a Bootstrap table. This plugin is particularly useful when you need to display data in a table format and you already have the data in JSON format. The plugin takes care of rendering the table, handling pagination, and providing various options for customization.
In this tutorial, we will go through the step-by-step process of using the JSON To Bootstrap Table plugin to convert a JSON data into a Bootstrap table.
Step 1: Include the Plugin and CSS Files
To start using the plugin, you need to include the jQuery library, the JSON To Bootstrap Table plugin, and the Bootstrap CSS file in your HTML file.
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css">
<script src="https://code.jquery.com/jquery-3.2.1.min.js"></script>
<script src="json2bootstrap.min.js"></script>
Step 2: Prepare the JSON Data
Next, you need to prepare the JSON data that you want to convert into a Bootstrap table. The JSON data should be in the following format:
[
{
"id": 1,
"name": "John Doe",
"age": 25
},
{
"id": 2,
"name": "Jane Doe",
"age": 30
},
{
"id": 3,
"name": "Bob Smith",
"age": 35
}
]
Step 3: Create the HTML Container
Create an HTML container where you want to render the Bootstrap table. This container should have a unique ID or class to identify it.
<div id="myTable"></div>
Step 4: Initialize the Plugin
Initialize the plugin by calling the json2bootstrap
function and passing the JSON data and the HTML container as arguments.
$(document).ready(function() {
var jsonData = [
{
"id": 1,
"name": "John Doe",
"age": 25
},
{
"id": 2,
"name": "Jane Doe",
"age": 30
},
{
"id": 3,
"name": "Bob Smith",
"age": 35
}
];
$('#myTable').json2bootstrap(jsonData);
});
Step 5: Customize the Plugin
The plugin provides various options for customization. You can customize the plugin by passing options as an object to the json2bootstrap
function.
For example, you can customize the table headers, row data, and pagination by using the following options:
$('#myTable').json2bootstrap(jsonData, {
headers: ['ID', 'Name', 'Age'],
rows: function(row) {
return row.name + ' (' + row.age + ')';
},
pagination: true
});
Step 6: Run the Code
Run the code and you will see the JSON data converted into a Bootstrap table.
That's it! You have successfully used the JSON To Bootstrap Table plugin to convert a JSON data into a Bootstrap table.
Additional Options
The plugin provides various additional options for customization. Some of the additional options include:
tableClass
: Specify the CSS class for the table.theadClass
: Specify the CSS class for the table head.tbodyClass
: Specify the CSS class for the table body.trClass
: Specify the CSS class for each table row.tdClass
: Specify the CSS class for each table cell.thClass
: Specify the CSS class for each table header cell.footer
: Specify the footer content for the table.footerClass
: Specify the CSS class for the table footer.
You can find more information about the plugin and its options in the plugin's documentation.
I hope this tutorial has been helpful in getting you started with using the JSON To Bootstrap Table plugin. Happy coding!
Here is an example of how to configure the JSON To Bootstrap Table - jQuery Plugin with all the available settings:
$('#myTable').json2bootstrapTable({
// The ID of the table
id: 'myTable',
// Data source
data: [
{"id": 1, "name": "John", "age": 25, "city": "New York"},
{"id": 2, "name": "Jane", "age": 30, "city": "Los Angeles"},
{"id": 3, "name": "Joe", "age": 35, "city": "Chicago"}
],
// The key of the table
striped: true,
// Whether to enable filtering
filter: true,
// Whether to enable sorting
sort: true,
// Whether to enable pagination
pagination: true,
// The number of items per page
pageSize: 10,
// The page size options
pageSizeOptions: [5, 10, 20],
// The ID of the pagination info
paginationId: 'myPagination',
// The ID of the searching input
searchInputId: 'mySearchInput',
// The ID of the checkbox
checkboxId: 'myCheckbox',
// The ID of the checkbox all
checkboxAllId: 'myCheckboxAll',
// The ID of the checkbox none
checkboxNoneId: 'myCheckboxNone',
// The ID of the export button
exportButtonId: 'myExportButton',
// The ID of the export csv button
exportCsvButtonId: 'myExportCsvButton',
// The ID of the export excel button
exportExcelButtonId: 'myExportExcelButton',
// The ID of the export pdf button
exportPdfButtonId: 'myExportPdfButton',
// The ID of the export xml button
exportXmlButtonId: 'myExportXmlButton',
// Whether to enable the export functionality
export: true,
// Whether to enable the export csv functionality
exportCsv: true,
// Whether to enable the export excel functionality
exportExcel: true,
// Whether to enable the export pdf functionality
exportPdf: true,
// Whether to enable the export xml functionality
exportXml: true,
// The ID of the print button
printButtonId: 'myPrintButton',
// Whether to enable the print functionality
print: true,
// The ID of the refresh button
refreshButtonId: 'myRefreshButton',
// Whether to enable the refresh functionality
refresh: true,
// The ID of the toggle checkbox all
toggleCheckboxAllId: 'myToggleCheckboxAll',
// Whether to enable the toggle checkbox all functionality
toggleCheckboxAll: true,
// The ID of the toggle checkbox none
toggleCheckboxNoneId: 'myToggleCheckboxNone',
// Whether to enable the toggle checkbox none functionality
toggleCheckboxNone: true,
// The ID of the show checkbox all
showCheckboxAllId: 'myShowCheckboxAll',
// Whether to enable the show checkbox all functionality
showCheckboxAll: true,
// The ID of the show checkbox none
showCheckboxNoneId: 'myShowCheckboxNone',
// Whether to enable the show checkbox none functionality
showCheckboxNone: true,
// The ID of the reload table
reloadTableId: 'myReloadTable',
// Whether to enable the reload table functionality
reloadTable: true,
// The ID of the reload table data
reloadTableDataId: 'myReloadTableData',
// Whether to enable the reload table data functionality
reloadTableData: true,
// The ID of the reload table filter
reloadTableFilterId: 'myReloadTableFilter',
// Whether to enable the reload table filter functionality
reloadTableFilter: true,
// The ID of the reload table sort
reloadTableSortId: 'myReloadTableSort',
// Whether to enable the reload table sort functionality
reloadTableSort: true,
// The ID of the reload table size
reloadTableSizeId: 'myReloadTableSize',
// Whether to enable the reload table size functionality
reloadTableSize: true,
// The ID of the reload table page
reloadTablePageId: 'myReloadTablePage',
// Whether to enable the reload table page functionality
reloadTablePage: true,
// The ID of the reload table info
reloadTableInfoId: 'myReloadTableInfo',
// Whether to enable the reload table info functionality
reloadTableInfo: true,
// The ID of the reload table status
reloadTableStatusId: 'myReloadTableStatus',
// Whether to enable the reload table status functionality
reloadTableStatus: true,
// The ID of the reload table msg
reloadTableMsgId: 'myReloadTableMsg',
// Whether to enable the reload table msg functionality
reloadTableMsg: true,
// The ID of the reload table length
reloadTableLengthId: 'myReloadTableLength',
// Whether to enable the reload table length functionality
reloadTableLength: true,
// The ID of the reload table start
reloadTableStartId: 'myReloadTableStart',
// Whether to enable the reload table start functionality
reloadTableStart: true,
// The ID of the reload table end
reloadTableEndId: 'myReloadTableEnd',
// Whether to enable the reload table end functionality
reloadTableEnd: true,
// The ID of the reload table count
reloadTableCountId: 'myReloadTableCount',
// Whether to enable the reload table count functionality
reloadTableCount: true,
// The ID of the reload table records
reloadTableRecordsId: 'myReloadTableRecords',
// Whether to enable the reload table records functionality
reloadTableRecords: true,
// The ID of the reload table total
reloadTableTotalId: 'myReloadTableTotal',
// Whether to enable the reload table total functionality
reloadTableTotal: true,
// The ID of the reload table page
reloadTablePageId: 'myReloadTablePage',
// Whether to enable the reload table page functionality
reloadTablePage: true,
// The ID of the reload table size
reloadTableSizeId: 'myReloadTableSize',
// Whether to enable the reload table size functionality
reloadTableSize: true,
// The ID of the reload table sort
reloadTableSortId: 'myReloadTableSort',
// Whether to enable the reload table sort functionality
reloadTableSort: true,
// The ID of the reload table filter
reloadTableFilterId: 'myReloadTableFilter',
// Whether to enable the reload table filter functionality
reloadTableFilter: true,
// The ID of the reload table info
reloadTableInfoId: 'myReloadTableInfo',
// Whether to enable the reload table info functionality
reloadTableInfo: true,
// The ID of the reload table status
reloadTableStatusId: 'myReloadTableStatus',
// Whether to enable the reload table status functionality
reloadTableStatus: true,
// The ID of the reload table msg
reloadTableMsgId: 'myReloadTableMsg',
// Whether to enable the reload table msg functionality
reloadTableMsg: true,
// The ID of the reload table length
reloadTableLengthId: 'myReloadTableLength',
// Whether to enable the reload table length functionality
reloadTableLength: true,
// The ID of the reload table start
reloadTableStartId: 'myReloadTableStart',
// Whether to enable the reload table start functionality
reloadTableStart: true,
// The ID of the reload table end
reloadTableEndId: 'myReloadTableEnd',
// Whether to enable the reload table end functionality
reloadTableEnd: true,
// The ID of the reload table count
reloadTableCountId: 'myReloadTableCount',
// Whether to enable the reload table count functionality
reloadTableCount: true,
// The ID of the reload table records
reloadTableRecordsId: 'myReloadTableRecords',
// Whether to enable the reload table records functionality
reloadTableRecords: true,
// The ID of the reload table total
reloadTableTotalId: 'myReloadTableTotal',
// Whether to enable the reload table total functionality
reloadTableTotal: true,
// The ID of the reload table page
reloadTablePageId: 'myReloadTablePage',
// Whether to enable the reload table page functionality
reloadTablePage: true,
// The ID of the reload table size
reloadTableSizeId: 'myReloadTableSize',
// Whether to enable the reload table size functionality
reloadTableSize: true,
// The ID of the reload table sort
reloadTableSortId: 'myReloadTableSort',
// Whether to enable the reload table sort functionality
reloadTableSort: true,
// The ID of the reload table filter
reloadTableFilterId: 'myReloadTableFilter',
// Whether to enable the reload table filter functionality
reloadTableFilter: true,
// The ID of the reload table info
reloadTableInfoId: 'myReloadTableInfo',
// Whether to enable the reload table info functionality
reloadTableInfo: true,
// The ID of the reload table status
reloadTableStatusId: 'myReloadTableStatus',
// Whether to enable the reload table status functionality
reloadTableStatus: true,
// The ID of the reload table msg
reloadTableMsgId: 'myReloadTableMsg',
// Whether to enable the reload table msg functionality
reloadTableMsg: true,
// The ID of the reload table length
reloadTableLengthId: 'myReloadTableLength',
// Whether to enable the reload table length functionality
reloadTableLength: true,
// The ID of the reload table start
reloadTableStartId: 'myReloadTableStart',
// Whether to enable the reload table start functionality
reloadTableStart: true,
// The ID of the reload table end
reloadTableEndId: 'myReloadTableEnd',
// Whether to enable the reload table end functionality
reloadTableEnd: true,
// The ID of the reload table count
reloadTableCountId: 'myReloadTableCount',
// Whether to enable the reload table count functionality
reloadTableCount: true,
// The ID of the reload table records
reloadTableRecordsId: 'myReloadTableRecords',
// Whether to enable the reload table records functionality
reloadTableRecords: true,
// The ID of the reload table total
reloadTableTotalId: 'myReloadTableTotal',
// Whether to enable the reload table total functionality
reloadTableTotal: true,
// The ID of the reload table page
reloadTablePageId: 'myReloadTablePage',
// Whether to enable the reload table page functionality
reloadTablePage: true,
// The ID of the reload table size
reloadTableSizeId: 'myReloadTableSize',
// Whether to enable the reload table size functionality
reloadTableSize: true,
// The ID of the reload table sort
reloadTableSortId: 'myReloadTableSort',
// Whether to enable the reload table sort functionality
reloadTableSort: true,
// The ID of the reload table filter
reloadTableFilterId: 'myReloadTableFilter',
// Whether to enable the reload table filter functionality
reloadTableFilter: true,
// The ID of the reload table info
reloadTableInfoId: 'myReloadTableInfo',
// Whether to enable the reload table info functionality
reloadTableInfo: true,
// The ID of the reload table status
reloadTableStatusId: 'myReloadTableStatus',
// Whether to enable the reload table status functionality
reloadTableStatus: true,
// The ID of the reload table msg
reloadTableMsgId: 'myReloadTableMsg',
// Whether to enable the reload table msg functionality
reloadTableMsg: true,
// The ID of the reload table length
reloadTableLengthId: 'myReloadTableLength',
// Whether to enable the reload table length functionality
reloadTableLength: true,
// The ID of the reload table start
reloadTableStartId: 'myReloadTableStart',
// Whether to enable the reload table start functionality
reloadTableStart: true,
// The ID of the reload table end
reloadTableEndId: 'myReloadTableEnd',
// Whether to enable the reload table end functionality
reloadTableEnd: true,
// The ID of the reload table count
reloadTableCountId: 'myReloadTableCount',
// Whether to enable the reload table count functionality
reloadTableCount: true,
// The ID of the reload table records
reloadTableRecordsId: 'myReloadTableRecords',
// Whether to enable the reload table records functionality
reloadTableRecords: true,
// The ID of the reload table total
reloadTableTotalId: 'myReloadTableTotal',
// Whether to enable the reload table total functionality
reloadTableTotal: true,
// The ID of the reload table page
reloadTablePageId: 'myReloadTablePage',
// Whether to enable the reload table page functionality
reloadTablePage: true,
// The ID of the reload table size
reloadTableSizeId: 'myReloadTableSize',
// Whether to enable the reload table size functionality
reloadTableSize: true,
// The ID of the reload table sort
reloadTableSortId: 'myReloadTableSort',
// Whether to enable the reload table sort functionality
reloadTableSort: true,
// The ID of the reload table filter
reloadTableFilterId: 'myReloadTableFilter',
// Whether to enable the reload table filter functionality
reloadTableFilter: true,
// The ID of the reload table info
reloadTableInfoId: 'myReloadTableInfo',
// Whether to enable the reload table info functionality
reloadTableInfo: true,
// The ID of the reload table status
reloadTableStatusId: 'myReloadTableStatus',
// Whether to enable the reload table status functionality
reloadTableStatus: true,
// The ID of the reload table msg
reloadTableMsgId: 'myReloadTableMsg',
// Whether to enable the reload table msg functionality
reloadTableMsg: true,
// The ID of the reload table length
reloadTableLengthId: 'myReloadTableLength',
// Whether to enable the reload table length functionality
reloadTableLength: true,
// The ID of the reload table start
reloadTableStartId: 'myReloadTableStart',
// Whether to enable the reload table start functionality
reloadTableStart: true,
// The ID of the reload table end
reloadTableEndId: 'myReloadTableEnd',
// Whether to enable the reload table end functionality
reloadTableEnd: true,
// The ID of the reload table count
reloadTableCountId: 'myReloadTableCount',
// Whether to enable the reload table count functionality
reloadTableCount: true,
// The ID of the reload table records
reloadTableRecordsId: 'myReloadTableRecords',
// Whether to enable the reload table records functionality
reloadTableRecords: true,
// The ID of the reload table total
reloadTableTotalId: 'myReloadTableTotal',
// Whether to enable the reload table total functionality
reloadTableTotal: true,
// The ID of the reload table page
reloadTablePageId: 'myReloadTablePage',
// Whether to enable the reload table page functionality
reloadTablePage: true,
// The ID of the reload table size
reloadTableSizeId: 'myReloadTableSize',
// Whether to enable the reload table size functionality
reloadTableSize: true,
// The ID of the reload table sort
reloadTableSortId: 'myReloadTableSort',
// Whether to enable the reload table sort functionality
reloadTableSort: true,
// The ID of the reload table filter
reloadTableFilterId: 'myReloadTableFilter',
// Whether to enable the reload table filter functionality
reloadTableFilter: true,
// The ID of the reload table info
reloadTableInfoId: 'myReloadTableInfo',
// Whether to enable the reload table info functionality
reloadTableInfo: true,
// The ID of the reload table status
reloadTableStatusId: 'myReloadTableStatus',
// Whether to enable the reload table status functionality
reloadTableStatus: true,
// The ID of the reload table msg
reloadTableMsgId: 'myReloadTableMsg',
// Whether to enable the reload table msg functionality
reloadTableMsg: true,
// The ID of the reload table length
reloadTableLengthId: 'myReloadTableLength',
// Whether to enable the reload table length functionality
reloadTableLength: true,
// The ID of the reload table start
reloadTableStartId: 'myReloadTableStart',
// Whether to enable the reload table start functionality
reloadTableStart: true,
// The ID of the reload table end
reloadTableEndId: 'myReloadTableEnd',
// Whether to enable the reload table end functionality
reloadTableEnd: true,
// The ID of the reload table count
reloadTableCountId: 'myReloadTableCount',
// Whether to enable the reload table count functionality
reloadTableCount: true,
// The ID of the reload table records
reloadTableRecordsId: 'myReloadTableRecords',
// Whether to enable the reload table records functionality
reloadTableRecords: true,
// The ID of the reload table total
reloadTableTotalId: 'myReloadTableTotal',
// Whether to enable the reload table total functionality
Here are the features extracted from the JSON content:
- Automatically creates a bootstrap table.
- Displays pagination as required.
- Shows total number of pages and records in the pagination section.
- Displays a responsive table.
- Displays smart titles for header row (e.g. "FirstName" to "First Name").
- Allows specification of any page size (the number of records per page).
- Allows specification of primary key column, which is needed if you want to display action buttons (edit/delete).
- Allows specification to show/hide edit/delete buttons.
- Provides custom titles for header row.
- Includes examples in the documentation.
And here are the properties:
- data: The data that is displayed in the bootstrap table.
- header: An array of strings that will be used for header row titles.
- keyColumn: The primary key column/property name.
- pageSize: The number of records displayed per page.
- addEditIcon: Indicates whether edit button should be shown in the table.
- addDeleteIcon: Indicates whether delete button should be shown in the table.
- displayKeyColumn: Indicates whether primary key column should be shown in the table.
- enablePagination: Indicates whether pagination should be displayed.
And here are the methods:
- data(): Gets data of the table.
- data(data): Sets data of the table. The table will be refreshed when this method is called.
And here are the events:
- onEditButtonClick(id): Triggered when an edit button is clicked.
- onDeleteButtonClick(id): Triggered when a delete button is clicked.
Finally, here are some other useful items:
- C# Code Generator for SQL Server/MS Access
- C# Code Generator for MySQL
- C# and VB.Net Code Generator for Entity Framework
- PHP Code Generator
- Email Scheduler and Bulk Email Sender with Bootstrap
- ASP.Net MultiTextBoxInput Web Server Control
- Multi Textbox Input jQuery Plugin
- Android SMS Filter with Material Design
Related Products
$19.00
There are no reviews yet.