A JQuery plugin to create AJAX based CRUD tables.

Related tags

Table/Grid jtable
Overview

What is jTable

http://www.jtable.org

A screenshot of jTable

jTable is a jQuery plugin used to create AJAX based CRUD tables without coding HTML or Javascript. It has several features including:

  • Automatically creates HTML table and loads records from server using AJAX.
  • Creates 'create new record' jQueryUI dialog form. When user creates a record, it sends data to server using AJAX and adds the same record to the table in the page.
  • Creates 'edit record' jQueryUI dialog form. When user edits a record, it updates server using AJAX and updates all cells on the table in the page.
  • Allow user to 'delete a record' by jQueryUI dialog based confirmation. When user deletes a record, it deletes the record from server using AJAX and deletes the record from the table in the page.
  • Shows animations for create/delete/edit operations on the table.
  • Supports server side paging using AJAX.
  • Supports server side sorting using AJAX.
  • Supports master/child tables.
  • Allows user to select rows.
  • Allows user to resize columns.
  • Allows user to show/hide columns.
  • Exposes some events to enable validation with forms.
  • It can be localized easily.
  • All styling of table and forms are defined in a CSS file, so you can easily change style of everything to use plugin in your pages. CSS file is well defined and commented.
  • It comes with pre-defined color themes.
  • It is not depended on any server side technology.
  • It is platform independed and works on all common browsers.

Notes

lib folder contains files necessary to use jTable.

dev folder contains parts of library helpful for development of jTable.

See http://www.jtable.org for documentation, demos, themes and more...

