|
Name |
Type |
altRows
|
bool
|
Sets or gets whether the jqxDataTable automatically alternates row colors.
|
autoRowHeight
|
bool
|
Sets or gets whether the jqxDataTable automatically calculates the rows height and wraps the cell text.
|
aggregatesHeight
|
double
|
Sets or gets the height of the aggregates bar. Aggregates bar is displayed after setting showAggregates to true.
|
autoShowLoadElement
|
bool
|
Sets or gets whether the loading html element with animated gif is automatically displayed by the widget during the data binding process.
|
columnsHeight
|
double
|
Sets or gets the height of the columns header.
|
columns
|
object
|
Sets the jqxDataTable's columns.
- text - string property which sets the column header's text.
- dataField - string property which sets the column's bound field. It should be unique and should point to a data field defined in the jqxDataAdapter's dataFields array.
- displayField - string property which sets the column's display field. It should be unique and should point to a data field defined in the jqxDataAdapter's dataFields array.
- sortable - boolean property which determines whether the column is sortable.
- filterable - boolean property which determines whether the column is filterable.
- hidden - boolean property which determines whether the column is visible or hidden.
- columnGroup - string property which determines the name of the column's parent group. It should point to a valid name defined in the
columnGroups .
- autoCellHeight - boolean property which determines whether the cell's data wrapping is enabled. This property is set to
true by default. When autoRowHeight is enabled and autoCellHeight is set to false, the cell's data will not be wrapped.
- renderer - callback function for custom rendering of the column's header.
Code Examplerenderer: function (text, align, height) { let checkBox = "<div>" + text;
- rendered - callback function which is called after the column's header rendering is completed.
Code Examplerendered: function (element, align, height) { element.jqxCheckBox();
- cellsRenderer - callback function which is called when a cell is being rendered. The result of that function should be valid and well-formatted HTML string. The cellsRenderer function has 4 parameters passed by jqxDataTable - row's index, column's data field, cell's value, row's data as an object of Key/Value pairs.
Code Example{ text: 'Details', align: 'center', dataField: 'lastname', // row - row's index. // column - column's data field. // value - cell's value. // rowData - rendered row's object. cellsRenderer: function (row, column, value, rowData) { var container = '<div style="width: 100%; height: 100%;">' var leftcolumn = '<div style="float: left; width: 50%;">'; var rightcolumn = '<div style="float: left; width: 50%;">'; var firstname = "<div style='margin: 10px;'><b>First Name:</b> " + rowData.firstname + "</div>"; var lastname = "<div style='margin: 10px;'><b>Last Name:</b> " + rowData.lastname + "</div>"; var title = "<div style='margin: 10px;'><b>Title:</b> " + rowData.title + "</div>"; var address = "<div style='margin: 10px;'><b>Address:</b> " + rowData.address + "</div>"; leftcolumn += firstname; leftcolumn += lastname; leftcolumn += title; leftcolumn += address; leftcolumn += "</div>"; var postalcode = "<div style='margin: 10px;'><b>Postal Code:</b> " + rowData.postalcode + "</div>"; var city = "<div style='margin: 10px;'><b>City:</b> " + rowData.city + "</div>"; var phone = "<div style='margin: 10px;'><b>Phone:</b> " + rowData.homephone + "</div>"; var hiredate = "<div style='margin: 10px;'><b>Hire Date:</b> " + rowData.hiredate + "</div>"; rightcolumn += postalcode; rightcolumn += city; rightcolumn += phone; rightcolumn += hiredate; rightcolumn += "</div>"; container += leftcolumn; container += rightcolumn;
- columnType - string property which determines the column's type.
Possible values:
- "template" - sets a custom editor as a default editor for the column. The editor should be created in the
createEditor callback function. The editor should be synchronized with the cell's value in the initEditor callback. The editor's value should be retrieved in the getEditorValue callback function.
- "custom" - sets a custom editor as a default editor for a cell. That setting enables you to have different cell editors in the column. The editors should be created in the
createEditor callback function which is called for each row when the columnType property is set to "custom". The editors should be synchronized with the cell's value in the initEditor callback. The editor's value should be retrieved in the getEditorValue callback function.
- validation - callback function which is called when the jqxDataTable's edited row needs to be validated. The function has 2 parameters - edit cell and the cell's value. The function should return true or false, depending on the user's validation logic. It can also return a validation object with 2 fields - "result" - true or false, and "message" - validation string displayed to the users.
Code Examplevalidation: function (cell, value) { var date = new Date(value); if (date.getFullYear() > 2014 || date.getFullYear() < 1990) { return { message: "Shipped Date should be in the 1990 - 2014 interval", result: false };
- initEditor - callback function which is called when an editor is opened. It has 5 parameters - row's index, cell's value, the editor element, cell's width and cell's height. The function can be used for adding some custom parameters to the editor.
Code ExampleinitEditor: function (row, cellValue, editor, cellText, width, height) {
- createEditor - callback function which is called just once when the cells editor is created. It has 5 parameters - row's index, cell's value, the editor element, cell's width and cell's height. The function can be used for adding some custom parameters to the editor.
Code ExamplecreateEditor: function (row, cellValue, editor, cellText, width, height) {
- getEditorValue - callback function which could be used for overriding the value returned by the editor. It is useful for advanced scenarios with custom editors. It has 3 parameters - row's index, cell's value and the editor element. The result of the function is expected to be the editor's new value.
Code ExamplegetEditorValue: function (row, cellValue, editor) {
- cellsFormat - determines the Format string used for formatting the cell values.
Possible number strings: "d" - decimal numbers. "f" - floating-point numbers. "n" - integer numbers. "c" - currency numbers. "p" - percentage numbers.
For adding decimal places to the numbers, add a number after the formatting string. For example: "c3" displays a number in this format $25.256 Possible built-in Date formats:
// short date pattern d: "M/d/yyyy", // long date pattern D: "dddd, MMMM dd, yyyy", // short time pattern t: "h:mm tt", // long time pattern T: "h:mm:ss tt", // long date, short time pattern f: "dddd, MMMM dd, yyyy h:mm tt", // long date, long time pattern F: "dddd, MMMM dd, yyyy h:mm:ss tt", // month/day pattern M: "MMMM dd", // month/year pattern Y: "yyyy MMMM", // S is a sortable format that does not vary by culture S: "yyyy\u0027-\u0027MM\u0027-\u0027dd\u0027T\u0027HH\u0027:\u0027mm\u0027:\u0027ss"
Possible Date format strings:
"d"-the day of the month; "dd"-the day of the month; "ddd"-the abbreviated name of the day of the week; "dddd"- the full name of the day of the week; "h"-the hour, using a 12-hour clock from 1 to 12; "hh"-the hour, using a 12-hour clock from 01 to 12; "H"-the hour, using a 24-hour clock from 0 to 23; "HH"- the hour, using a 24-hour clock from 00 to 23; "m"-the minute, from 0 through 59; "mm"-the minutes,from 00 though59; "M"- the month, from 1 through 12; "MM"- the month, from 01 through 12; "MMM"-the abbreviated name of the month; "MMMM"-the full name of the month; "s"-the second, from 0 through 59; "ss"-the second, from 00 through 59; "t"- the first character of the AM/PM designator; "tt"-the AM/PM designator; "y"- the year, from 0 to 99; "yy"- the year, from 00 to 99; "yyy"-the year, with a minimum of three digits; "yyyy"-the year as a four-digit number;
- aggregates - array property which determines the column aggregates.
Code Examples{ text: 'Price', datafield: 'price', cellsalign: 'right', cellsformat: 'c2', aggregates: ['sum', 'avg'] }
Aggregate functions:
- 'avg' - Average aggregate
- 'count' - Count aggregate
- 'min' - Min aggregate
- 'max' - Max aggregate
- 'sum' - Sum aggregate
- 'product' - Product aggregate
- 'stdev' - Standard deviation on a sample.
- 'stdevp' - Standard deviation on an entire population.
- 'varp' - Variance on an entire population.
- 'var' - Variance on a sample.
Custom Aggregate
aggregates: [{ 'In Stock':
function (aggregatedValue, currentValue) {
if (currentValue) {
return aggregatedValue + 1;
}
return aggregatedValue;
}
}
Custom Aggregate which aggregates values from two columns
{ text: 'Price', dataField: 'price', cellsAlign: 'right', cellsFormat: 'c2', aggregates: [{ 'Total':
function (aggregatedValue, currentValue, column, record) {
var total = currentValue * parseInt(record['quantity']);
return aggregatedValue + total;
}
}]
}
'In Stock' - the aggregate's display name. The function has 2 params - the aggregated value and the current value. It should return an aggregated value.
- aggregatesRenderer - callback function which could be used for customization of the aggregates rendering. It has 1 parameter - the column's aggregates.
Code Example
{ text: 'Quantity', dataField: 'quantity', width: 85, cellsAlign: 'right', cellsFormat: 'n2', aggregates: ['count'],
aggregatesRenderer: function (aggregates) {
let renderString = '<div>';
renderString += "<strong>Items: </strong>" + aggregates.count + "</div>";
return renderString;
}
}
- align - string property which determines the alignment of the column's header. Possible values: 'left', 'center' or 'right'
- cellsAlign - string property which determines the alignment of the column's cells. Possible values: 'left', 'center' or 'right'.
- width - numeric property which determines the column's width.
- minWidth - numeric property which determines the column's minimum width. Default value: 25.
- maxWidth - numeric property which determines the column's maximum width.
- resizable - boolean property which determines whether the column is resizable.
- draggable - boolean property which determines whether the column is draggable.
- editable - boolean property which determines whether the column is editable.
- className - string property which sets a custom CSS class for the column's header
- cellClassName - string or function property which sets a custom CSS class for the column's cells. The value could be a "string" or "Function".
Apply a CSS class to all cells in the column.
text: 'Ship Name', datafield: 'ShipName', width: 150, cellclassname: "yellowCell"
Apply a conditional CSS Class depending on the cell's value.
text: 'Ship Name', dataField: 'ShipName', width: 150,
cellClassName: function (row, column, value, data) {
if (value == "Hanari Carnes") {
return "yellowCell";
}
}
- pinned - boolean property which determines whether the column is pinned(frozen).
|
columnGroups
|
object
|
Sets the jqxDataTable's column groups.
- parentGroup - string property which determines the parent group's name.
- name - string property which determines the group's name.
- align - string property which determines the column header's alignment. Possible values: 'left', 'center' or 'right'.
|
columnsResize
|
bool
|
Sets or gets the jqxDataTable's columnsResize.
|
columnsReorder
|
bool
|
Sets or gets the jqxDataTable's columnsReorder.
|
disabled
|
bool
|
Sets or gets whether the jqxDataTable is disabled.
|
editable
|
bool
|
Sets or gets whether the jqxDataTable editing is enabled.
|
editSettings
|
object
|
Sets or gets the jqxDataTable's edit settings.
|
exportSettings
|
object
|
Determines the Data Export settings used by jqxDataTable when exportData is called. See also the exportData method.
- columnsHeader - determines whether to export the column's header.
- hiddenColumns - determines whether to export the hidden columns.
- serverURL - determines the URL of the save-file.php.
- characterSet - determines the char set.
- recordsInView - determines whether to export all records or to take also the filtering and sorting into account.
- fileName - determines the file's name. Set this to null if you want to export the data to a local variable.
Code example
Set the exportSettings property.
$("#dataTable").jqxDataTable({exportSettings: { columnsHeader: true, hiddenColumns: false, serverURL: null, characterSet: null, recordsInView: true, fileName: "jqxDataTable"}});
Get the exportSettings property.
var exportSettings = $('#dataTable').jqxDataTable('exportSettings');
|
enableHover
|
bool
|
Sets or gets whether row highlighting is enabled.
|
enableBrowserSelection
|
bool
|
Enables or disables the default text selection of the web browser.
|
filterable
|
bool
|
Enables/Disables the filtering feature.
|
filterHeight
|
double
|
Sets or gets the Filter Element's height.
|
filterMode
|
object
|
Determines the Filter's mode. Possible values: "default" , "simple" and "advanced"
|
groups
|
object[]
|
Sets or gets the jqxDataTable's data groups. Set this property if you want to display the data grouped by a set of column(s).
|
groupsRenderer
|
object
|
Callback function which allows you to customize the rendering of the group headers.
|
height
|
object
|
Sets or gets the jqxDataTable's height.
|
initRowDetails
|
object
|
Callback function which is used for initialization of the expanded row's details. The function is called just once when the row is expanded for first time.
- id/key - expanded row's id/key.
- dataRow - the expanded row as a set of Key/Value pairs.
- element - the row's details HTML element as a jQuery selector.
- rowInfo - object which enables you to modify the height of the row details by setting the rowInfo's detailsHeight
initRowDetails
|
incrementalSearch
|
bool
|
Determines whether the incremental search is enabled. The feature allows you to quickly find and select data records by typing when the widget is on focus.
|
localization
|
object
|
Applies a localization to the jqxDataTable's strings. Default localization object:
{ // separator of parts of a date (e.g. '/' in 11/05/1955) '/': "/", // separator of parts of a time (e.g. ':' in 05:44 PM) ':': ":", // the first day of the week (0 = Sunday, 1 = Monday, etc) firstDay: 0, days: { // full day names names: [ "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"], // abbreviated day names namesAbbr: [ "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], // shortest day names namesShort: [ "Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"] }, months: { // full month names (13 months for lunar calendards -- 13th month should be "" if not lunar) names: [ "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December", ""], // abbreviated month names namesAbbr: [ "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec", ""] }, // AM and PM designators in one of these forms: // The usual view, and the upper and lower case versions // [standard,lowercase,uppercase] // The culture does not use AM or PM (likely all standard date formats use 24 hour time) // null AM: [ "AM", "am", "AM"], PM: [ "PM", "pm", "PM"], eras: [ // eras in reverse chronological order. // name: the name of the era in this culture (e.g. A.D., C.E.) // start: when the era starts in ticks (gregorian, gmt), null if it is the earliest supported era. // offset: offset in years from gregorian calendar { "name": "A.D.", "start": null, "offset": 0 } ], twoDigitYearMax: 2029, patterns: { // short date pattern d: "M/d/yyyy", // long date pattern D: "dddd, MMMM dd, yyyy", // short time pattern t: "h:mm tt", // long time pattern T: "h:mm:ss tt", // long date, short time pattern f: "dddd, MMMM dd, yyyy h:mm tt", // long date, long time pattern F: "dddd, MMMM dd, yyyy h:mm:ss tt", // month/day pattern M: "MMMM dd", // month/year pattern Y: "yyyy MMMM", // S is a sortable format that does not vary by culture S: "yyyy\u0027-\u0027MM\u0027-\u0027dd\u0027T\u0027HH\u0027:\u0027mm\u0027:\u0027ss", // formatting of dates in MySQL DataBases ISO: "yyyy-MM-dd hh:mm:ss", ISO2: "yyyy-MM-dd HH:mm:ss", d1: "dd.MM.yyyy", d2: "dd-MM-yyyy", d3: "dd-MMMM-yyyy", d4: "dd-MM-yy", d5: "H:mm", d6: "HH:mm", d7: "HH:mm tt", d8: "dd/MMMM/yyyy", d9: "MMMM-dd", d10: "MM-dd", d11: "MM-dd-yyyy" }, percentSymbol: "%", currencySymbol: "$", currencySymbolposition: "before", decimalSeparator: '.', thousandsSeparator: ',', pagerGoToPageString: "Go to page:", pagerShowRowsString: "Show rows:", pagerRangeString: " of ", pagerPreviousButtonString: "previous", pagerNextButtonString: "next", pagerFirstButtonsSring: "first", pagerLastButtonString: "last", filterApplyString: "Apply", filterCancelString: "Cancel", filterClearString: "Clear Filter", filterString: "advanced", filterSearchString: "Search:", filterStringComparisonOperators: [ 'empty', 'not empty', 'contains', 'contains(match case)', 'does not contain', 'does not contain(match case)', 'starts with', 'starts with(match case)', 'ends with', 'ends with(match case)', 'equal', 'equal(match case)', 'null', 'not null'], filterNumericComparisonOperators: [ 'equal', 'not equal', 'less than', 'less than or equal', 'greater than', 'greater than or equal', 'null', 'not null'], filterDateComparisonOperators: [ 'equal', 'not equal', 'less than', 'less than or equal', 'greater than', 'greater than or equal', 'null', 'not null'], filterbooleanComparisoOoperators: [ 'equal', 'not equal'], validationString: "Entered value is not valid", emptyDataString: "No data to display", filterSelectString: "Select Filter", loadText: "Loading...", clearString: "Clear", todayString: "Today", loadingErrorMessage: "The data is still loading and you cannot set a property or call a method. You can do that once the data binding is completed. jqxDataTable raises the 'bindingComplete' event when the binding is completed."
|
pagerHeight
|
double
|
Sets or gets the height of the jqxDataTable's Pager(s). Pager(s) is(are) displayed after setting pageable to true.
|
pageSize
|
double
|
Sets or gets the rows count per page when paging is enabled.
|
pageSizeOptions
|
object
|
Sets or gets the jqxDataTable's page size options when paging is enabled and the pagerMode property is set to "advanced" .
|
pageable
|
bool
|
Determines whether the jqxDataTable is in paging mode.
|
pagerPosition
|
object
|
Sets or gets the Pager's position. Possible values: 'top' , 'bottom' and 'both'
|
pagerMode
|
object
|
Sets or gets the Pager's mode. Possible values: "default" and "advanced"
|
pagerButtonsCount
|
double
|
Sets or gets the count of the buttons displayed on the Pager when pagerMode is set to "default" .
|
pagerRenderer
|
object
|
Enables custom rendering of the Pager.
|
ready
|
object
|
Callback function which is called when the jqxDataTable is rendered and data binding is completed..
|
rowDetails
|
bool
|
Sets or gets whether the jqxDataTable rows have details and can be expanded/collapsed. See the initRowDetails for initialization of the row details.
|
renderToolbar
|
object
|
Enables custom rendering of the Toolbar.
|
renderStatusBar
|
object
|
Enables custom rendering of the Statusbar.
|
rendering
|
object
|
Callback function which is called before the rendering of the jqxDataTable's rows.
|
rendered
|
object
|
Callback function which is called after the rendering of the jqxDataTable's row.
|
rtl
|
bool
|
Sets or gets a value indicating whether widget's elements are aligned to support locales using right-to-left fonts.
Code example
Set the rtl property.
$('#dataTable').jqxDataTable({rtl : true});
Get the rtl property.
var rtl = $('#dataTable').jqxDataTable('rtl');
|
source
|
object
|
Determines the jqxDataTable's data source. The source property is expected to point to an instance of jqxDataAdapter. For more information about jqxDataAdapter, visit: jquery-data-adapter.htm. To clear the data source, set the source property to null.
|
sortable
|
bool
|
Enables/Disables the sorting feature.
|
showAggregates
|
bool
|
Determines whether the jqxDataTable's Aggregates bar is visible.
|
showToolbar
|
bool
|
Determines whether the jqxDataTable's Toolbar is visible.
|
showStatusbar
|
bool
|
Determines whether the jqxDataTable's Statusbar is visible.
|
statusBarHeight
|
double
|
Sets or gets the height of the Statusbar. Statusbar is displayed after setting showStatusbar to true.
|
scrollBarSize
|
object
|
Sets or gets the size of the scrollbars.
|
selectionMode
|
object
|
Sets or gets the selection mode. Possible values: "multipleRows" , "singleRow" and "custom" . In the "custom" mode, rows could be selected/unselected only through the API.
|
serverProcessing
|
bool
|
Sets or gets whether the Paging, Sorting and Filtering are handled by a Server and jqxDataTable sends Ajax requests to a Server and displays the returned data. When the current page, page size, sort order or sort column is changed, jqxDataTable will automatically perform a new data binding with the updated parameters. For server synchronization after adding, removing, updating rows, see the source property documentation.
- sortdatafield - the sort column's datafield.
- sortorder - the sort order - 'asc', 'desc' or ''.
- pagenum - the current page's number when the paging feature is enabled.
- pagesize - the page's size which represents the number of rows displayed in the view.
- filterscount - the number of filters applied to the jqxDataTable.
- filtervalue - the filter's value. The filtervalue name for the first filter is "filtervalue0", for the second filter is "filtervalue1" and so on.
- filtercondition - the filter's condition. The condition can be any of these: "CONTAINS", "DOES_NOT_CONTAIN", "EQUAL", "EQUAL_CASE_SENSITIVE", NOT_EQUAL","GREATER_THAN", "GREATER_THAN_OR_EQUAL", "LESS_THAN", "LESS_THAN_OR_EQUAL", "STARTS_WITH", "STARTS_WITH_CASE_SENSITIVE", "ENDS_WITH", "ENDS_WITH_CASE_SENSITIVE", "NULL", "NOT_NULL", "EMPTY", "NOT_EMPTY".
- filterdatafield - the filter column's datafield.
- filteroperator - the filter's operator - 0 for "AND" and 1 for "OR".
|
showHeader
|
bool
|
Sets or gets the jqxDataTable's columns visibility.
|
theme
|
string
|
|
toolbarHeight
|
double
|
Sets or gets the height of the Toolbar. Toolbar is displayed after setting showToolbar to true.
|
width
|
object
|
Sets or gets the jqxDataTable's width.
|
|
onBindingComplete
|
Event
|
This event is triggered when the jqxDataTable binding is completed. *Bind to that event before the jqxDataTable's initialization. Otherwise, if you are populating the widget from a local data source and bind to bindingComplete after the initialization, the event could be already raised when you attach an event handler to it.
|
onCellBeginEdit
|
Event
|
This is triggered when a cell edit begins. Note: To turn on cell editing, you should set the editSettings property and make sure that its editSingleCell sub property is set to true .
|
onCellEndEdit
|
Event
|
This is triggered when a cell edit ends. Note: To turn on cell editing, you should set the editSettings property and make sure that its editSingleCell sub property is set to true .
|
onCellValueChanged
|
Event
|
This event is triggered when a cell value is changed.
|
onColumnResized
|
Event
|
This event is triggered when a column is resized.
|
onColumnReordered
|
Event
|
This event is triggered when the column's order is changed.
|
onSort
|
Event
|
This event is triggered when the jqxDataTable sort order or sort column is changed.
|
onFilter
|
Event
|
This event is triggered when the jqxDataTable's rows filter is changed.
|
onPageChanged
|
Event
|
This is triggered when the jqxDataTable's current page is changed.
|
onPageSizeChanged
|
Event
|
This is triggered when the jqxDataTable's page size is changed.
|
onRowClick
|
Event
|
This is triggered when a row is clicked.
|
onRowDoubleClick
|
Event
|
This is triggered when a row is double-clicked.
|
onRowSelect
|
Event
|
This is triggered when a row is selected.
|
onRowUnselect
|
Event
|
This is triggered when a row is unselected.
|
onRowBeginEdit
|
Event
|
This is triggered when a row edit begins.
|
onRowEndEdit
|
Event
|
This is triggered when a row edit ends.
|
onRowExpand
|
Event
|
This is triggered when a row is expanded.
|
onRowCollapse
|
Event
|
This is triggered when a row is collapsed.
|
|
Name |
Arguments |
Return Type |
addRow
|
(double rowIndex, object rowData, object rowPosition)
|
void
|
Adds a new row. For synchronization with a server, please look also the jqxDataAdapter plug-in's help documentation.
Code example
Invoke the addRow method.
$("#dataTable").jqxDataTable('addRow', null, {});
|
addFilter
|
(string dataField, object filerGroup)
|
void
|
|
applyFilters
|
()
|
void
|
Applies the added/removed filters.
Code example
Invoke the applyFilters method.
$("#dataTable").jqxDataTable('applyFilters');
|
beginUpdate
|
()
|
void
|
Begins an update and stops all refreshes.
Code example
Invoke the beginUpdate method.
$("#dataTable").jqxDataTable('beginUpdate');
|
beginRowEdit
|
(double rowIndex)
|
void
|
Begins a row edit operation when editable is set to true.
Code example
Invoke the beginRowEdit method.
$("#dataTable").jqxDataTable('beginRowEdit',0);
|
beginCellEdit
|
(double rowIndex, string dataField)
|
void
|
Begins a cell edit operation when editable is set to true.
Code example
Invoke the beginCellEdit method.
$("#dataTable").jqxDataTable('beginCellEdit',0, 'FirstName');
|
clearSelection
|
()
|
void
|
Clears the selection.
Code example
Invoke the clearSelection method.
$("#dataTable").jqxDataTable('clearSelection');
|
clearFilters
|
()
|
void
|
Clears the filters.
Code example
Invoke the clearFilters method.
$("#dataTable").jqxDataTable('clearFilters');
|
clear
|
()
|
void
|
Clears the jqxDataTable.
Code example
Invoke the clear method.
$("#dataTable").jqxDataTable('clear');
|
destroy
|
()
|
void
|
Destroys jqxDataTable and removes it from the DOM.
Code example
Invoke the destroy method.
$("#dataTable").jqxDataTable('destroy');
|
deleteRow
|
(double rowIndex)
|
void
|
Deletes a row. For synchronization with a server, please look also the jqxDataAdapter plug-in's help documentation.
Code example
Invoke the deleteRow method.
$("#dataTable").jqxDataTable('deleteRow', 0);
|
endUpdate
|
()
|
void
|
Ends the update and resumes all refreshes.
Code example
Invoke the endUpdate method.
$("#dataTable").jqxDataTable('endUpdate');
|
ensureRowVisible
|
(double rowIndex)
|
void
|
Moves the vertical scrollbar to a row index.
Code example
Invoke the ensureRowVisible method.
$("#dataTable").jqxDataTable('ensureRowVisible', 20);
|
endRowEdit
|
(double rowIndex, bool cancelChanges)
|
void
|
Ends a row edit when editable is set to true. Invoke the endRowEdit method:
".endRowEdit(0)"
Invoke the endRowEdit method and cancel changes:
".endRowEdit(0, true)"
Code example
Invoke the endRowEdit method.
$("#dataTable").jqxDataTable('endRowEdit', 0);
Invoke the endRowEdit method and cancel changes.
$("#dataTable").jqxDataTable('endRowEdit', 0, true);
|
endCellEdit
|
(double rowIndex, string dataField)
|
void
|
Ends a cell edit operation when editable is set to true.
Code example
Invoke the endCellEdit method.
$("#dataTable").jqxDataTable('endCellEdit',0, 'FirstName');
|
exportData
|
(object exportDataType)
|
object
|
Exports jqxDataTable's data to Excel, HTML, XML, JSON, CSV or TSV. See also the exportSettings property
Code example
Invoke the exportData method.
$("#dataTable").jqxDataTable('exportData','xls');
Microsoft XMLSS specification
excel-2007-extension-warning.aspx
|
focus
|
()
|
void
|
Focus jqxDataTable.
Code example
Invoke the focus method.
$("#dataTable").jqxDataTable('focus');
|
getColumnProperty
|
(string dataField, string propertyName)
|
object
|
Gets a property value of a column.
Code example
Invoke the getColumnProperty method.
var value = $("#dataTable").jqxDataTable('getColumnProperty', 'firstName', 'width');
|
goToPage
|
(double pageIndex)
|
void
|
Navigates to a page when pageable is set to true.
Code example
Invoke the goToPage method.
$("#dataTable").jqxDataTable('goToPage', 2);
|
goToPrevPage
|
()
|
void
|
Navigates to a previous page when pageable is set to true.
Code example
Invoke the goToPrevPage method.
$("#dataTable").jqxDataTable('goToPrevPage');
|
goToNextPage
|
()
|
void
|
Navigates to a next page when pageable is set to true.
Code example
Invoke the goToNextPage method.
$("#dataTable").jqxDataTable('goToNextPage');
|
getSelection
|
()
|
object[]
|
Returns an array of selected rows.
Code example
Invoke the getSelection method.
$("#dataTable").jqxDataTable('getSelection');
Invoke the getSelection and loop through the selected rows
var selection = $("#table").jqxDataTable('getSelection');
for (var i = 0; i < selection.length; i++) {
// get a selected row.
var rowData = selection[i];
}
|
getRows
|
()
|
object[]
|
Returns an array of all rows loaded in the widget.
Code example
Invoke the getRows method.
$("#dataTable").jqxDataTable('getRows');
Invoke the getRows and loop through the rows
var rows = $("#table").jqxDataTable('getRows');
for (var i = 0; i < rows.length; i++) {
// get a row.
var rowData = rows[i];
}
|
getView
|
()
|
object[]
|
Returns an array of all rows displayed in the view. This method takes into account the Sorting Order and returns the Filtered Set of Rows, if Filtering is applied. The method is different from getRows, because getRows returns a Rows array in their data binding order and that array is not affected by filtering and sorting.
Code example
Invoke the getView method.
$("#dataTable").jqxDataTable('getView');
Invoke the getView and loop through the rows
var rows = $("#table").jqxDataTable('getView');
for (var i = 0; i < rows.length; i++) {
// get a row.
var rowData = rows[i];
}
|
getCellValue
|
(double rowIndex, string dataField)
|
object
|
Returns a value of a cell.
Code example
Invoke the getCellValue method.
var value = $("#dataTable").jqxDataTable('getCellValue', 0, 'firstName');
|
hideColumn
|
(string dataField)
|
void
|
Hides a column.
Code example
Invoke the hideColumn method.
$("#dataTable").jqxDataTable('hideColumn','firstName');
|
hideDetails
|
(bool rowIndex)
|
void
|
Hides the details of a row.
Code example
Invoke the hideDetails method.
$("#dataTable").jqxDataTable('hideDetails', 0);
|
isBindingCompleted
|
()
|
bool
|
Returns whether the binding is completed and if the result is true, this means that you can invoke methods and set properties. Otherwise, if the binding is not completed and you try to set a property or invoke a method, the widget will throw an exception.
Code example
Invoke the isBindingCompleted method.
var isCompleted = $("#dataTable").jqxDataTable('isBindingCompleted');
|
lockRow
|
(double rowIndex)
|
void
|
Locks a row i.e editing of the row would be disabled.
Code example
Invoke the lockRow method.
$("#dataTable").jqxDataTable('lockRow', 0);
|
refresh
|
()
|
void
|
Performs a layout and updates the HTML elements position and size.
Code example
Invoke the refresh method.
$("#dataTable").jqxDataTable('refresh');
|
render
|
()
|
void
|
Renders jqxDataTable.
Code example
Invoke the render method.
$("#dataTable").jqxDataTable('render');
|
removeFilter
|
(string dataField)
|
void
|
Removes a filter.
Code example
Invoke the removeFilter method.
$("#dataTable").jqxDataTable('removeFilter','firstName');
|
scrollOffset
|
(double top, double left)
|
void
|
Scrolls to a position.
Code example
Invoke the scrollOffset method.
$("#dataTable").jqxDataTable('scrollOffset', 10, 10);
Get the scroll position.
var offset = $("#dataTable").jqxDataTable('scrollOffset');
var left = offset.left;
var top = offset.top;
|
setColumnProperty
|
(string dataField, string propertyName, object propertyValue)
|
void
|
Sets a property of a column. See the columns property for more information.
Code example
Invoke the setColumnProperty method.
$("#dataTable").jqxDataTable('setColumnProperty', 'firstName', 'width', 200);
|
showColumn
|
(string dataField)
|
void
|
Shows a column.
Code example
Invoke the showColumn method.
$("#dataTable").jqxDataTable('showColumn', 'firstName');
|
selectRow
|
(double rowIndex)
|
void
|
Selects a row.
Code example
Invoke the selectRow method.
$("#dataTable").jqxDataTable('selectRow', 0);
|
showDetails
|
(double rowIndex)
|
void
|
Shows a row details.
Code example
Invoke the showDetails method.
$("#dataTable").jqxDataTable('showDetails', 0);
|
setCellValue
|
(double rowIndex, string dataField, object value)
|
void
|
Sets a value of a cell.
Code example
Invoke the setCellValue method.
$("#dataTable").jqxDataTable('setCellValue', 0, 'firstName', 'New Value');
|
sortBy
|
(string dataField, object sortOrder)
|
void
|
Sorts a column, if sortable is set to true.
Code example
Invoke the sortBy method.
$("#dataTable").jqxDataTable('sortBy', 'firstName', 'asc');
|
updating
|
()
|
bool
|
Gets a boolean value which determines whether jqxDataTable is in update state i.e the beginUpdate method was called and the endUpdate method is not called yet.
Code example
Invoke the updating method.
var isUpdating = $("#dataTable").jqxDataTable('updating');
|
updateBoundData
|
()
|
void
|
Performs a data bind and updates jqxDataTable with the new data.
Code example
Invoke the updateBoundData method.
$("#dataTable").jqxDataTable('updateBoundData');
|
unselectRow
|
(double rowIndex)
|
void
|
Unselects a row.
Code example
Invoke the unselectRow method.
$("#dataTable").jqxDataTable('unselectRow', 0);
|
updateRow
|
(double rowIndex, object rowData)
|
void
|
Updates the row's data. For synchronization with a server, please look also the jqxDataAdapter plug-in's help documentation.
Code example
Invoke the updateRow method.
$("#dataTable").jqxDataTable('updateRow', 0, {firstName: "New First Name", lastName: "New Last Name"});
|
unlockRow
|
(double rowIndex)
|
void
|
Unlocks a row.
Code example
Invoke the unlockRow method.
$("#dataTable").jqxDataTable('unlockRow', 0);
|