forked from volosoft/jtable
-
Notifications
You must be signed in to change notification settings - Fork 0
api
Franky Van Liedekerke edited this page Jun 9, 2025
·
12 revisions
jTable is used to develop AJAX-based CRUD (Create/Retrieve/Update/Delete) tables without coding HTML and JavaScript. The only required HTML tag is a simple div
element in your page:
<div id="MyTableContainer"></div>
To initialize a jTable instance, you can call the jtable
method in the ready
event of the document
:
<script type="text/javascript">
$(document).ready(function () {
$('#MyTableContainer').jtable({
// General options come here
actions: {
// Action definitions come here
},
fields: {
// Field definitions come here
}
// Event handlers...
});
});
</script>
jTable has three types of options:
- General options: Define the general behavior of the jTable instance.
- Actions: Define how to communicate from the client to the server.
- Fields: Define the structure of the record, create/edit forms, and table. A row in the table is called a "record," which must have fields like a relational database table.
NOTE: When you create a jTable instance, a table is created, but no data is loaded into the table. Use the
load
method to load data. See the Getting Started document for detailed usage.
- addRecordButton
- ajaxSettings
- animationsEnabled
- columnResizable
- columnSelectable
- csvDelimiter
- csvExport
- csvExportButton
- defaultDateFormat
- defaultSorting
- deleteConfirmation
- dialogShowEffect
- dialogHideEffect
- gotoPageArea
- jqueryuiTheme
- loadingAnimationDelay
- messages
- multiselect
- multiSorting
- multiSortingCtrlKey
- openChildAsAccordion
- paging
- pageList
- pageSize
- pageSizes
- printExtraStyles
- printMode
- printTable
- printTableButton
- pageSizeChangeArea
- saveUserPreferences
- saveUserPreferencesMethod
- selecting
- selectingCheckboxes
- selectOnRowClick
- showCloseButton
- sorting
- sortingInfoReset
- sortingInfoSelector
- tableId
- title
- toolbar
- unAuthorizedRequestRedirectUrl
- columnResizable
- create
- edit
- defaultValue
- dependsOn
- display
- input
- inputClass
- inputTitle
- key
- list
- listClass
- options
- optionsSorting
- sorting
- title
- type
- visibility
- width
3. Actions
4. Methods
- addRecord
- closeChildRow
- closeChildTable
- changeColumnVisibility
- deleteRecord
- deleteRows
- destroy
- getChildRow
- getRowByKey
- isChildRowOpen
- load
- openChildRow
- openChildTable
- reload
- selectedRows
- selectRows
- showCreateForm
- updateRecord
5. Events
- closeRequested
- formClosed
- formCreated
- formSubmitting
- loadingRecords
- recordAdded
- recordDeleted
- recordsLoaded
- recordUpdated
- rowInserted
- rowsRemoved
- rowUpdated
- selectionChanged