Comments
  • Search box in Toolbar

    Search box in Toolbar

    I'm using a search box this way:

    [ div id="PeopleTableContainer" style="width: 1200px;text-align:right;" ]

    [ form ]
        [ span style="font-family: 'Segoe UI Semilight', 'Open Sans', Verdana, Arial, Helvetica, sans-serif;font-size: 13px; font-weight: 600;"] Pesquisa: [ /span ]
    

    [ input type='text' name='pesquisa' id='pesquisa' style="font-family: 'Segoe UI Semilight', 'Open Sans', Verdana, Arial, Helvetica, sans-serif;font-size: 12px; font-weight: 400;" / ]

       [ button type="submit" id="LoadRecordsButton" style="font-family: 'Segoe UI Semilight', 'Open Sans', Verdana, Arial, Helvetica, sans-serif;font-size: 13px; font-weight: 600;"]Busca[/button ]
    [ /form ] 
    [ /div ]
    

    I want to know if there's a way to put this text box and the button inside the toolbar? Or better, if i can make a "second" toolbar just for the search field.

    opened by crynos 72
  • Cascade in PHP 2.3.0 please help Dear nubuntu

    Cascade in PHP 2.3.0 please help Dear nubuntu

    Thank you all for the help and the problem is solved, details attached for reference:

    HTML

                    CountryCode: {
                        title: 'Country Code',
                        width: '15%',
                        options :  'CascadeActions2.php?action=countrylist'  //dynamic from database
                    },
                    CityName: {
                        title: 'City Name',
                        width: '25%',
                        display: function (data) {
                            return( data.record.CityName );
                        },
                        dependsOn: 'CountryCode', //Cities depends on countries. Thus, jTable builds cascade dropdowns!
                        options: function (data) {
                            if (data.source == 'list') {
                                return 'CascadeActions2.php?action=citylist&Country=0';
                            }
                            return 'CascadeActions2.php?action=citylist&Country=' + data.dependedValues.CountryCode;
                        }
                    },
    

    Program PHP:

    else if($_GET["action"] == "citylist") {
    
        $country=($_GET['Country']);
        $result = mysql_query("SELECT Name, CountryCode FROM city WHERE CountryCode = '".$country."'");
    
        $rows = array();
        while ($row = mysql_fetch_array($result)) {
            $eil = array();
            $eil["DisplayText"] = $row[0];
            $eil["Value"] = $row[0];
            $rows[] = $eil;
            }
        $jTableResult = array();
        $jTableResult['Result'] = "OK";
        $jTableResult['Options'] = $rows;  
        print json_encode($jTableResult);    }
    

    Cascade

    opened by eirazabal 39
  • Multiselect dropdown list

    Multiselect dropdown list

    I was wondering, how can I implement multiselect dropdown ?? Please suggest the best way to do multiselect dropdown in jTable. Looking forward to hear from you guys asap.

    cheers!! gaurav

    feature 
    opened by grvgtm 33
  • Upload file click event not triggered from the jtable

    Upload file click event not triggered from the jtable

    I have the requirement of upload file from the list view. I have list of items, first two columns are master child table, 3rd column is a image control which will be the event raiser for file upload click event. Inside the image click event i triggered the file uploader click event but it is not firing. Can you please help me to sort out the problem. Urgent!!!

    display: function (quoteHeaderData) { //Create an image that will be used to open child table var $img1;

                    if (quoteHeaderData.record.DocID > 0)
                        $img1 = $('<img class="child-opener-image" src="/images/QuoteDetailCustomer.png" title="Edit Quote Trans" />');
                    else
                        $img1 = $('<img class="child-opener-image" src="/images/QuoteDetailProduct.png" title="Edit Quote Trans" />');
                    //Open child table when user clicks the image
                    $img1.click(function (e) {
                        $("#hndFileQuoteHeader").val(quoteHeaderData.record.QuoteHeaderID);
                        **$("#fileQuoteHeader").click();**
                    });
                    //Return image to show on the person row
                    return $img1;
                }
    
    opened by MaheswariSubburathinam 32
  • New Feature: Toolbar

    New Feature: Toolbar

    I'm trying to add a toolbar that can be used to add custom icons/buttons to the table. Also, 'add new record' is moved to this toolbar. Does it look good? See image below:

    jtable-toolbar

    feature 
    opened by hikalkan 16
  • Child table not populating data (No data available )

    Child table not populating data (No data available )

    Hi All,

    I been trying to add an on-click to expand a cell into a child table. But data doesn't see to get loaded. I understand there are examples and many have already fixed this, but I still cant figure out what's wrong with my code.

    Please help. Below is a code snap.

     //Prepare jtable plugin
        $('#MQReposTable').jtable({
            title: 'The MQ Repos v0.1',
            paging: true,
            pageSize: 10,
            sorting: true,
            defaultSorting: 'APP ASC',
            selecting: true, //Enable selecting
            multiselect: false, //Allow multiple selecting
            selectingCheckboxes: false, //Show checkboxes on first column
            selectOnRowClick: true, //Enable this to only select using checkboxes
            actions: 
            {
                listAction: 'CRUDController?action=listByFilter',
                createAction:'CRUDController?action=create',
                updateAction: 'CRUDController?action=update',
                deleteAction: 'CRUDController?action=delete'
      
            },
            toolbar: 
            {
                items: [ {tooltip: 'Export this table to excel', icon: 'imgs/excel.png', text: 'Export to Excel', click: function (){  alert('This is yet to be implemented.'); } }]
            },
            fields: 
            {
            	App_ID: {key: true, create: false,edit: false,list: false},
            	App_ID: {title:'ID', key: true,list: true,create:true,width: '10px'},
            	REGION: {title:'ENV',edit: true, list: false},
            	APP_NAME: {title:'APPLICATION',width: '40%',edit:true},
            	APP_ACRONYM: {title:'Acronym',width: '30px',edit:true },
            	QMGR:  {title:'QMGR', width: '12px',edit: true},
            	Primary_server:{title:'P_Server',	width: '72px',edit: true},
            	Secondary_server:{title:'S_Server',	width: '72px',edit: true},
            	OS_TYPE:{title:'OS',width: '12px',edit: true},
            	Client_Version:{title:'MQ Client Ver',width: '12px',edit: true},
            	APP_TECHNOLOGY:{title:'TECHNOLOGY',width: '12px',edit: true},
            	VERSION:{title:'VERSION',width: '12px',edit: true},
            	REGION:{title:'REGION',width: '12px',edit: true},
            	SEG_ID:{title:'Segment',width: '12px',edit: true},
                Others: { title: 'More', width: '12px', sorting: false, edit: false, create: false,listClass: 'child-opener-image-column',
                    display: function (app) {
                        //Create an image that will be used to open child table
                    	console.log(JSON.stringify(app));
                        var $img = $('<img class="child-opener-image" src="imgs/list_metro.png" title="Expand View" />');
    
                        //Open child table when user clicks the image
                        $img.click(function () {
    
                            $('#MQReposTable').jtable('openChildTable',
                                    $img.closest('tr'),
                                    {
                                        title: app.record.APP_NAME + ' - Details',
                                        actions: 
                                        {
                                            listAction: 'CRUDController?action=getAppById' ,
                                            deleteAction: '/Demo/DeletePhone',
                                            updateAction: '/Demo/UpdatePhone',
                                            createAction: 'CRUDController?action=getAppById?App_ID=' + app.record.App_ID
                                        },
                                        fields: 
                                        {
                                        	APP_NAME: {title:'Application Name', key: true,list: true,create:true,width: '5px', defaultValue: app.record.APP_NAME},
                                            QMGR:{ title: 'QMGR', width: '5px',edit: true}
                                        } 
                                    
                                  }, 
                                  function (data) { //opened handler
                                        data.childTable.jtable('load');
                            });
                        });
                        //Return image to show on the person row
                        return $img;
                    }
                },
            },
    
    
    

    JSON for child is

    {"Result":"OK","Record":{"App_ID":1,"APP_NAME":"APP1","APP_ACRONYM":"APP1","QMGR":"ABC","Primary_server":"servers1","Secondary_server":"server2","OS_TYPE":"OEL","Client_Version":9.0.0.0","APP_TECHNOLOGY":"Java","VERSION":"1.7","REGION":"ABC"}}

    Kindly suggest. Though my parent table loads, I have spend days with no clue why child table not working.

    Thanks in advance.

    opened by abhijit-mishra2003 15
  • Help - PHP/Master/Child tables - server side code

    Help - PHP/Master/Child tables - server side code

    Hi

    I'm stuck - so i would be very happy, if someone could show me the server side code, in php, for the demo "Master/Child tables" : http://jtable.org/Demo/MasterChild.

    Thank you

    opened by larsjnielsen09 15
  • Popup window

    Popup window

    Hai,

    Currently i am using jtable plugin.first of all thanks to all implement this great and nice plugin.

    How to open new popup window,when i clicks on the image/button,how fulfill this requirement using jtable plugin.i strucked here from past 4 days.

    please help me.Thanks in advance.

    opened by NaniA 14
  • listAction Function with Static Data

    listAction Function with Static Data

    HI,

    I'm trying a simple example handing off listAction to a function, not to a server post.

    function foo() { return { "Result": "OK", "Records": [{ "Id": 1, "ArchiveId": "39", "ServiceNumber": "123", "SourceNumber": "a", "SalesName": "Sarah", "Type": "1", "UserName": "Me"}], "TotalRecordCount": 1 }; }

    title: 'Deployment History', actions: { listAction: foo(), deleteAction: '@Url.Action("myDelete")', updateAction: '@Url.Action("myUpdate")', createAction: '@Url.Action("myCreate")' },

    Nothing is returned and I get a cannot communicate with server error. I didn't think it would be connecting to a server as its static data being returned.

    opened by JPadster 14
  • question - where the _GET values come from

    question - where the _GET values come from

    it may be a simple question/answer - I just downloaded and was looking at the code $result = mysql_query("SELECT * FROM people ORDER BY " . $_GET["jtSorting"] . " LIMIT " . $_GET["jtStartIndex"] . "," . $_GET["jtPageSize"] . ";");

    where does the jtSorting, jtStartIndex jtPageSize values come from? I want to pass my own parameters to the SQL statement and just wanted to know where to put those values so that they can be received on the PHP page

    opened by kman2013 14
  • Add an extra column to display the record in another page.

    Add an extra column to display the record in another page.

    I need to do something like this:

    table with 3 columns edit, delete and display: pic1

    Image 2: if click in button display i can get "id" of any row/record: pic2

    i dont know what to do that if you can help me thank you.

    question 
    opened by genarocupil 13
  • natural sorting

    natural sorting

    I'm looking for the easiest way to sort a Jtable column that consists of numbers and text, and a combination of these.

    E.g.

    '1B1' '1A2' '1A100' '1A1' '1A10'

    turns into (correct)

    '1A1' '1A2' '1A10' '1A100' '1B1'

    Jtable sorts like this: (wrong)

    '1A1' '1A10' '1A100' '1A2'

    thank you

    opened by aradi222 1
  • Controlar errores $jTableResult['Result']

    Controlar errores $jTableResult['Result']

    Hola. Quisiera saber como puedo controlar cuando da algún error la carga del objeto jtable. El caso es que si se produce un error en el controlador, hago lo siguiente: $jTableResult['Result'] ='error'; pero luego como puedo controlar dicho resultado en la parte donde cargo el div que contiene el objeto jtable? Gracias de antemano y un saludo.

    opened by cogare84 1
  • Jtable 2.6.0 with error:

    Jtable 2.6.0 with error: "Cannot read properties of undefined (reading 'recordPreview')"

    I'm trying to upgrade to version 2.6.0 and got this error

    jquery-3.6.0.js:4059 Uncaught TypeError: Cannot read properties of undefined (reading 'recordPreview') at $..._addColumnsToHeaderRow (jquery.jtable.js:3102:30) at $..._addColumnsToHeaderRow (jquery.jtable.js:3474:41) at $..._addColumnsToHeaderRow (jquery.jtable.js:3794:41) at $..._addRowToTableHead (jquery.jtable.js:305:18) at $..._addRowToTableHead (jquery-ui.js:415:25) at $..._createTableHead (jquery.jtable.js:296:18) at $..._createTableHead (jquery-ui.js:415:25) at $..._createTable (jquery.jtable.js:286:18) at $..._createTable (jquery-ui.js:415:25) at $..._create (jquery.jtable.js:150:18)

    Thanks for any help. Best regards

    opened by casanovadn 3
  • Samples project with new version 2.6.0 or 2.7.0

    Samples project with new version 2.6.0 or 2.7.0

    Hi Hikalkan, I'm using this wonderful lib for more than 5 years and its version is 2.4.0. Could you give me a full samples of newest version in 2.6.0 or 2.7.0. I couldn't find anywhere. Thank for your help

    opened by casanovadn 0
  • hacer print_r de los $_REQUEST ($_POST y $_GET)

    hacer print_r de los $_REQUEST ($_POST y $_GET)

    Hola. Quisiera poder hacer un print_r de los arrays que envia y maneja jTable . Cuando intento hacerlo en el controlador de jTable, da un error de comunición con el servidor y no puedo verlos. Si alguien puede echarme una mano, se agradece

    Saludos

    opened by cogare84 4
Releases(v2.6.0)
  • v2.6.0(Oct 24, 2018)

    Features

    #2183 added fieldOrder option to enable the user to control the fields' order. #2163 Add settings for input type date. #2189 Added the support for ISO 8601 date/time formats. #2175 Extension method for cookies - replace cookies with local storage.

    Enhancements

    #2130 Dutch translation updates. #2095 Created danish translation

    Source code(tar.gz)
    Source code(zip)
  • v2.5.0(Mar 30, 2017)

    Features

    • #2038 Implemented dropdown actions using bootstrap and tether.
    • #1996 RTL direction jtable with rtl column resizable support added.
    • #1459 Added initialSortingDirection option to field options.
    Source code(tar.gz)
    Source code(zip)
  • v2.4.1(Oct 18, 2016)

    • #1927 Add placeholder support.
    • #1916 0 disappeared after updating a row.
    • #1861 Bug in _parseDate.
    • Localization improvements and new localization files.
    Source code(tar.gz)
    Source code(zip)
Live searching/filtering for HTML tables in a jQuery plugin

jQuery Filter Table Plugin This plugin will add a search filter to tables. When typing in the filter, any rows that do not contain the filter will be

Sunny Walker 175 Oct 29, 2022
jQuery plugin to make HTML tables responsive

FooTable V3 This is a complete re-write of the plugin. There is no upgrade path from V2 to V3 at present as the options and the way the code is writte

FooPlugins 2.1k Dec 19, 2022
jQuery plugin for stacking tables on small screens

stacktable.js The Responsive Tables jQuery plugin for stacking tables on small screens. The purpose of stacktable.js is to give you an easy way of con

John Polacek 1k Nov 30, 2022
An Obsidian plugin to provide an editor for Markdown tables

An Obsidian plugin to provide an editor for Markdown tables. It can open CSV data and data from Microsoft Excel, Google Sheets, Apple Numbers and LibreOffice Calc as Markdown tables from Obsidian Markdown editor.

Ganessh Kumar 112 Dec 31, 2022
jQuery grid plugin

jqGrid jQuery grid plugin jqGrid is an Ajax-enabled JavaScript control that provides solutions for representing and manipulating tabular data on the w

Tony Tomov 2.8k Jan 7, 2023
jQuery plugin to show a tree structure in a table

jQuery treetable jQuery treetable is a plugin for jQuery, the 'Write Less, Do More, JavaScript Library'. With this plugin you can display a tree in an

Ludo van den Boom 734 Nov 14, 2022
Lightweight Grid jQuery Plugin

jsGrid Lightweight Grid jQuery Plugin Project site js-grid.com jsGrid is a lightweight client-side data grid control based on jQuery. It supports basi

Artem Tabalin 1.5k Dec 31, 2022
A stupidly small and simple jQuery table sorter plugin

Stupid jQuery Table Sort This is a stupid jQuery table sorting plugin. Nothing fancy, nothing really impressive. Overall, stupidly simple. Requires jQ

Joseph McCullough 708 Dec 26, 2022
jQuery plugin to export a html table to JSON, XML, CSV, TSV, TXT, SQL, Word, Excel, PNG and PDF

tableExport.jquery.plugin Export HTML Table to CSV DOC JSON PDF PNG SQL TSV TXT XLS (Excel 2000 HTML format) XLSX (Excel 2007 Office Open XML format)

null 918 Dec 29, 2022
Grid based on CSS3 flexbox

Flexbox Grid flexboxgrid.com Grid based on the flex display property. Install npm npm i flexboxgrid --save bower bower install flexboxgrid cdn CDNJS <

kj 9.3k Dec 31, 2022
An Obsidian plugin to paste Excel tables as Markdown tables in Obsidian editor.

Obsidian Excel to Markdown Table An Obsidian plugin to paste Excel tables as Markdown tables in Obsidian editor. Demo You can paste the copied Excel d

Ganessh Kumar 108 Jan 4, 2023
Shrinks any large data tables into compact and responsive tables

jquery.table-shrinker A Jquery plugin to make HTML Table responsive across all devices, the right way! Demo Click here to see the demo, remember to re

null 29 Sep 11, 2022
Jspreadsheet is a lightweight vanilla javascript plugin to create amazing web-based interactive tables and spreadsheets compatible with other spreadsheet software.

Jspreadsheet CE v4: The JavaScript spreadsheet Jexcel CE has been renamed to Jspreadsheet CE News Important: Please import jspreadsheet.css (jexcel.cs

null 6.2k Dec 19, 2022
Jquery-actualizer - jQuery ajax actualizer

jQuery AJAX Actualizer Include jQuery & this plugin into your HTML file and use this js code: $('#target').actualizer('a'); On click at any A element,

Šimon (Simon) Rataj 1 Jul 28, 2020
A jQuery plugin for make your ajax request's error and success messages auto handled.

sweetAjax A jQuery plugin for make your ajax request's error and success messages auto handled. Installation sweetAjax plugin has built on jQuery-ui w

Eren Sertkaya 2 May 17, 2022
pjax is a jQuery plugin that uses ajax and pushState to deliver a fast browsing experience with real permalinks, page titles, and a working back button.

pjax = pushState + ajax pjax is a jQuery plugin that uses ajax and pushState to deliver a fast browsing experience with real permalinks, page titles,

Chris Wanstrath 16.8k Jan 5, 2023
infiniteScrollWithTemplate - JQuery plugin for ajax-enabled infinite page scroll / auto paging with template

jQuery Infinite With Template Plugin JQuery plugin for ajax-enabled infinite page scroll with template. If you like jQuery until now, this little libr

이삼구 2 Mar 19, 2021
A jQuery plugin to submit forms with files via AJAX and to get a response with errors.

jquery-ajaxform A jQuery plugin to submit form with files via AJAX and to get a response with errors. Browsers without FormData uses iframe transport

gozoro 2 Mar 30, 2021
Live searching/filtering for HTML tables in a jQuery plugin

jQuery Filter Table Plugin This plugin will add a search filter to tables. When typing in the filter, any rows that do not contain the filter will be

Sunny Walker 175 Oct 29, 2022
jQuery plugin to make HTML tables responsive

FooTable V3 This is a complete re-write of the plugin. There is no upgrade path from V2 to V3 at present as the options and the way the code is writte

FooPlugins 2.1k Dec 19, 2022