| Name | Type | Default |
|
altRows
# |
Boolean
|
false
|
Sets or gets whether the jqxDataTable automatically alternates row colors.
<template>
<JqxDataTable
ref="myDataTable"
:width="850"
:source="source"
:columns="columns"
:altRows="true"
/>
</template>
<script setup>
import { ref } from 'vue';
import JqxDataTable from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxdatatable.vue';
const sourceData = {
localdata: [
['Maria Anders', 'Sales Representative', 'Berlin', 'Germany'],
['Ana Trujillo', 'Owner', 'México D.F.', 'Mexico'],
['Antonio Moreno', 'Owner', 'México D.F.', 'Mexico']
],
datafields: [
{ name: 'ContactName', type: 'string', map: '0' },
{ name: 'Title', type: 'string', map: '1' },
{ name: 'City', type: 'string', map: '2' },
{ name: 'Country', type: 'string', map: '3' }
],
datatype: 'array'
};
const source = ref(new jqx.dataAdapter(sourceData));
const columns = ref([
{ text: 'Contact Name', datafield: 'ContactName' },
{ text: 'Contact Title', datafield: 'Title' },
{ text: 'City', datafield: 'City' },
{ text: 'Country', datafield: 'Country' }
]);
</script>
Get the altRows property. let altRows = myDataTable.value.altRows;
|
|
autoRowHeight
# |
Boolean
|
true
|
Sets or gets whether the jqxDataTable automatically calculates the rows height and wraps the cell text.
<template>
<JqxDataTable
ref="myDataTable"
:width="450"
:source="source"
:columns="columns"
:autoRowHeight="true"
/>
</template>
<script setup>
import { ref } from 'vue';
import JqxDataTable from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxdatatable.vue';
const sourceData = {
localdata: [
['Maria Anders', 'Sales Representative', 'Berlin', 'Germany'],
['Ana Trujillo', 'Owner', 'México D.F.', 'Mexico'],
['Antonio Moreno', 'Owner', 'México D.F.', 'Mexico']
],
datafields: [
{ name: 'ContactName', type: 'string', map: '0' },
{ name: 'Title', type: 'string', map: '1' },
{ name: 'City', type: 'string', map: '2' },
{ name: 'Country', type: 'string', map: '3' }
],
datatype: 'array'
};
const source = ref(new jqx.dataAdapter(sourceData));
const columns = ref([
{ text: 'Contact Name', datafield: 'ContactName' },
{ text: 'Contact Title', datafield: 'Title' },
{ text: 'City', datafield: 'City' },
{ text: 'Country', datafield: 'Country' }
]);
</script>
Get the autoRowHeight property. let autoRowHeight = myDataTable.value.autoRowHeight;
|
|
aggregatesHeight
# |
Number
|
34
|
Sets or gets the height of the aggregates bar. Aggregates bar is displayed after setting showAggregates to true.
<template>
<JqxDataTable
ref="myDataTable"
:width="850"
:source="source"
:columns="columns"
:aggregatesHeight="40"
:showAggregates="true"
/>
</template>
<script setup>
import { ref } from 'vue';
import JqxDataTable from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxdatatable.vue';
const sourceData = {
localdata: [
['Maria Anders', 'Sales Representative', 'Berlin', 'Germany'],
['Ana Trujillo', 'Owner', 'México D.F.', 'Mexico'],
['Antonio Moreno', 'Owner', 'México D.F.', 'Mexico']
],
datafields: [
{ name: 'ContactName', type: 'string', map: '0' },
{ name: 'Title', type: 'string', map: '1' },
{ name: 'City', type: 'string', map: '2' },
{ name: 'Country', type: 'string', map: '3' }
],
datatype: 'array'
};
const source = ref(new jqx.dataAdapter(sourceData));
const columns = ref([
{ text: 'Contact Name', datafield: 'ContactName', aggregates: ['count'] },
{ text: 'Contact Title', datafield: 'Title' },
{ text: 'City', datafield: 'City' },
{ text: 'Country', datafield: 'Country' }
]);
</script>
Get the aggregatesHeight property. let aggregatesHeight = myDataTable.value.aggregatesHeight;
|
|
autoShowLoadElement
# |
Boolean
|
true
|
Sets or gets whether the loading html element with animated gif is automatically displayed by the widget during the data binding process.
<template>
<JqxDataTable
ref="myDataTable"
:width="850"
:source="source"
:columns="columns"
:autoShowLoadElement="false"
/>
</template>
<script setup>
import { ref } from 'vue';
import JqxDataTable from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxdatatable.vue';
const sourceData = {
localdata: [
['Maria Anders', 'Sales Representative', 'Berlin', 'Germany'],
['Ana Trujillo', 'Owner', 'México D.F.', 'Mexico'],
['Antonio Moreno', 'Owner', 'México D.F.', 'Mexico']
],
datafields: [
{ name: 'ContactName', type: 'string', map: '0' },
{ name: 'Title', type: 'string', map: '1' },
{ name: 'City', type: 'string', map: '2' },
{ name: 'Country', type: 'string', map: '3' }
],
datatype: 'array'
};
const source = ref(new jqx.dataAdapter(sourceData));
const columns = ref([
{ text: 'Contact Name', datafield: 'ContactName' },
{ text: 'Contact Title', datafield: 'Title' },
{ text: 'City', datafield: 'City' },
{ text: 'Country', datafield: 'Country' }
]);
</script>
Get the autoShowLoadElement property. let autoShowLoadElement = myDataTable.value.autoShowLoadElement;
|
|
columnsHeight
# |
Number
|
30
|
Sets or gets the height of the columns header.
<template>
<JqxDataTable
ref="myDataTable"
:width="850"
:source="source"
:columns="columns"
:columnsHeight="20"
/>
</template>
<script setup>
import { ref } from 'vue';
import JqxDataTable from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxdatatable.vue';
const sourceData = {
localdata: [
['Maria Anders', 'Sales Representative', 'Berlin', 'Germany'],
['Ana Trujillo', 'Owner', 'México D.F.', 'Mexico'],
['Antonio Moreno', 'Owner', 'México D.F.', 'Mexico']
],
datafields: [
{ name: 'ContactName', type: 'string', map: '0' },
{ name: 'Title', type: 'string', map: '1' },
{ name: 'City', type: 'string', map: '2' },
{ name: 'Country', type: 'string', map: '3' }
],
datatype: 'array'
};
const source = ref(new jqx.dataAdapter(sourceData));
const columns = ref([
{ text: 'Contact Name', datafield: 'ContactName' },
{ text: 'Contact Title', datafield: 'Title' },
{ text: 'City', datafield: 'City' },
{ text: 'Country', datafield: 'Country' }
]);
</script>
Get the columnsHeight property. let columnsHeight = myDataTable.value.columnsHeight;
|
|
columns
# |
Array
|
[]
|
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.
<template>
<JqxDataTable ref="myDataTable" :width="850" :source="source" :columns="columns" />
</template>
<script setup>
import { ref } from 'vue';
import JqxDataTable from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxdatatable.vue';
const sourceData = {
localdata: [
['Maria Anders', 'Sales Representative', 'Berlin', 'Germany'],
['Ana Trujillo', 'Owner', 'México D.F.', 'Mexico'],
['Antonio Moreno', 'Owner', 'México D.F.', 'Mexico']
],
datafields: [
{ name: 'ContactName', type: 'string', map: '0' },
{ name: 'Title', type: 'string', map: '1' },
{ name: 'City', type: 'string', map: '2' },
{ name: 'Country', type: 'string', map: '3' }
],
datatype: 'array'
};
const source = ref(new jqx.dataAdapter(sourceData));
const columns = ref([
{ text: 'Contact Name', datafield: 'ContactName' },
{ text: 'Contact Title', datafield: 'Title' },
{ text: 'City', datafield: 'City' },
{ text: 'Country', datafield: 'Country' }
]);
</script>
#
|
|
columnGroups
# |
Array
|
[]
|
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'.
<template>
<JqxDataTable
ref="myDataTable"
:width="850"
:source="source"
:columns="columns"
:columnGroups="columnGroups"
/>
</template>
<script setup>
import { ref } from 'vue';
import JqxDataTable from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxdatatable.vue';
const sourceData = {
localdata: [
['Maria Anders', 'Sales Representative', 'Berlin', 'Germany'],
['Ana Trujillo', 'Owner', 'México D.F.', 'Mexico'],
['Antonio Moreno', 'Owner', 'México D.F.', 'Mexico']
],
datafields: [
{ name: 'ContactName', type: 'string', map: '0' },
{ name: 'Title', type: 'string', map: '1' },
{ name: 'City', type: 'string', map: '2' },
{ name: 'Country', type: 'string', map: '3' }
],
datatype: 'array'
};
const columnGroups = ref([
{ text: 'Name', align: 'center', name: 'ContactName' },
{ text: 'City', align: 'center', name: 'City' },
{ text: 'Country', align: 'center', name: 'Country' }
]);
const columns = ref([
{ text: 'Contact Name', datafield: 'ContactName', columngroup: 'ContactName' },
{ text: 'Contact Title', datafield: 'Title' },
{ text: 'City', datafield: 'City', columngroup: 'City' },
{ text: 'Country', datafield: 'Country', columngroup: 'Country' }
]);
const source = ref(new jqx.dataAdapter(sourceData));
</script>
Get the columnGroups property. let columnGroups = myDataTable.value.columnGroups;
|
|
columnsResize
# |
Boolean
|
false
|
Sets or gets the jqxDataTable's columnsResize.
<template>
<JqxDataTable
ref="myDataTable"
:width="850"
:source="source"
:columns="columns"
:columnsResize="true"
/>
</template>
<script setup>
import { ref } from 'vue';
import JqxDataTable from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxdatatable.vue';
const sourceData = {
localdata: [
['Maria Anders', 'Sales Representative', 'Berlin', 'Germany'],
['Ana Trujillo', 'Owner', 'México D.F.', 'Mexico'],
['Antonio Moreno', 'Owner', 'México D.F.', 'Mexico']
],
datafields: [
{ name: 'ContactName', type: 'string', map: '0' },
{ name: 'Title', type: 'string', map: '1' },
{ name: 'City', type: 'string', map: '2' },
{ name: 'Country', type: 'string', map: '3' }
],
datatype: 'array'
};
const source = ref(new jqx.dataAdapter(sourceData));
const columns = ref([
{ text: 'Contact Name', datafield: 'ContactName' },
{ text: 'Contact Title', datafield: 'Title' },
{ text: 'City', datafield: 'City' },
{ text: 'Country', datafield: 'Country' }
]);
</script>
Get the columnsResize property. let columnsResize = myDataTable.value.columnsResize;
|
|
columnsReorder
# |
Boolean
|
false
|
Sets or gets the jqxDataTable's columnsReorder.
<template>
<JqxDataTable
ref="myDataTable"
:width="850"
:source="source"
:columns="columns"
:columnsReorder="true"
/>
</template>
<script setup>
import { ref } from 'vue';
import JqxDataTable from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxdatatable.vue';
const sourceData = {
localdata: [
['Maria Anders', 'Sales Representative', 'Berlin', 'Germany'],
['Ana Trujillo', 'Owner', 'México D.F.', 'Mexico'],
['Antonio Moreno', 'Owner', 'México D.F.', 'Mexico']
],
datafields: [
{ name: 'ContactName', type: 'string', map: '0' },
{ name: 'Title', type: 'string', map: '1' },
{ name: 'City', type: 'string', map: '2' },
{ name: 'Country', type: 'string', map: '3' }
],
datatype: 'array'
};
const source = ref(new jqx.dataAdapter(sourceData));
const columns = ref([
{ text: 'Contact Name', datafield: 'ContactName' },
{ text: 'Contact Title', datafield: 'Title' },
{ text: 'City', datafield: 'City' },
{ text: 'Country', datafield: 'Country' }
]);
</script>
Get the columnsReorder property. let columnsReorder = myDataTable.value.columnsReorder;
|
|
disabled
# |
Boolean
|
false
|
Sets or gets whether the jqxDataTable is disabled.
<template>
<JqxDataTable
ref="myDataTable"
:width="850"
:source="source"
:columns="columns"
:disabled="true"
/>
</template>
<script setup>
import { ref } from 'vue';
import JqxDataTable from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxdatatable.vue';
const sourceData = {
localdata: [
['Maria Anders', 'Sales Representative', 'Berlin', 'Germany'],
['Ana Trujillo', 'Owner', 'México D.F.', 'Mexico'],
['Antonio Moreno', 'Owner', 'México D.F.', 'Mexico']
],
datafields: [
{ name: 'ContactName', type: 'string', map: '0' },
{ name: 'Title', type: 'string', map: '1' },
{ name: 'City', type: 'string', map: '2' },
{ name: 'Country', type: 'string', map: '3' }
],
datatype: 'array'
};
const source = ref(new jqx.dataAdapter(sourceData));
const columns = ref([
{ text: 'Contact Name', datafield: 'ContactName' },
{ text: 'Contact Title', datafield: 'Title' },
{ text: 'City', datafield: 'City' },
{ text: 'Country', datafield: 'Country' }
]);
</script>
Get the disabled property. let disabled = myDataTable.value.disabled;
|
|
editable
# |
Boolean
|
false
|
Sets or gets whether the jqxDataTable editing is enabled.
<template>
<JqxDataTable
ref="myDataTable"
:width="850"
:source="source"
:columns="columns"
:editable="true"
/>
</template>
<script setup>
import { ref } from 'vue';
import JqxDataTable from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxdatatable.vue';
const sourceData = {
localdata: [
['Maria Anders', 'Sales Representative', 'Berlin', 'Germany'],
['Ana Trujillo', 'Owner', 'México D.F.', 'Mexico'],
['Antonio Moreno', 'Owner', 'México D.F.', 'Mexico']
],
datafields: [
{ name: 'ContactName', type: 'string', map: '0' },
{ name: 'Title', type: 'string', map: '1' },
{ name: 'City', type: 'string', map: '2' },
{ name: 'Country', type: 'string', map: '3' }
],
datatype: 'array'
};
const source = ref(new jqx.dataAdapter(sourceData));
const columns = ref([
{ text: 'Contact Name', datafield: 'ContactName' },
{ text: 'Contact Title', datafield: 'Title' },
{ text: 'City', datafield: 'City' },
{ text: 'Country', datafield: 'Country' }
]);
</script>
Get the editable property. let editable = myDataTable.value.editable;
|
|
editSettings
# |
Object
|
{ saveOnPageChange: true, saveOnBlur: true, saveOnSelectionChange: true, cancelOnEsc: true, saveOnEnter: true, editSingleCell: false, editOnDoubleClick: true, editOnF2: true }
|
Sets or gets the jqxDataTable's edit settings.
<template>
<JqxDataTable
ref="myDataTable"
:width="850"
:source="source"
:columns="columns"
:editSettings="editSettings"
:editable="editable"
/>
</template>
<script setup>
import { ref } from 'vue';
import JqxDataTable from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxdatatable.vue';
const sourceData = {
localdata: [
['Maria Anders', 'Sales Representative', 'Berlin', 'Germany'],
['Ana Trujillo', 'Owner', 'México D.F.', 'Mexico'],
['Antonio Moreno', 'Owner', 'México D.F.', 'Mexico']
],
datafields: [
{ name: 'ContactName', type: 'string', map: '0' },
{ name: 'Title', type: 'string', map: '1' },
{ name: 'City', type: 'string', map: '2' },
{ name: 'Country', type: 'string', map: '3' }
],
datatype: 'array'
};
const editSettings = ref({
saveOnPageChange: true,
saveOnBlur: true,
saveOnSelectionChange: false,
cancelOnEsc: true,
saveOnEnter: true,
editSingleCell: false,
editOnDoubleClick: true,
editOnF2: true
});
const editable = ref(true);
const source = ref(new jqx.dataAdapter(sourceData));
const columns = ref([
{ text: 'Contact Name', datafield: 'ContactName' },
{ text: 'Contact Title', datafield: 'Title' },
{ text: 'City', datafield: 'City' },
{ text: 'Country', datafield: 'Country' }
]);
</script>
|
|
exportSettings
# |
Object
|
{ columnsHeader: true, hiddenColumns: false, serverURL: null, characterSet: null, recordsInView: true, fileName: "jqxDataTable"}
|
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.
<template>
<JqxDataTable
ref="myDataTable"
:width="850"
:source="source"
:columns="columns"
:exportSettings="exportSettings"
:ready="ready"
/>
</template>
<script setup>
import { ref } from 'vue';
import JqxDataTable from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxdatatable.vue';
const myDataTable = ref(null);
const sourceData = {
localdata: [
['Maria Anders', 'Sales Representative', 'Berlin', 'Germany'],
['Ana Trujillo', 'Owner', 'México D.F.', 'Mexico'],
['Antonio Moreno', 'Owner', 'México D.F.', 'Mexico']
],
datafields: [
{ name: 'ContactName', type: 'string', map: '0' },
{ name: 'Title', type: 'string', map: '1' },
{ name: 'City', type: 'string', map: '2' },
{ name: 'Country', type: 'string', map: '3' }
],
datatype: 'array'
};
const exportSettings = ref({
columnsHeader: true,
hiddenColumns: false,
serverURL: null,
characterSet: null,
recordsInView: true,
fileName: 'jqxDataTable'
});
const source = ref(new jqx.dataAdapter(sourceData));
const columns = ref([
{ text: 'Contact Name', datafield: 'ContactName' },
{ text: 'Contact Title', datafield: 'Title' },
{ text: 'City', datafield: 'City' },
{ text: 'Country', datafield: 'Country' }
]);
const ready = ref(() => {
myDataTable.value.exportData('html');
});
</script>
Get the exportSettings property. let exportSettings = myDataTable.value.exportSettings;
|
|
enableHover
# |
Boolean
|
true
|
Sets or gets whether row highlighting is enabled.
<template>
<JqxDataTable
ref="myDataTable"
:width="850"
:source="source"
:columns="columns"
:enableHover="true"
/>
</template>
<script setup>
import { ref } from 'vue';
import JqxDataTable from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxdatatable.vue';
const sourceData = {
localdata: [
['Maria Anders', 'Sales Representative', 'Berlin', 'Germany'],
['Ana Trujillo', 'Owner', 'México D.F.', 'Mexico'],
['Antonio Moreno', 'Owner', 'México D.F.', 'Mexico']
],
datafields: [
{ name: 'ContactName', type: 'string', map: '0' },
{ name: 'Title', type: 'string', map: '1' },
{ name: 'City', type: 'string', map: '2' },
{ name: 'Country', type: 'string', map: '3' }
],
datatype: 'array'
};
const source = ref(new jqx.dataAdapter(sourceData));
const columns = ref([
{ text: 'Contact Name', datafield: 'ContactName' },
{ text: 'Contact Title', datafield: 'Title' },
{ text: 'City', datafield: 'City' },
{ text: 'Country', datafield: 'Country' }
]);
</script>
Get the enableHover property. let enableHover = myDataTable.value.enableHover;
|
|
enableBrowserSelection
# |
Boolean
|
false
|
Enables or disables the default text selection of the web browser.
<template>
<JqxDataTable
ref="myDataTable"
:width="850"
:source="source"
:columns="columns"
:enableBrowserSelection="true"
/>
</template>
<script setup>
import { ref } from 'vue';
import JqxDataTable from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxdatatable.vue';
const sourceData = {
localdata: [
['Maria Anders', 'Sales Representative', 'Berlin', 'Germany'],
['Ana Trujillo', 'Owner', 'México D.F.', 'Mexico'],
['Antonio Moreno', 'Owner', 'México D.F.', 'Mexico']
],
datafields: [
{ name: 'ContactName', type: 'string', map: '0' },
{ name: 'Title', type: 'string', map: '1' },
{ name: 'City', type: 'string', map: '2' },
{ name: 'Country', type: 'string', map: '3' }
],
datatype: 'array'
};
const source = ref(new jqx.dataAdapter(sourceData));
const columns = ref([
{ text: 'Contact Name', datafield: 'ContactName' },
{ text: 'Contact Title', datafield: 'Title' },
{ text: 'City', datafield: 'City' },
{ text: 'Country', datafield: 'Country' }
]);
</script>
Get the enableBrowserSelection property. let enableBrowserSelection = myDataTable.value.enableBrowserSelection;
|
|
filterable
# |
Boolean
|
false
|
Enables/Disables the filtering feature.
<template>
<JqxDataTable
ref="myDataTable"
:width="850"
:source="source"
:columns="columns"
:filterable="true"
/>
</template>
<script setup>
import { ref } from 'vue';
import JqxDataTable from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxdatatable.vue';
const sourceData = {
localdata: [
['Maria Anders', 'Sales Representative', 'Berlin', 'Germany'],
['Ana Trujillo', 'Owner', 'México D.F.', 'Mexico'],
['Antonio Moreno', 'Owner', 'México D.F.', 'Mexico']
],
datafields: [
{ name: 'ContactName', type: 'string', map: '0' },
{ name: 'Title', type: 'string', map: '1' },
{ name: 'City', type: 'string', map: '2' },
{ name: 'Country', type: 'string', map: '3' }
],
datatype: 'array'
};
const source = ref(new jqx.dataAdapter(sourceData));
const columns = ref([
{ text: 'Contact Name', datafield: 'ContactName' },
{ text: 'Contact Title', datafield: 'Title' },
{ text: 'City', datafield: 'City' },
{ text: 'Country', datafield: 'Country' }
]);
</script>
Get the filterable property. let filterable = myDataTable.value.filterable;
|
|
filterHeight
# |
Number
|
30
|
Sets or gets the Filter Element's height.
<template>
<JqxDataTable
ref="myDataTable"
:width="850"
:source="source"
:columns="columns"
:filterHeight="35"
:filterable="true"
/>
</template>
<script setup>
import { ref } from 'vue';
import JqxDataTable from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxdatatable.vue';
const sourceData = {
localdata: [
['Maria Anders', 'Sales Representative', 'Berlin', 'Germany'],
['Ana Trujillo', 'Owner', 'México D.F.', 'Mexico'],
['Antonio Moreno', 'Owner', 'México D.F.', 'Mexico']
],
datafields: [
{ name: 'ContactName', type: 'string', map: '0' },
{ name: 'Title', type: 'string', map: '1' },
{ name: 'City', type: 'string', map: '2' },
{ name: 'Country', type: 'string', map: '3' }
],
datatype: 'array'
};
const source = ref(new jqx.dataAdapter(sourceData));
const columns = ref([
{ text: 'Contact Name', datafield: 'ContactName' },
{ text: 'Contact Title', datafield: 'Title' },
{ text: 'City', datafield: 'City' },
{ text: 'Country', datafield: 'Country' }
]);
</script>
Get the filterHeight property. let filterHeight = myDataTable.value.filterHeight;
|
|
filterMode
# |
String
|
"default"
|
Determines the Filter's mode. Possible values: "default", "simple" and "advanced"
<template>
<JqxDataTable
ref="myDataTable"
:width="850"
:source="source"
:columns="columns"
:filterable="true"
:filterMode="'advanced'"
/>
</template>
<script setup>
import { ref } from 'vue';
import JqxDataTable from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxdatatable.vue';
const sourceData = {
localdata: [
['Maria Anders', 'Sales Representative', 'Berlin', 'Germany'],
['Ana Trujillo', 'Owner', 'México D.F.', 'Mexico'],
['Antonio Moreno', 'Owner', 'México D.F.', 'Mexico']
],
datafields: [
{ name: 'ContactName', type: 'string', map: '0' },
{ name: 'Title', type: 'string', map: '1' },
{ name: 'City', type: 'string', map: '2' },
{ name: 'Country', type: 'string', map: '3' }
],
datatype: 'array'
};
const source = ref(new jqx.dataAdapter(sourceData));
const columns = ref([
{ text: 'Contact Name', datafield: 'ContactName' },
{ text: 'Contact Title', datafield: 'Title' },
{ text: 'City', datafield: 'City' },
{ text: 'Country', datafield: 'Country' }
]);
</script>
Get the filterMode property. let filterMode = myDataTable.value.filterMode;
|
|
groups
# |
Array
|
[]
|
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).
<template>
<JqxDataTable
ref="myDataTable"
:width="850"
:source="source"
:columns="columns"
:groups="['Country']"
/>
</template>
<script setup>
import { ref } from 'vue';
import JqxDataTable from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxdatatable.vue';
const sourceData = {
localdata: [
['Maria Anders', 'Sales Representative', 'Berlin', 'Germany'],
['Ana Trujillo', 'Owner', 'México D.F.', 'Mexico'],
['Antonio Moreno', 'Owner', 'México D.F.', 'Mexico']
],
datafields: [
{ name: 'ContactName', type: 'string', map: '0' },
{ name: 'Title', type: 'string', map: '1' },
{ name: 'City', type: 'string', map: '2' },
{ name: 'Country', type: 'string', map: '3' }
],
datatype: 'array'
};
const source = ref(new jqx.dataAdapter(sourceData));
const columns = ref([
{ text: 'Contact Name', datafield: 'ContactName' },
{ text: 'Contact Title', datafield: 'Title' },
{ text: 'City', datafield: 'City' },
{ text: 'Country', datafield: 'Country' }
]);
</script>
Get the groups property. let groups = myDataTable.value.groups;
|
|
groupsRenderer
# |
Function
|
null
|
Callback function which allows you to customize the rendering of the group headers.
<template>
<JqxDataTable
ref="myDataTable"
:width="850"
:source="source"
:columns="columns"
:groupsRenderer="groupsRenderer"
:groups="['ContactName']"
/>
</template>
<script setup>
import { ref } from 'vue';
import JqxDataTable from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxdatatable.vue';
const sourceData = {
localdata: [
['Maria Anders', 'Sales Representative', 'Berlin', 'Germany'],
['Ana Trujillo', 'Owner', 'México D.F.', 'Mexico'],
['Antonio Moreno', 'Owner', 'México D.F.', 'Mexico']
],
datafields: [
{ name: 'ContactName', type: 'string', map: '0' },
{ name: 'Title', type: 'string', map: '1' },
{ name: 'City', type: 'string', map: '2' },
{ name: 'Country', type: 'string', map: '3' }
],
datatype: 'array'
};
const source = ref(new jqx.dataAdapter(sourceData));
const columns = ref([
{ text: 'Contact Name', datafield: 'ContactName' },
{ text: 'Contact Title', datafield: 'Title' },
{ text: 'City', datafield: 'City' },
{ text: 'Country', datafield: 'Country' }
]);
function groupsRenderer(value, rowdata, level) {
return 'First Name: ' + value;
}
</script>
|
|
height
# |
Number | String
|
null
|
Sets or gets the jqxDataTable's height.
<template>
<JqxDataTable
ref="myDataTable"
:width="850"
:source="source"
:columns="columns"
:height="350"
/>
</template>
<script setup>
import { ref } from 'vue';
import JqxDataTable from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxdatatable.vue';
const sourceData = {
localdata: [
['Maria Anders', 'Sales Representative', 'Berlin', 'Germany'],
['Ana Trujillo', 'Owner', 'México D.F.', 'Mexico'],
['Antonio Moreno', 'Owner', 'México D.F.', 'Mexico']
],
datafields: [
{ name: 'ContactName', type: 'string', map: '0' },
{ name: 'Title', type: 'string', map: '1' },
{ name: 'City', type: 'string', map: '2' },
{ name: 'Country', type: 'string', map: '3' }
],
datatype: 'array'
};
const source = ref(new jqx.dataAdapter(sourceData));
const columns = ref([
{ text: 'Contact Name', datafield: 'ContactName' },
{ text: 'Contact Title', datafield: 'Title' },
{ text: 'City', datafield: 'City' },
{ text: 'Country', datafield: 'Country' }
]);
</script>
Get the height property. let height = myDataTable.value.height;
|
|
initRowDetails
# |
Function
|
null
|
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
<template>
<JqxDataTable
ref="myDataTable"
:width="850"
:source="source"
:columns="columns"
:initRowDetails="initRowDetails"
:rowDetails="true"
/>
</template>
<script setup>
import { ref } from 'vue';
import JqxDataTable from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxdatatable.vue';
const sourceData = {
localdata: [
['Maria Anders', 'Sales Representative', 'Berlin', 'Germany'],
['Ana Trujillo', 'Owner', 'México D.F.', 'Mexico'],
['Antonio Moreno', 'Owner', 'México D.F.', 'Mexico']
],
datafields: [
{ name: 'ContactName', type: 'string', map: '0' },
{ name: 'Title', type: 'string', map: '1' },
{ name: 'City', type: 'string', map: '2' },
{ name: 'Country', type: 'string', map: '3' }
],
datatype: 'array'
};
const source = ref(new jqx.dataAdapter(sourceData));
const columns = ref([
{ text: 'Contact Name', datafield: 'ContactName' },
{ text: 'Contact Title', datafield: 'Title' },
{ text: 'City', datafield: 'City' },
{ text: 'Country', datafield: 'Country' }
]);
function initRowDetails(id, row, element, rowinfo) {
const container = document.createElement('div');
container.innerHTML = 'Some Details...';
element[0].appendChild(container);
}
</script>
|
|
incrementalSearch
# |
Boolean
|
true
|
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.
<template>
<JqxDataTable
ref="myDataTable"
:width="850"
:source="source"
:columns="columns"
:incrementalSearch="true"
/>
</template>
<script setup>
import { ref } from 'vue';
import JqxDataTable from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxdatatable.vue';
const sourceData = {
localdata: [
['Maria Anders', 'Sales Representative', 'Berlin', 'Germany'],
['Ana Trujillo', 'Owner', 'México D.F.', 'Mexico'],
['Antonio Moreno', 'Owner', 'México D.F.', 'Mexico']
],
datafields: [
{ name: 'ContactName', type: 'string', map: '0' },
{ name: 'Title', type: 'string', map: '1' },
{ name: 'City', type: 'string', map: '2' },
{ name: 'Country', type: 'string', map: '3' }
],
datatype: 'array'
};
const source = ref(new jqx.dataAdapter(sourceData));
const columns = ref([
{ text: 'Contact Name', datafield: 'ContactName' },
{ text: 'Contact Title', datafield: 'Title' },
{ text: 'City', datafield: 'City' },
{ text: 'Country', datafield: 'Country' }
]);
</script>
Get the incrementalSearch property. let incrementalSearch = myDataTable.value.incrementalSearch;
|
|
localization
# |
Object
|
default localization strings.
|
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." };
<template>
<JqxDataTable
ref="myDataTable"
:width="850"
:source="source"
:columns="columns"
:localization="localization"
:pageable="true"
/>
</template>
<script setup>
import { ref } from 'vue';
import JqxDataTable from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxdatatable.vue';
const sourceData = {
localdata: [
['Maria Anders', 'Sales Representative', 'Berlin', 'Germany'],
['Ana Trujillo', 'Owner', 'México D.F.', 'Mexico'],
['Antonio Moreno', 'Owner', 'México D.F.', 'Mexico']
],
datafields: [
{ name: 'ContactName', type: 'string', map: '0' },
{ name: 'Title', type: 'string', map: '1' },
{ name: 'City', type: 'string', map: '2' },
{ name: 'Country', type: 'string', map: '3' }
],
datatype: 'array'
};
const localization = ref({
pagerGoToPageString: 'Gehe zu:',
pagerShowRowsString: 'Zeige Zeile:',
pagerRangeString: ' von ',
pagerNextButtonString: 'voriger',
pagerFirstButtonString: 'first',
pagerLastButtonString: 'last',
pagerPreviousButtonString: 'nächster'
});
const source = ref(new jqx.dataAdapter(sourceData));
const columns = ref([
{ text: 'Contact Name', datafield: 'ContactName' },
{ text: 'Contact Title', datafield: 'Title' },
{ text: 'City', datafield: 'City' },
{ text: 'Country', datafield: 'Country' }
]);
</script>
Get the localization property. let localization = myDataTable.value.localization;
|
Sets or gets the height of the jqxDataTable's Pager(s). Pager(s) is(are) displayed after setting pageable to true.
<template>
<JqxDataTable
ref="myDataTable"
:width="850"
:source="source"
:columns="columns"
:pagerHeight="35"
:pageable="true"
/>
</template>
<script setup>
import { ref } from 'vue';
import JqxDataTable from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxdatatable.vue';
const sourceData = {
localdata: [
['Maria Anders', 'Sales Representative', 'Berlin', 'Germany'],
['Ana Trujillo', 'Owner', 'México D.F.', 'Mexico'],
['Antonio Moreno', 'Owner', 'México D.F.', 'Mexico']
],
datafields: [
{ name: 'ContactName', type: 'string', map: '0' },
{ name: 'Title', type: 'string', map: '1' },
{ name: 'City', type: 'string', map: '2' },
{ name: 'Country', type: 'string', map: '3' }
],
datatype: 'array'
};
const source = ref(new jqx.dataAdapter(sourceData));
const columns = ref([
{ text: 'Contact Name', datafield: 'ContactName' },
{ text: 'Contact Title', datafield: 'Title' },
{ text: 'City', datafield: 'City' },
{ text: 'Country', datafield: 'Country' }
]);
</script>
Get the pagerHeight property. let pagerHeight = myDataTable.value.pagerHeight;
|
|
pageSize
# |
Number
|
10
|
Sets or gets the rows count per page when paging is enabled.
<template>
<JqxDataTable
ref="myDataTable"
:width="850"
:source="source"
:columns="columns"
:pageSize="15"
:pageable="true"
/>
</template>
<script setup>
import { ref } from 'vue';
import JqxDataTable from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxdatatable.vue';
const sourceData = {
localdata: [
['Maria Anders', 'Sales Representative', 'Berlin', 'Germany'],
['Ana Trujillo', 'Owner', 'México D.F.', 'Mexico'],
['Antonio Moreno', 'Owner', 'México D.F.', 'Mexico']
],
datafields: [
{ name: 'ContactName', type: 'string', map: '0' },
{ name: 'Title', type: 'string', map: '1' },
{ name: 'City', type: 'string', map: '2' },
{ name: 'Country', type: 'string', map: '3' }
],
datatype: 'array'
};
const source = ref(new jqx.dataAdapter(sourceData));
const columns = ref([
{ text: 'Contact Name', datafield: 'ContactName' },
{ text: 'Contact Title', datafield: 'Title' },
{ text: 'City', datafield: 'City' },
{ text: 'Country', datafield: 'Country' }
]);
</script>
Get the pageSize property. let pageSize = myDataTable.value.pageSize;
|
|
pageSizeOptions
# |
Array
|
['5', '10', '20']
|
Sets or gets the jqxDataTable's page size options when paging is enabled and the pagerMode property is set to "advanced".
<template>
<JqxDataTable
ref="myDataTable"
:width="850"
:source="source"
:columns="columns"
:pageSizeOptions="[15, 25, 35]"
:pageable="true"
:pagerMode="'advanced'"
/>
</template>
<script setup>
import { ref } from 'vue';
import JqxDataTable from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxdatatable.vue';
const sourceData = {
localdata: [
['Maria Anders', 'Sales Representative', 'Berlin', 'Germany'],
['Ana Trujillo', 'Owner', 'México D.F.', 'Mexico'],
['Antonio Moreno', 'Owner', 'México D.F.', 'Mexico']
],
datafields: [
{ name: 'ContactName', type: 'string', map: '0' },
{ name: 'Title', type: 'string', map: '1' },
{ name: 'City', type: 'string', map: '2' },
{ name: 'Country', type: 'string', map: '3' }
],
datatype: 'array'
};
const source = ref(new jqx.dataAdapter(sourceData));
const columns = ref([
{ text: 'Contact Name', datafield: 'ContactName' },
{ text: 'Contact Title', datafield: 'Title' },
{ text: 'City', datafield: 'City' },
{ text: 'Country', datafield: 'Country' }
]);
</script>
Get the pageSizeOptions property. let pageSizeOptions = myDataTable.value.pageSizeOptions;
|
|
pageable
# |
Boolean
|
false
|
Determines whether the jqxDataTable is in paging mode.
<template>
<JqxDataTable
ref="myDataTable"
:width="850"
:source="source"
:columns="columns"
:pageable="true"
/>
</template>
<script setup>
import { ref } from 'vue';
import JqxDataTable from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxdatatable.vue';
const sourceData = {
localdata: [
['Maria Anders', 'Sales Representative', 'Berlin', 'Germany'],
['Ana Trujillo', 'Owner', 'México D.F.', 'Mexico'],
['Antonio Moreno', 'Owner', 'México D.F.', 'Mexico']
],
datafields: [
{ name: 'ContactName', type: 'string', map: '0' },
{ name: 'Title', type: 'string', map: '1' },
{ name: 'City', type: 'string', map: '2' },
{ name: 'Country', type: 'string', map: '3' }
],
datatype: 'array'
};
const source = ref(new jqx.dataAdapter(sourceData));
const columns = ref([
{ text: 'Contact Name', datafield: 'ContactName' },
{ text: 'Contact Title', datafield: 'Title' },
{ text: 'City', datafield: 'City' },
{ text: 'Country', datafield: 'Country' }
]);
</script>
Get the pageable property. let pageable = myDataTable.value.pageable;
|
Sets or gets the Pager's position. Possible values: 'top', 'bottom' and 'both'
<template>
<JqxDataTable
ref="myDataTable"
:width="850"
:source="source"
:columns="columns"
:pagerPosition="'top'"
:pageable="true"
/>
</template>
<script setup>
import { ref } from 'vue';
import JqxDataTable from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxdatatable.vue';
const sourceData = {
localdata: [
['Maria Anders', 'Sales Representative', 'Berlin', 'Germany'],
['Ana Trujillo', 'Owner', 'México D.F.', 'Mexico'],
['Antonio Moreno', 'Owner', 'México D.F.', 'Mexico']
],
datafields: [
{ name: 'ContactName', type: 'string', map: '0' },
{ name: 'Title', type: 'string', map: '1' },
{ name: 'City', type: 'string', map: '2' },
{ name: 'Country', type: 'string', map: '3' }
],
datatype: 'array'
};
const source = ref(new jqx.dataAdapter(sourceData));
const columns = ref([
{ text: 'Contact Name', datafield: 'ContactName' },
{ text: 'Contact Title', datafield: 'Title' },
{ text: 'City', datafield: 'City' },
{ text: 'Country', datafield: 'Country' }
]);
</script>
Get the pagerPosition property. let pagerPosition = myDataTable.value.pagerPosition;
|
Sets or gets the Pager's mode. Possible values: "default" and "advanced"
<template>
<JqxDataTable
ref="myDataTable"
:width="850"
:source="source"
:columns="columns"
:pagerMode="'advanced'"
:pageable="true"
/>
</template>
<script setup>
import { ref } from 'vue';
import JqxDataTable from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxdatatable.vue';
const sourceData = {
localdata: [
['Maria Anders', 'Sales Representative', 'Berlin', 'Germany'],
['Ana Trujillo', 'Owner', 'México D.F.', 'Mexico'],
['Antonio Moreno', 'Owner', 'México D.F.', 'Mexico']
],
datafields: [
{ name: 'ContactName', type: 'string', map: '0' },
{ name: 'Title', type: 'string', map: '1' },
{ name: 'City', type: 'string', map: '2' },
{ name: 'Country', type: 'string', map: '3' }
],
datatype: 'array'
};
const source = ref(new jqx.dataAdapter(sourceData));
const columns = ref([
{ text: 'Contact Name', datafield: 'ContactName' },
{ text: 'Contact Title', datafield: 'Title' },
{ text: 'City', datafield: 'City' },
{ text: 'Country', datafield: 'Country' }
]);
</script>
Get the pagerMode property. let pagerMode = myDataTable.value.pagerMode;
|
Sets or gets the count of the buttons displayed on the Pager when pagerMode is set to "default".
<template>
<JqxDataTable
ref="myDataTable"
:width="850"
:source="source"
:columns="columns"
:pagerButtonsCount="10"
:pageable="true"
/>
</template>
<script setup>
import { ref } from 'vue';
import JqxDataTable from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxdatatable.vue';
const sourceData = {
localdata: [
['Maria Anders', 'Sales Representative', 'Berlin', 'Germany'],
['Ana Trujillo', 'Owner', 'México D.F.', 'Mexico'],
['Antonio Moreno', 'Owner', 'México D.F.', 'Mexico']
],
datafields: [
{ name: 'ContactName', type: 'string', map: '0' },
{ name: 'Title', type: 'string', map: '1' },
{ name: 'City', type: 'string', map: '2' },
{ name: 'Country', type: 'string', map: '3' }
],
datatype: 'array'
};
const source = ref(new jqx.dataAdapter(sourceData));
const columns = ref([
{ text: 'Contact Name', datafield: 'ContactName' },
{ text: 'Contact Title', datafield: 'Title' },
{ text: 'City', datafield: 'City' },
{ text: 'Country', datafield: 'Country' }
]);
</script>
Get the pagerButtonsCount property. let pagerButtonsCount = myDataTable.value.pagerButtonsCount;
|
Enables custom rendering of the Pager.
<template>
<JqxDataTable
ref="myDataTable"
:width="850"
:source="source"
:columns="columns"
:pagerRenderer="pagerRenderer"
:pageable="true"
/>
</template>
<script setup>
import { ref } from 'vue';
import JqxDataTable from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxdatatable.vue';
const sourceData = {
localdata: [
['Maria Anders', 'Sales Representative', 'Berlin', 'Germany'],
['Ana Trujillo', 'Owner', 'México D.F.', 'Mexico'],
['Antonio Moreno', 'Owner', 'México D.F.', 'Mexico']
],
datafields: [
{ name: 'ContactName', type: 'string', map: '0' },
{ name: 'Title', type: 'string', map: '1' },
{ name: 'City', type: 'string', map: '2' },
{ name: 'Country', type: 'string', map: '3' }
],
datatype: 'array'
};
const source = ref(new jqx.dataAdapter(sourceData));
const columns = ref([
{ text: 'Contact Name', datafield: 'ContactName' },
{ text: 'Contact Title', datafield: 'Title' },
{ text: 'City', datafield: 'City' },
{ text: 'Country', datafield: 'Country' }
]);
function pagerRenderer() {
// Do something here and return a HTML Element as a result.
}
</script>
|
|
ready
# |
Function
|
null
|
Callback function which is called when the jqxDataTable is rendered and data binding is completed..
<template>
<JqxDataTable
ref="myDataTable"
:width="850"
:source="source"
:columns="columns"
:ready="ready"
/>
</template>
<script setup>
import { ref } from 'vue';
import JqxDataTable from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxdatatable.vue';
const sourceData = {
localdata: [
['Maria Anders', 'Sales Representative', 'Berlin', 'Germany'],
['Ana Trujillo', 'Owner', 'México D.F.', 'Mexico'],
['Antonio Moreno', 'Owner', 'México D.F.', 'Mexico']
],
datafields: [
{ name: 'ContactName', type: 'string', map: '0' },
{ name: 'Title', type: 'string', map: '1' },
{ name: 'City', type: 'string', map: '2' },
{ name: 'Country', type: 'string', map: '3' }
],
datatype: 'array'
};
const source = ref(new jqx.dataAdapter(sourceData));
const columns = ref([
{ text: 'Contact Name', datafield: 'ContactName' },
{ text: 'Contact Title', datafield: 'Title' },
{ text: 'City', datafield: 'City' },
{ text: 'Country', datafield: 'Country' }
]);
function ready() {
alert('Ready!');
}
</script>
|
|
rowDetails
# |
Boolean
|
false
|
Sets or gets whether the jqxDataTable rows have details and can be expanded/collapsed. See the initRowDetails for initialization of the row details.
<template>
<JqxDataTable
ref="myDataTable"
:width="850"
:source="source"
:columns="columns"
:initRowDetails="initRowDetails"
:rowDetails="true"
/>
</template>
<script setup>
import { ref } from 'vue';
import JqxDataTable from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxdatatable.vue';
const sourceData = {
localdata: [
['Maria Anders', 'Sales Representative', 'Berlin', 'Germany'],
['Ana Trujillo', 'Owner', 'México D.F.', 'Mexico'],
['Antonio Moreno', 'Owner', 'México D.F.', 'Mexico']
],
datafields: [
{ name: 'ContactName', type: 'string', map: '0' },
{ name: 'Title', type: 'string', map: '1' },
{ name: 'City', type: 'string', map: '2' },
{ name: 'Country', type: 'string', map: '3' }
],
datatype: 'array'
};
const source = ref(new jqx.dataAdapter(sourceData));
const columns = ref([
{ text: 'Contact Name', datafield: 'ContactName' },
{ text: 'Contact Title', datafield: 'Title' },
{ text: 'City', datafield: 'City' },
{ text: 'Country', datafield: 'Country' }
]);
function initRowDetails(id, row, element, rowinfo) {
const container = document.createElement('div');
container.innerHTML = 'Some Details...';
element[0].appendChild(container);
}
</script>
Get the rowDetails property. let rowDetails = myDataTable.value.rowDetails;
|
|
renderToolbar
# |
Function
|
null
|
Enables custom rendering of the Toolbar.
<template>
<JqxDataTable
ref="myDataTable"
:width="850"
:source="source"
:columns="columns"
:renderToolbar="renderToolbar"
:showToolbar="true"
/>
</template>
<script setup>
import { ref } from 'vue';
import JqxDataTable from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxdatatable.vue';
const sourceData = {
localdata: [
['Maria Anders', 'Sales Representative', 'Berlin', 'Germany'],
['Ana Trujillo', 'Owner', 'México D.F.', 'Mexico'],
['Antonio Moreno', 'Owner', 'México D.F.', 'Mexico']
],
datafields: [
{ name: 'ContactName', type: 'string', map: '0' },
{ name: 'Title', type: 'string', map: '1' },
{ name: 'City', type: 'string', map: '2' },
{ name: 'Country', type: 'string', map: '3' }
],
datatype: 'array'
};
const source = ref(new jqx.dataAdapter(sourceData));
const columns = ref([
{ text: 'Contact Name', datafield: 'ContactName' },
{ text: 'Contact Title', datafield: 'Title' },
{ text: 'City', datafield: 'City' },
{ text: 'Country', datafield: 'Country' }
]);
function renderToolbar(toolbar) {
const container = document.createElement('div');
container.innerHTML = 'Some custom HTML here...';
toolbar.append(container);
}
</script>
Get the renderToolbar property. let renderToolbar = myDataTable.value.renderToolbar;
|
|
renderStatusBar
# |
Function
|
null
|
Enables custom rendering of the Statusbar.
<template>
<JqxDataTable
ref="myDataTable"
:width="850"
:source="source"
:columns="columns"
:renderStatusBar="renderStatusBar"
:showStatusbar="true"
/>
</template>
<script setup>
import { ref } from 'vue';
import JqxDataTable from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxdatatable.vue';
const sourceData = {
localdata: [
['Maria Anders', 'Sales Representative', 'Berlin', 'Germany'],
['Ana Trujillo', 'Owner', 'México D.F.', 'Mexico'],
['Antonio Moreno', 'Owner', 'México D.F.', 'Mexico']
],
datafields: [
{ name: 'ContactName', type: 'string', map: '0' },
{ name: 'Title', type: 'string', map: '1' },
{ name: 'City', type: 'string', map: '2' },
{ name: 'Country', type: 'string', map: '3' }
],
datatype: 'array'
};
const source = ref(new jqx.dataAdapter(sourceData));
const columns = ref([
{ text: 'Contact Name', datafield: 'ContactName' },
{ text: 'Contact Title', datafield: 'Title' },
{ text: 'City', datafield: 'City' },
{ text: 'Country', datafield: 'Country' }
]);
function renderStatusBar(toolbar) {
const container = document.createElement('div');
container.innerHTML = 'Some custom HTML here...';
toolbar.append(container);
}
</script>
Get the renderStatusBar property. let renderStatusBar = myDataTable.value.renderStatusBar;
|
|
rendering
# |
Function
|
null
|
Callback function which is called before the rendering of the jqxDataTable's rows.
<template>
<JqxDataTable
ref="myDataTable"
:width="850"
:source="source"
:columns="columns"
:rendering="rendering"
/>
</template>
<script setup>
import { ref } from 'vue';
import JqxDataTable from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxdatatable.vue';
const sourceData = {
localdata: [
['Maria Anders', 'Sales Representative', 'Berlin', 'Germany'],
['Ana Trujillo', 'Owner', 'México D.F.', 'Mexico'],
['Antonio Moreno', 'Owner', 'México D.F.', 'Mexico']
],
datafields: [
{ name: 'ContactName', type: 'string', map: '0' },
{ name: 'Title', type: 'string', map: '1' },
{ name: 'City', type: 'string', map: '2' },
{ name: 'Country', type: 'string', map: '3' }
],
datatype: 'array'
};
const source = ref(new jqx.dataAdapter(sourceData));
const columns = ref([
{ text: 'Contact Name', datafield: 'ContactName' },
{ text: 'Contact Title', datafield: 'Title' },
{ text: 'City', datafield: 'City' },
{ text: 'Country', datafield: 'Country' }
]);
function rendering() {
alert('Rendering!');
}
</script>
|
|
rendered
# |
Function
|
null
|
Callback function which is called after the rendering of the jqxDataTable's row.
<template>
<JqxDataTable
ref="myDataTable"
:width="850"
:source="source"
:columns="columns"
:rendered="rendered"
/>
</template>
<script setup>
import { ref } from 'vue';
import JqxDataTable from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxdatatable.vue';
const sourceData = {
localdata: [
['Maria Anders', 'Sales Representative', 'Berlin', 'Germany'],
['Ana Trujillo', 'Owner', 'México D.F.', 'Mexico'],
['Antonio Moreno', 'Owner', 'México D.F.', 'Mexico']
],
datafields: [
{ name: 'ContactName', type: 'string', map: '0' },
{ name: 'Title', type: 'string', map: '1' },
{ name: 'City', type: 'string', map: '2' },
{ name: 'Country', type: 'string', map: '3' }
],
datatype: 'array'
};
const source = ref(new jqx.dataAdapter(sourceData));
const columns = ref([
{ text: 'Contact Name', datafield: 'ContactName' },
{ text: 'Contact Title', datafield: 'Title' },
{ text: 'City', datafield: 'City' },
{ text: 'Country', datafield: 'Country' }
]);
function rendered() {
alert('Rendered!');
}
</script>
|
|
rtl
# |
Boolean
|
false
|
Sets or gets a value indicating whether widget's elements are aligned to support locales using right-to-left fonts.
<template>
<JqxDataTable ref="myDataTable" :width="850" :source="source" :columns="columns" :rtl="true" />
</template>
<script setup>
import { ref } from 'vue';
import JqxDataTable from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxdatatable.vue';
const sourceData = {
localdata: [
['Maria Anders', 'Sales Representative', 'Berlin', 'Germany'],
['Ana Trujillo', 'Owner', 'México D.F.', 'Mexico'],
['Antonio Moreno', 'Owner', 'México D.F.', 'Mexico']
],
datafields: [
{ name: 'ContactName', type: 'string', map: '0' },
{ name: 'Title', type: 'string', map: '1' },
{ name: 'City', type: 'string', map: '2' },
{ name: 'Country', type: 'string', map: '3' }
],
datatype: 'array'
};
const source = ref(new jqx.dataAdapter(sourceData));
const columns = ref([
{ text: 'Contact Name', datafield: 'ContactName' },
{ text: 'Contact Title', datafield: 'Title' },
{ text: 'City', datafield: 'City' },
{ text: 'Country', datafield: 'Country' }
]);
</script>
Get the rtl property. let rtl = myDataTable.value.rtl;
|
|
source
# |
Object
|
null
|
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.
<template>
<JqxDataTable ref="myDataTable" :width="850" :source="source" :columns="columns" />
</template>
<script setup>
import { ref } from 'vue';
import JqxDataTable from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxdatatable.vue';
const sourceData = {
localdata: [
['Maria Anders', 'Sales Representative', 'Berlin', 'Germany'],
['Ana Trujillo', 'Owner', 'México D.F.', 'Mexico'],
['Antonio Moreno', 'Owner', 'México D.F.', 'Mexico']
],
datafields: [
{ name: 'ContactName', type: 'string', map: '0' },
{ name: 'Title', type: 'string', map: '1' },
{ name: 'City', type: 'string', map: '2' },
{ name: 'Country', type: 'string', map: '3' }
],
datatype: 'array'
};
const source = ref(new jqx.dataAdapter(sourceData));
const columns = ref([
{ text: 'Contact Name', datafield: 'ContactName' },
{ text: 'Contact Title', datafield: 'Title' },
{ text: 'City', datafield: 'City' },
{ text: 'Country', datafield: 'Country' }
]);
</script>
|
|
sortable
# |
Boolean
|
false
|
Enables/Disables the sorting feature.
<template>
<JqxDataTable
ref="myDataTable"
:width="850"
:source="source"
:columns="columns"
:sortable="true"
/>
</template>
<script setup>
import { ref } from 'vue';
import JqxDataTable from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxdatatable.vue';
const sourceData = {
localdata: [
['Maria Anders', 'Sales Representative', 'Berlin', 'Germany'],
['Ana Trujillo', 'Owner', 'México D.F.', 'Mexico'],
['Antonio Moreno', 'Owner', 'México D.F.', 'Mexico']
],
datafields: [
{ name: 'ContactName', type: 'string', map: '0' },
{ name: 'Title', type: 'string', map: '1' },
{ name: 'City', type: 'string', map: '2' },
{ name: 'Country', type: 'string', map: '3' }
],
datatype: 'array'
};
const source = ref(new jqx.dataAdapter(sourceData));
const columns = ref([
{ text: 'Contact Name', datafield: 'ContactName' },
{ text: 'Contact Title', datafield: 'Title' },
{ text: 'City', datafield: 'City' },
{ text: 'Country', datafield: 'Country' }
]);
</script>
Get the sortable property. let sortable = myDataTable.value.sortable;
|
|
showAggregates
# |
Boolean
|
false
|
Determines whether the jqxDataTable's Aggregates bar is visible.
<template>
<JqxDataTable
ref="myDataTable"
:width="850"
:source="source"
:columns="columns"
:showAggregates="true"
/>
</template>
<script setup>
import { ref } from 'vue';
import JqxDataTable from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxdatatable.vue';
const sourceData = {
localdata: [
['Maria Anders', 'Sales Representative', 'Berlin', 'Germany'],
['Ana Trujillo', 'Owner', 'México D.F.', 'Mexico'],
['Antonio Moreno', 'Owner', 'México D.F.', 'Mexico']
],
datafields: [
{ name: 'ContactName', type: 'string', map: '0' },
{ name: 'Title', type: 'string', map: '1' },
{ name: 'City', type: 'string', map: '2' },
{ name: 'Country', type: 'string', map: '3' }
],
datatype: 'array'
};
const source = ref(new jqx.dataAdapter(sourceData));
const columns = ref([
{ text: 'Contact Name', datafield: 'ContactName', aggregates: ['count'] },
{ text: 'Contact Title', datafield: 'Title' },
{ text: 'City', datafield: 'City' },
{ text: 'Country', datafield: 'Country' }
]);
</script>
Get the showAggregates property. let showAggregates = myDataTable.value.showAggregates;
|
|
showToolbar
# |
Boolean
|
false
|
Determines whether the jqxDataTable's Toolbar is visible.
<template>
<JqxDataTable
ref="myDataTable"
:width="850"
:source="source"
:columns="columns"
:showToolbar="true"
/>
</template>
<script setup>
import { ref } from 'vue';
import JqxDataTable from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxdatatable.vue';
const sourceData = {
localdata: [
['Maria Anders', 'Sales Representative', 'Berlin', 'Germany'],
['Ana Trujillo', 'Owner', 'México D.F.', 'Mexico'],
['Antonio Moreno', 'Owner', 'México D.F.', 'Mexico']
],
datafields: [
{ name: 'ContactName', type: 'string', map: '0' },
{ name: 'Title', type: 'string', map: '1' },
{ name: 'City', type: 'string', map: '2' },
{ name: 'Country', type: 'string', map: '3' }
],
datatype: 'array'
};
const source = ref(new jqx.dataAdapter(sourceData));
const columns = ref([
{ text: 'Contact Name', datafield: 'ContactName' },
{ text: 'Contact Title', datafield: 'Title' },
{ text: 'City', datafield: 'City' },
{ text: 'Country', datafield: 'Country' }
]);
</script>
Get the showToolbar property. let showToolbar = myDataTable.value.showToolbar;
|
|
showStatusbar
# |
Boolean
|
false
|
Determines whether the jqxDataTable's Statusbar is visible.
<template>
<JqxDataTable
ref="myDataTable"
:width="850"
:source="source"
:columns="columns"
:showStatusbar="true"
/>
</template>
<script setup>
import { ref } from 'vue';
import JqxDataTable from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxdatatable.vue';
const sourceData = {
localdata: [
['Maria Anders', 'Sales Representative', 'Berlin', 'Germany'],
['Ana Trujillo', 'Owner', 'México D.F.', 'Mexico'],
['Antonio Moreno', 'Owner', 'México D.F.', 'Mexico']
],
datafields: [
{ name: 'ContactName', type: 'string', map: '0' },
{ name: 'Title', type: 'string', map: '1' },
{ name: 'City', type: 'string', map: '2' },
{ name: 'Country', type: 'string', map: '3' }
],
datatype: 'array'
};
const source = ref(new jqx.dataAdapter(sourceData));
const columns = ref([
{ text: 'Contact Name', datafield: 'ContactName' },
{ text: 'Contact Title', datafield: 'Title' },
{ text: 'City', datafield: 'City' },
{ text: 'Country', datafield: 'Country' }
]);
</script>
Get the showStatusbar property. let showStatusbar = myDataTable.value.showStatusbar;
|
|
enableSanitizeAll
# |
Boolean
|
false
|
Determines whether the jqxDataTable's HTML escape of chars is enabled.
<template>
<JqxDataTable ref="myDataTable"
:width="850" :source="dataAdapter" :columns="columns" :enableSanitizeAll="true"
/>
</template>
<script setup>
import { ref } from "vue";
import JqxDataTable from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxdatatable.vue';
let source = {
localdata: [['Maria Anders', 'Sales Representative', 'Berlin', 'Germany'], ['Ana Trujillo', 'Owner', 'México D.F.', 'Mexico'], ['Antonio Moreno', 'Owner', 'México D.F.', 'Mexico']],
datafields: [{
name: 'ContactName',
type: 'string',
map: '0'
}, {
name: 'Title',
type: 'string',
map: '1'
}, {
name: 'City',
type: 'string',
map: '2'
}, {
name: 'Country',
type: 'string',
map: '3'
}],
datatype: 'array'
};
const dataAdapter = ref(new jqx.dataAdapter(source));
const columns = ref([{
text: 'Contact Name',
datafield: 'ContactName'
}, {
text: 'Contact Title',
datafield: 'Title'
}, {
text: 'City',
datafield: 'City'
}, {
text: 'Country',
datafield: 'Country'
}]);
</script>
Get the enableSanitizeAll property. let enableSanitizeAll = myDataTable.value.enableSanitizeAll;
|
|
statusBarHeight
# |
Number
|
34
|
Sets or gets the height of the Statusbar. Statusbar is displayed after setting showStatusbar to true.
<template>
<JqxDataTable
ref="myDataTable"
:width="850"
:source="source"
:columns="columns"
:statusBarHeight="40"
/>
</template>
<script setup>
import { ref } from 'vue';
import JqxDataTable from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxdatatable.vue';
const sourceData = {
localdata: [
['Maria Anders', 'Sales Representative', 'Berlin', 'Germany'],
['Ana Trujillo', 'Owner', 'México D.F.', 'Mexico'],
['Antonio Moreno', 'Owner', 'México D.F.', 'Mexico']
],
datafields: [
{ name: 'ContactName', type: 'string', map: '0' },
{ name: 'Title', type: 'string', map: '1' },
{ name: 'City', type: 'string', map: '2' },
{ name: 'Country', type: 'string', map: '3' }
],
datatype: 'array'
};
const source = ref(new jqx.dataAdapter(sourceData));
const columns = ref([
{ text: 'Contact Name', datafield: 'ContactName' },
{ text: 'Contact Title', datafield: 'Title' },
{ text: 'City', datafield: 'City' },
{ text: 'Country', datafield: 'Country' }
]);
</script>
Get the statusBarHeight property. let statusBarHeight = myDataTable.value.statusBarHeight;
|
|
scrollBarSize
# |
Number
|
17
|
Sets or gets the size of the scrollbars.
<template>
<JqxDataTable
ref="myDataTable"
:width="850"
:source="source"
:columns="columns"
:scrollBarSize="20"
:height="100"
/>
</template>
<script setup>
import { ref } from 'vue';
import JqxDataTable from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxdatatable.vue';
const sourceData = {
localdata: [
['Maria Anders', 'Sales Representative', 'Berlin', 'Germany'],
['Ana Trujillo', 'Owner', 'México D.F.', 'Mexico'],
['Antonio Moreno', 'Owner', 'México D.F.', 'Mexico']
],
datafields: [
{ name: 'ContactName', type: 'string', map: '0' },
{ name: 'Title', type: 'string', map: '1' },
{ name: 'City', type: 'string', map: '2' },
{ name: 'Country', type: 'string', map: '3' }
],
datatype: 'array'
};
const source = ref(new jqx.dataAdapter(sourceData));
const columns = ref([
{ text: 'Contact Name', datafield: 'ContactName' },
{ text: 'Contact Title', datafield: 'Title' },
{ text: 'City', datafield: 'City' },
{ text: 'Country', datafield: 'Country' }
]);
</script>
Get the scrollBarSize property. let scrollBarSize = myDataTable.value.scrollBarSize;
|
|
selectionMode
# |
String
|
"multipleRows"
|
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.
<template>
<JqxDataTable
ref="myDataTable"
:width="850"
:source="source"
:columns="columns"
:selectionMode="'singleRow'"
/>
</template>
<script setup>
import { ref } from 'vue';
import JqxDataTable from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxdatatable.vue';
const sourceData = {
localdata: [
['Maria Anders', 'Sales Representative', 'Berlin', 'Germany'],
['Ana Trujillo', 'Owner', 'México D.F.', 'Mexico'],
['Antonio Moreno', 'Owner', 'México D.F.', 'Mexico']
],
datafields: [
{ name: 'ContactName', type: 'string', map: '0' },
{ name: 'Title', type: 'string', map: '1' },
{ name: 'City', type: 'string', map: '2' },
{ name: 'Country', type: 'string', map: '3' }
],
datatype: 'array'
};
const source = ref(new jqx.dataAdapter(sourceData));
const columns = ref([
{ text: 'Contact Name', datafield: 'ContactName' },
{ text: 'Contact Title', datafield: 'Title' },
{ text: 'City', datafield: 'City' },
{ text: 'Country', datafield: 'Country' }
]);
</script>
Get the selectionMode property. let selectionMode = myDataTable.value.selectionMode;
|
|
serverProcessing
# |
Boolean
|
false
|
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".
<template>
<JqxDataTable
ref="myDataTable"
:width="850"
:source="source"
:columns="columns"
:serverProcessing="true"
/>
</template>
<script setup>
import { ref } from 'vue';
import JqxDataTable from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxdatatable.vue';
const sourceData = {
localdata: [
['Maria Anders', 'Sales Representative', 'Berlin', 'Germany'],
['Ana Trujillo', 'Owner', 'México D.F.', 'Mexico'],
['Antonio Moreno', 'Owner', 'México D.F.', 'Mexico']
],
datafields: [
{ name: 'ContactName', type: 'string', map: '0' },
{ name: 'Title', type: 'string', map: '1' },
{ name: 'City', type: 'string', map: '2' },
{ name: 'Country', type: 'string', map: '3' }
],
datatype: 'array'
};
const source = ref(new jqx.dataAdapter(sourceData));
const columns = ref([
{ text: 'Contact Name', datafield: 'ContactName' },
{ text: 'Contact Title', datafield: 'Title' },
{ text: 'City', datafield: 'City' },
{ text: 'Country', datafield: 'Country' }
]);
</script>
Get the serverProcessing property. let serverProcessing = myDataTable.value.serverProcessing;
|
Sets or gets the jqxDataTable's columns visibility.
<template>
<JqxDataTable
ref="myDataTable"
:width="850"
:source="source"
:columns="columns"
:showHeader="false"
/>
</template>
<script setup>
import { ref } from 'vue';
import JqxDataTable from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxdatatable.vue';
const sourceData = {
localdata: [
['Maria Anders', 'Sales Representative', 'Berlin', 'Germany'],
['Ana Trujillo', 'Owner', 'México D.F.', 'Mexico'],
['Antonio Moreno', 'Owner', 'México D.F.', 'Mexico']
],
datafields: [
{ name: 'ContactName', type: 'string', map: '0' },
{ name: 'Title', type: 'string', map: '1' },
{ name: 'City', type: 'string', map: '2' },
{ name: 'Country', type: 'string', map: '3' }
],
datatype: 'array'
};
const source = ref(new jqx.dataAdapter(sourceData));
const columns = ref([
{ text: 'Contact Name', datafield: 'ContactName' },
{ text: 'Contact Title', datafield: 'Title' },
{ text: 'City', datafield: 'City' },
{ text: 'Country', datafield: 'Country' }
]);
</script>
Get the showHeader property. let showHeader = myDataTable.value.showHeader;
|
|
theme
# |
String
|
''
|
Sets the widget's theme.
<template>
<JqxDataTable
ref="myDataTable"
:width="850"
:source="source"
:columns="columns"
:theme="'material'"
/>
</template>
<script setup>
import { ref } from 'vue';
import JqxDataTable from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxdatatable.vue';
const sourceData = {
localdata: [
['Maria Anders', 'Sales Representative', 'Berlin', 'Germany'],
['Ana Trujillo', 'Owner', 'México D.F.', 'Mexico'],
['Antonio Moreno', 'Owner', 'México D.F.', 'Mexico']
],
datafields: [
{ name: 'ContactName', type: 'string', map: '0' },
{ name: 'Title', type: 'string', map: '1' },
{ name: 'City', type: 'string', map: '2' },
{ name: 'Country', type: 'string', map: '3' }
],
datatype: 'array'
};
const source = ref(new jqx.dataAdapter(sourceData));
const columns = ref([
{ text: 'Contact Name', datafield: 'ContactName' },
{ text: 'Contact Title', datafield: 'Title' },
{ text: 'City', datafield: 'City' },
{ text: 'Country', datafield: 'Country' }
]);
</script>
|
|
toolbarHeight
# |
Number
|
34
|
Sets or gets the height of the Toolbar. Toolbar is displayed after setting showToolbar to true.
<template>
<JqxDataTable
ref="myDataTable"
:width="850"
:source="source"
:columns="columns"
:toolbarHeight="40"
:showToolbar="true"
/>
</template>
<script setup>
import { ref } from 'vue';
import JqxDataTable from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxdatatable.vue';
const sourceData = {
localdata: [
['Maria Anders', 'Sales Representative', 'Berlin', 'Germany'],
['Ana Trujillo', 'Owner', 'México D.F.', 'Mexico'],
['Antonio Moreno', 'Owner', 'México D.F.', 'Mexico']
],
datafields: [
{ name: 'ContactName', type: 'string', map: '0' },
{ name: 'Title', type: 'string', map: '1' },
{ name: 'City', type: 'string', map: '2' },
{ name: 'Country', type: 'string', map: '3' }
],
datatype: 'array'
};
const source = ref(new jqx.dataAdapter(sourceData));
const columns = ref([
{ text: 'Contact Name', datafield: 'ContactName' },
{ text: 'Contact Title', datafield: 'Title' },
{ text: 'City', datafield: 'City' },
{ text: 'Country', datafield: 'Country' }
]);
</script>
Get the toolbarHeight property. let toolbarHeight = myDataTable.value.toolbarHeight;
|
|
width
# |
Number | String
|
null
|
Sets or gets the jqxDataTable's width.
<template>
<JqxDataTable ref="myDataTable" :width="850" :source="source" :columns="columns" />
</template>
<script setup>
import { ref } from 'vue';
import JqxDataTable from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxdatatable.vue';
const sourceData = {
localdata: [
['Maria Anders', 'Sales Representative', 'Berlin', 'Germany'],
['Ana Trujillo', 'Owner', 'México D.F.', 'Mexico'],
['Antonio Moreno', 'Owner', 'México D.F.', 'Mexico']
],
datafields: [
{ name: 'ContactName', type: 'string', map: '0' },
{ name: 'Title', type: 'string', map: '1' },
{ name: 'City', type: 'string', map: '2' },
{ name: 'Country', type: 'string', map: '3' }
],
datatype: 'array'
};
const source = ref(new jqx.dataAdapter(sourceData));
const columns = ref([
{ text: 'Contact Name', datafield: 'ContactName' },
{ text: 'Contact Title', datafield: 'Title' },
{ text: 'City', datafield: 'City' },
{ text: 'Country', datafield: 'Country' }
]);
</script>
Get the width property. let width = myDataTable.value.width;
|
|
|
|
bindingComplete
# |
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.
Code examples #
Bind to the bindingComplete event of jqxDataTable.
<template>
<div>
<JqxDataTable
ref="myDataTable"
@bindingComplete="onBindingComplete($event)"
:width="850"
:source="source"
:columns="columns"
/>
<br />
<JqxButton @click="onClick($event)" :width="60" :height="20">Click</JqxButton>
</div>
</template>
<script setup>
import { ref } from 'vue';
import JqxDataTable from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxdatatable.vue';
import JqxButton from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxbuttons.vue';
const myDataTable = ref(null);
let dataSource = {
localdata: [
['Maria Anders', 'Sales Representative', 'Berlin', 'Germany'],
['Ana Trujillo', 'Owner', 'México D.F.', 'Mexico'],
['Antonio Moreno', 'Owner', 'México D.F.', 'Mexico'],
['Andrew Nodier', 'Accounting Manager', 'Ottawa', 'Canada']
],
datafields: [
{ name: 'ContactName', type: 'string', map: '0' },
{ name: 'Title', type: 'string', map: '1' },
{ name: 'City', type: 'string', map: '2' },
{ name: 'Country', type: 'string', map: '3' }
],
datatype: 'array'
};
const source = ref(new jqx.dataAdapter(dataSource));
const columns = ref([
{ text: 'Contact Name', datafield: 'ContactName' },
{ text: 'Contact Title', datafield: 'Title' },
{ text: 'City', datafield: 'City' },
{ text: 'Country', datafield: 'Country' }
]);
function onClick(event) {
myDataTable.value.updateBoundData();
}
function onBindingComplete(event) {
alert('do something...');
}
</script>
|
|
cellBeginEdit
# |
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.
Code examples #
Bind to the cellBeginEdit event of jqxDataTable.
<template>
<JqxDataTable
ref="myDataTable"
@cellBeginEdit="onCellBeginEdit($event)"
:width="850"
:source="source"
:columns="columns"
/>
</template>
<script setup>
import { onMounted, ref } from 'vue';
import JqxDataTable from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxdatatable.vue';
const myDataTable = ref(null);
const sourceData = {
localdata: [
['Maria Anders', 'Sales Representative', 'Berlin', 'Germany'],
['Ana Trujillo', 'Owner', 'México D.F.', 'Mexico'],
['Antonio Moreno', 'Owner', 'México D.F.', 'Mexico']
],
datafields: [
{ name: 'ContactName', type: 'string', map: '0' },
{ name: 'Title', type: 'string', map: '1' },
{ name: 'City', type: 'string', map: '2' },
{ name: 'Country', type: 'string', map: '3' }
],
datatype: 'array'
};
const source = ref(new jqx.dataAdapter(sourceData));
const columns = ref([
{ text: 'Contact Name', datafield: 'ContactName' },
{ text: 'Contact Title', datafield: 'Title' },
{ text: 'City', datafield: 'City' },
{ text: 'Country', datafield: 'Country' }
]);
function onCellBeginEdit(event) {
alert('do something...');
}
onMounted(() => {
myDataTable.value.editable = true;
myDataTable.value.editSettings = {
saveOnPageChange: true,
saveOnBlur: true,
saveOnSelectionChange: true,
cancelOnEsc: true,
saveOnEnter: true,
editOnDoubleClick: true,
editOnF2: true,
editSingleCell: true
};
});
</script>
|
|
cellEndEdit
# |
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.
Code examples #
Bind to the cellEndEdit event of jqxDataTable.
<template>
<JqxDataTable
ref="myDataTable"
@cellEndEdit="onCellEndEdit($event)"
:width="850"
:source="source"
:columns="columns"
/>
</template>
<script setup>
import { onMounted, ref } from 'vue';
import JqxDataTable from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxdatatable.vue';
const myDataTable = ref(null);
const sourceData = {
localdata: [
['Maria Anders', 'Sales Representative', 'Berlin', 'Germany'],
['Ana Trujillo', 'Owner', 'México D.F.', 'Mexico'],
['Antonio Moreno', 'Owner', 'México D.F.', 'Mexico']
],
datafields: [
{ name: 'ContactName', type: 'string', map: '0' },
{ name: 'Title', type: 'string', map: '1' },
{ name: 'City', type: 'string', map: '2' },
{ name: 'Country', type: 'string', map: '3' }
],
datatype: 'array'
};
const source = ref(new jqx.dataAdapter(sourceData));
const columns = ref([
{ text: 'Contact Name', datafield: 'ContactName' },
{ text: 'Contact Title', datafield: 'Title' },
{ text: 'City', datafield: 'City' },
{ text: 'Country', datafield: 'Country' }
]);
function onCellEndEdit(event) {
alert('do something...');
}
onMounted(() => {
myDataTable.value.editable = true;
myDataTable.value.editSettings = {
saveOnPageChange: true,
saveOnBlur: true,
saveOnSelectionChange: true,
cancelOnEsc: true,
saveOnEnter: true,
editOnDoubleClick: true,
editOnF2: true,
editSingleCell: true
};
});
</script>
|
|
cellValueChanged
# |
Event
|
|
This event is triggered when a cell value is changed.
Code examples #
Bind to the cellValueChanged event of jqxDataTable.
<template>
<div>
<JqxDataTable
ref="myDataTable"
@cellValueChanged="onCellValueChanged($event)"
:width="850"
:source="source"
:columns="columns"
:editable="true"
/>
<br />
<JqxButton @click="onClick($event)" :width="60" :height="20">Click</JqxButton>
</div>
</template>
<script setup>
import { ref } from 'vue';
import JqxDataTable from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxdatatable.vue';
import JqxButton from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxbuttons.vue';
const myDataTable = ref(null);
let dataSource = {
localdata: [
['Maria Anders', 'Sales Representative', 'Berlin', 'Germany'],
['Ana Trujillo', 'Owner', 'México D.F.', 'Mexico'],
['Antonio Moreno', 'Owner', 'México D.F.', 'Mexico'],
['Andrew Nodier', 'Accounting Manager', 'Ottawa', 'Canada']
],
datafields: [
{ name: 'ContactName', type: 'string', map: '0' },
{ name: 'Title', type: 'string', map: '1' },
{ name: 'City', type: 'string', map: '2' },
{ name: 'Country', type: 'string', map: '3' }
],
datatype: 'array'
};
const source = ref(new jqx.dataAdapter(dataSource));
const columns = ref([
{ text: 'Contact Name', datafield: 'ContactName' },
{ text: 'Contact Title', datafield: 'Title' },
{ text: 'City', datafield: 'City' },
{ text: 'Country', datafield: 'Country' }
]);
function onClick(event) {
myDataTable.value.setCellValue(1, 'ContactName', 'New Value');
}
function onCellValueChanged(event) {
alert('do something...');
}
</script>
|
|
columnResized
# |
Event
|
|
This event is triggered when a column is resized.
Code examples #
Bind to the columnResized event of jqxDataTable.
<template>
<JqxDataTable
ref="myDataTable"
@columnResized="onColumnResized($event)"
:width="850"
:source="source"
:columns="columns"
:columnsResize="true"
/>
</template>
<script setup>
import { ref } from 'vue';
import JqxDataTable from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxdatatable.vue';
const sourceData = {
localdata: [
['Maria Anders', 'Sales Representative', 'Berlin', 'Germany'],
['Ana Trujillo', 'Owner', 'México D.F.', 'Mexico'],
['Antonio Moreno', 'Owner', 'México D.F.', 'Mexico']
],
datafields: [
{ name: 'ContactName', type: 'string', map: '0' },
{ name: 'Title', type: 'string', map: '1' },
{ name: 'City', type: 'string', map: '2' },
{ name: 'Country', type: 'string', map: '3' }
],
datatype: 'array'
};
const source = ref(new jqx.dataAdapter(sourceData));
const columns = ref([
{ text: 'Contact Name', datafield: 'ContactName' },
{ text: 'Contact Title', datafield: 'Title' },
{ text: 'City', datafield: 'City' },
{ text: 'Country', datafield: 'Country' }
]);
function onColumnResized(event) {
alert('do something...');
}
</script>
|
|
columnReordered
# |
Event
|
|
This event is triggered when the column's order is changed.
Code examples #
Bind to the columnReordered event of jqxDataTable.
<template>
<JqxDataTable
ref="myDataTable"
@columnReordered="onColumnReordered($event)"
:width="850"
:source="source"
:columns="columns"
:columnsReorder="true"
/>
</template>
<script setup>
import { ref } from 'vue';
import JqxDataTable from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxdatatable.vue';
const sourceData = {
localdata: [
['Maria Anders', 'Sales Representative', 'Berlin', 'Germany'],
['Ana Trujillo', 'Owner', 'México D.F.', 'Mexico'],
['Antonio Moreno', 'Owner', 'México D.F.', 'Mexico']
],
datafields: [
{ name: 'ContactName', type: 'string', map: '0' },
{ name: 'Title', type: 'string', map: '1' },
{ name: 'City', type: 'string', map: '2' },
{ name: 'Country', type: 'string', map: '3' }
],
datatype: 'array'
};
const source = ref(new jqx.dataAdapter(sourceData));
const columns = ref([
{ text: 'Contact Name', datafield: 'ContactName' },
{ text: 'Contact Title', datafield: 'Title' },
{ text: 'City', datafield: 'City' },
{ text: 'Country', datafield: 'Country' }
]);
function onColumnReordered(event) {
alert('do something...');
}
</script>
|
|
sort
# |
Event
|
|
This event is triggered when the jqxDataTable sort order or sort column is changed.
Code examples #
Bind to the sort event of jqxDataTable.
<template>
<JqxDataTable
ref="myDataTable"
@sort="onSort($event)"
:width="850"
:source="source"
:columns="columns"
/>
</template>
<script setup>
import { onMounted, ref } from 'vue';
import JqxDataTable from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxdatatable.vue';
const myDataTable = ref(null);
const sourceData = {
localdata: [
['Maria Anders', 'Sales Representative', 'Berlin', 'Germany'],
['Ana Trujillo', 'Owner', 'México D.F.', 'Mexico'],
['Antonio Moreno', 'Owner', 'México D.F.', 'Mexico']
],
datafields: [
{ name: 'ContactName', type: 'string', map: '0' },
{ name: 'Title', type: 'string', map: '1' },
{ name: 'City', type: 'string', map: '2' },
{ name: 'Country', type: 'string', map: '3' }
],
datatype: 'array'
};
const source = ref(new jqx.dataAdapter(sourceData));
const columns = ref([
{ text: 'Contact Name', datafield: 'ContactName' },
{ text: 'Contact Title', datafield: 'Title' },
{ text: 'City', datafield: 'City' },
{ text: 'Country', datafield: 'Country' }
]);
function onSort(event) {
alert('do something...');
}
onMounted(() => {
myDataTable.value.sortable = true;
});
</script>
|
|
filter
# |
Event
|
|
This event is triggered when the jqxDataTable's rows filter is changed.
Code examples #
Bind to the filter event of jqxDataTable.
<template>
<JqxDataTable
ref="myDataTable"
@filter="onFilter($event)"
:width="850"
:source="source"
:columns="columns"
/>
</template>
<script setup>
import { onMounted, ref } from 'vue';
import JqxDataTable from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxdatatable.vue';
const myDataTable = ref(null);
const sourceData = {
localdata: [
['Maria Anders', 'Sales Representative', 'Berlin', 'Germany'],
['Ana Trujillo', 'Owner', 'México D.F.', 'Mexico'],
['Antonio Moreno', 'Owner', 'México D.F.', 'Mexico']
],
datafields: [
{ name: 'ContactName', type: 'string', map: '0' },
{ name: 'Title', type: 'string', map: '1' },
{ name: 'City', type: 'string', map: '2' },
{ name: 'Country', type: 'string', map: '3' }
],
datatype: 'array'
};
const source = ref(new jqx.dataAdapter(sourceData));
const columns = ref([
{ text: 'Contact Name', datafield: 'ContactName' },
{ text: 'Contact Title', datafield: 'Title' },
{ text: 'City', datafield: 'City' },
{ text: 'Country', datafield: 'Country' }
]);
function onFilter(event) {
alert('do something...');
}
onMounted(() => {
myDataTable.value.filterable = true;
});
</script>
|
|
pageChanged
# |
Event
|
|
This is triggered when the jqxDataTable's current page is changed.
Code examples #
Bind to the pageChanged event of jqxDataTable.
<template>
<JqxDataTable
ref="myDataTable"
@pageChanged="onPageChanged($event)"
:width="850"
:source="source"
:columns="columns"
:pageable="true"
:pageSize="2"
/>
</template>
<script setup>
import { ref } from 'vue';
import JqxDataTable from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxdatatable.vue';
const sourceData = {
localdata: [
['Maria Anders', 'Sales Representative', 'Berlin', 'Germany'],
['Ana Trujillo', 'Owner', 'México D.F.', 'Mexico'],
['Antonio Moreno', 'Owner', 'México D.F.', 'Mexico'],
['Andrew Nodier', 'Accounting Manager', 'Ottawa', 'Canada']
],
datafields: [
{ name: 'ContactName', type: 'string', map: '0' },
{ name: 'Title', type: 'string', map: '1' },
{ name: 'City', type: 'string', map: '2' },
{ name: 'Country', type: 'string', map: '3' }
],
datatype: 'array'
};
const source = ref(new jqx.dataAdapter(sourceData));
const columns = ref([
{ text: 'Contact Name', datafield: 'ContactName' },
{ text: 'Contact Title', datafield: 'Title' },
{ text: 'City', datafield: 'City' },
{ text: 'Country', datafield: 'Country' }
]);
function onPageChanged(event) {
alert('do something...');
}
</script>
|
|
pageSizeChanged
# |
Event
|
|
This is triggered when the jqxDataTable's page size is changed.
Code examples #
Bind to the pageSizeChanged event of jqxDataTable.
<template>
<JqxDataTable
ref="myDataTable"
@pageSizeChanged="onPageSizeChanged($event)"
:width="850"
:source="source"
:columns="columns"
/>
</template>
<script setup>
import { onMounted, ref } from 'vue';
import JqxDataTable from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxdatatable.vue';
const myDataTable = ref(null);
const sourceData = {
localdata: [
['Maria Anders', 'Sales Representative', 'Berlin', 'Germany'],
['Ana Trujillo', 'Owner', 'México D.F.', 'Mexico'],
['Antonio Moreno', 'Owner', 'México D.F.', 'Mexico']
],
datafields: [
{ name: 'ContactName', type: 'string', map: '0' },
{ name: 'Title', type: 'string', map: '1' },
{ name: 'City', type: 'string', map: '2' },
{ name: 'Country', type: 'string', map: '3' }
],
datatype: 'array'
};
const source = ref(new jqx.dataAdapter(sourceData));
const columns = ref([
{ text: 'Contact Name', datafield: 'ContactName' },
{ text: 'Contact Title', datafield: 'Title' },
{ text: 'City', datafield: 'City' },
{ text: 'Country', datafield: 'Country' }
]);
function onPageSizeChanged(event) {
alert('do something...');
}
onMounted(() => {
myDataTable.value.pageable = true;
myDataTable.value.pagerMode = 'advance';
myDataTable.value.pageSizeOptions = [2, 4, 8];
});
</script>
|
|
rowClick
# |
Event
|
|
This is triggered when a row is clicked.
Code examples #
Bind to the rowClick event of jqxDataTable.
<template>
<JqxDataTable
ref="myDataTable"
@rowClick="onRowClick($event)"
:width="850"
:source="source"
:columns="columns"
/>
</template>
<script setup>
import { ref } from 'vue';
import JqxDataTable from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxdatatable.vue';
const sourceData = {
localdata: [
['Maria Anders', 'Sales Representative', 'Berlin', 'Germany'],
['Ana Trujillo', 'Owner', 'México D.F.', 'Mexico'],
['Antonio Moreno', 'Owner', 'México D.F.', 'Mexico']
],
datafields: [
{ name: 'ContactName', type: 'string', map: '0' },
{ name: 'Title', type: 'string', map: '1' },
{ name: 'City', type: 'string', map: '2' },
{ name: 'Country', type: 'string', map: '3' }
],
datatype: 'array'
};
const source = ref(new jqx.dataAdapter(sourceData));
const columns = ref([
{ text: 'Contact Name', datafield: 'ContactName' },
{ text: 'Contact Title', datafield: 'Title' },
{ text: 'City', datafield: 'City' },
{ text: 'Country', datafield: 'Country' }
]);
function onRowClick(event) {
alert('do something...');
}
</script>
|
|
rowDoubleClick
# |
Event
|
|
This is triggered when a row is double-clicked.
Code examples #
Bind to the rowDoubleClick event of jqxDataTable.
<template>
<JqxDataTable
ref="myDataTable"
@rowDoubleClick="onRowDoubleClick($event)"
:width="850"
:source="source"
:columns="columns"
/>
</template>
<script setup>
import { ref } from 'vue';
import JqxDataTable from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxdatatable.vue';
const sourceData = {
localdata: [
['Maria Anders', 'Sales Representative', 'Berlin', 'Germany'],
['Ana Trujillo', 'Owner', 'México D.F.', 'Mexico'],
['Antonio Moreno', 'Owner', 'México D.F.', 'Mexico']
],
datafields: [
{ name: 'ContactName', type: 'string', map: '0' },
{ name: 'Title', type: 'string', map: '1' },
{ name: 'City', type: 'string', map: '2' },
{ name: 'Country', type: 'string', map: '3' }
],
datatype: 'array'
};
const source = ref(new jqx.dataAdapter(sourceData));
const columns = ref([
{ text: 'Contact Name', datafield: 'ContactName' },
{ text: 'Contact Title', datafield: 'Title' },
{ text: 'City', datafield: 'City' },
{ text: 'Country', datafield: 'Country' }
]);
function onRowDoubleClick(event) {
alert('do something...');
}
</script>
|
|
rowSelect
# |
Event
|
|
This is triggered when a row is selected.
Code examples #
Bind to the rowSelect event of jqxDataTable.
<template>
<JqxDataTable
ref="myDataTable"
@rowSelect="onRowSelect($event)"
:width="850"
:source="source"
:columns="columns"
/>
</template>
<script setup>
import { ref } from 'vue';
import JqxDataTable from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxdatatable.vue';
const sourceData = {
localdata: [
['Maria Anders', 'Sales Representative', 'Berlin', 'Germany'],
['Ana Trujillo', 'Owner', 'México D.F.', 'Mexico'],
['Antonio Moreno', 'Owner', 'México D.F.', 'Mexico']
],
datafields: [
{ name: 'ContactName', type: 'string', map: '0' },
{ name: 'Title', type: 'string', map: '1' },
{ name: 'City', type: 'string', map: '2' },
{ name: 'Country', type: 'string', map: '3' }
],
datatype: 'array'
};
const source = ref(new jqx.dataAdapter(sourceData));
const columns = ref([
{ text: 'Contact Name', datafield: 'ContactName' },
{ text: 'Contact Title', datafield: 'Title' },
{ text: 'City', datafield: 'City' },
{ text: 'Country', datafield: 'Country' }
]);
function onRowSelect(event) {
alert('do something...');
}
</script>
|
|
rowUnselect
# |
Event
|
|
This is triggered when a row is unselected.
Code examples #
Bind to the rowUnselect event of jqxDataTable.
<template>
<JqxDataTable
ref="myDataTable"
@rowUnselect="onRowUnselect($event)"
:width="850"
:source="source"
:columns="columns"
/>
</template>
<script setup>
import { ref } from 'vue';
import JqxDataTable from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxdatatable.vue';
const sourceData = {
localdata: [
['Maria Anders', 'Sales Representative', 'Berlin', 'Germany'],
['Ana Trujillo', 'Owner', 'México D.F.', 'Mexico'],
['Antonio Moreno', 'Owner', 'México D.F.', 'Mexico']
],
datafields: [
{ name: 'ContactName', type: 'string', map: '0' },
{ name: 'Title', type: 'string', map: '1' },
{ name: 'City', type: 'string', map: '2' },
{ name: 'Country', type: 'string', map: '3' }
],
datatype: 'array'
};
const source = ref(new jqx.dataAdapter(sourceData));
const columns = ref([
{ text: 'Contact Name', datafield: 'ContactName' },
{ text: 'Contact Title', datafield: 'Title' },
{ text: 'City', datafield: 'City' },
{ text: 'Country', datafield: 'Country' }
]);
function onRowUnselect(event) {
alert('do something...');
}
</script>
|
|
rowBeginEdit
# |
Event
|
|
This is triggered when a row edit begins.
Code examples #
Bind to the rowBeginEdit event of jqxDataTable.
<template>
<JqxDataTable
ref="myDataTable"
@rowBeginEdit="onRowBeginEdit($event)"
:width="850"
:source="source"
:columns="columns"
/>
</template>
<script setup>
import { onMounted, ref } from 'vue';
import JqxDataTable from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxdatatable.vue';
const myDataTable = ref(null);
const sourceData = {
localdata: [
['Maria Anders', 'Sales Representative', 'Berlin', 'Germany'],
['Ana Trujillo', 'Owner', 'México D.F.', 'Mexico'],
['Antonio Moreno', 'Owner', 'México D.F.', 'Mexico']
],
datafields: [
{ name: 'ContactName', type: 'string', map: '0' },
{ name: 'Title', type: 'string', map: '1' },
{ name: 'City', type: 'string', map: '2' },
{ name: 'Country', type: 'string', map: '3' }
],
datatype: 'array'
};
const source = ref(new jqx.dataAdapter(sourceData));
const columns = ref([
{ text: 'Contact Name', datafield: 'ContactName' },
{ text: 'Contact Title', datafield: 'Title' },
{ text: 'City', datafield: 'City' },
{ text: 'Country', datafield: 'Country' }
]);
function onRowBeginEdit(event) {
alert('do something...');
}
onMounted(() => {
myDataTable.value.editable = true;
});
</script>
|
|
rowEndEdit
# |
Event
|
|
This is triggered when a row edit ends.
Code examples #
Bind to the rowEndEdit event of jqxDataTable.
<template>
<JqxDataTable
ref="myDataTable"
@rowEndEdit="onRowEndEdit($event)"
:width="850"
:source="source"
:columns="columns"
/>
</template>
<script setup>
import { onMounted, ref } from 'vue';
import JqxDataTable from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxdatatable.vue';
const myDataTable = ref(null);
const sourceData = {
localdata: [
['Maria Anders', 'Sales Representative', 'Berlin', 'Germany'],
['Ana Trujillo', 'Owner', 'México D.F.', 'Mexico'],
['Antonio Moreno', 'Owner', 'México D.F.', 'Mexico']
],
datafields: [
{ name: 'ContactName', type: 'string', map: '0' },
{ name: 'Title', type: 'string', map: '1' },
{ name: 'City', type: 'string', map: '2' },
{ name: 'Country', type: 'string', map: '3' }
],
datatype: 'array'
};
const source = ref(new jqx.dataAdapter(sourceData));
const columns = ref([
{ text: 'Contact Name', datafield: 'ContactName' },
{ text: 'Contact Title', datafield: 'Title' },
{ text: 'City', datafield: 'City' },
{ text: 'Country', datafield: 'Country' }
]);
function onRowEndEdit(event) {
alert('do something...');
}
onMounted(() => {
myDataTable.value.editable = true;
});
</script>
|
|
rowExpand
# |
Event
|
|
This is triggered when a row is expanded.
Code examples #
Bind to the rowExpand event of jqxDataTable.
<template>
<div>
<JqxDataTable
ref="myDataTable"
@rowExpand="onRowExpand($event)"
:width="850"
:source="source"
:columns="columns"
:rowDetails="true"
:initRowDetails="initRowDetails"
/>
<br />
<JqxButton @click="onClick($event)" :width="60" :height="20">Click</JqxButton>
</div>
</template>
<script setup>
import { ref } from 'vue';
import JqxDataTable from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxdatatable.vue';
import JqxButton from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxbuttons.vue';
const myDataTable = ref(null);
let dataSource = {
localdata: [
['Maria Anders', 'Sales Representative', 'Berlin', 'Germany'],
['Ana Trujillo', 'Owner', 'México D.F.', 'Mexico'],
['Antonio Moreno', 'Owner', 'México D.F.', 'Mexico'],
['Andrew Nodier', 'Accounting Manager', 'Ottawa', 'Canada']
],
datafields: [
{ name: 'ContactName', type: 'string', map: '0' },
{ name: 'Title', type: 'string', map: '1' },
{ name: 'City', type: 'string', map: '2' },
{ name: 'Country', type: 'string', map: '3' }
],
datatype: 'array'
};
const source = ref(new jqx.dataAdapter(dataSource));
const columns = ref([
{ text: 'Contact Name', datafield: 'ContactName', hidden: false },
{ text: 'Contact Title', datafield: 'Title' },
{ text: 'City', datafield: 'City' },
{ text: 'Country', datafield: 'Country' }
]);
const initRowDetails = ref((id, row, element, rowinfo) => {
rowinfo.detailsHeight = 48;
element.html('<strong>Details</strong><br/>Row Index: ' + id);
});
function onRowExpand(event) {
alert('do something...');
}
function onClick(event) {
myDataTable.value.showDetails(1);
}
</script>
|
|
rowCollapse
# |
Event
|
|
This is triggered when a row is collapsed.
Code examples #
Bind to the rowCollapse event of jqxDataTable.
<template>
<JqxDataTable
ref="myDataTable"
@rowCollapse="onRowCollapse($event)"
:width="850"
:source="source"
:columns="columns"
:ready="ready"
:rowDetails="true"
:initRowDetails="initRowDetails"
/>
</template>
<script setup>
import { ref } from 'vue';
import JqxDataTable from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxdatatable.vue';
const myDataTable = ref(null);
const sourceData = {
localdata: [
['Maria Anders', 'Sales Representative', 'Berlin', 'Germany'],
['Ana Trujillo', 'Owner', 'México D.F.', 'Mexico'],
['Antonio Moreno', 'Owner', 'México D.F.', 'Mexico']
],
datafields: [
{ name: 'ContactName', type: 'string', map: '0' },
{ name: 'Title', type: 'string', map: '1' },
{ name: 'City', type: 'string', map: '2' },
{ name: 'Country', type: 'string', map: '3' }
],
datatype: 'array'
};
const source = ref(new jqx.dataAdapter(sourceData));
const columns = ref([
{ text: 'Contact Name', datafield: 'ContactName' },
{ text: 'Contact Title', datafield: 'Title' },
{ text: 'City', datafield: 'City' },
{ text: 'Country', datafield: 'Country' }
]);
const initRowDetails = ref((id, row, element, rowinfo) => {
rowinfo.detailsHeight = 48;
element.text('Row Details: ' + id);
});
const ready = ref(() => {
myDataTable.value.showDetails(1);
});
function onRowCollapse(event) {
alert('do something...');
}
</script>
|
|
|
| Name | Arguments | Return Type |
|
addRow
# |
rowIndex, rowData, rowPosition
|
None
|
Adds a new row. For synchronization with a server, please look also the jqxDataAdapter plug-in's help documentation.
<template>
<JqxDataTable ref="myDataTable" :width="850" :source="source" :columns="columns" />
</template>
<script setup>
import { onMounted, ref } from 'vue';
import JqxDataTable from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxdatatable.vue';
const myDataTable = ref(null);
const sourceData = {
localdata: [
['Maria Anders', 'Sales Representative', 'Berlin', 'Germany'],
['Ana Trujillo', 'Owner', 'México D.F.', 'Mexico'],
['Antonio Moreno', 'Owner', 'México D.F.', 'Mexico']
],
datafields: [
{ name: 'ContactName', type: 'string', map: '0' },
{ name: 'Title', type: 'string', map: '1' },
{ name: 'City', type: 'string', map: '2' },
{ name: 'Country', type: 'string', map: '3' }
],
datatype: 'array'
};
const source = ref(new jqx.dataAdapter(sourceData));
const columns = ref([
{ text: 'Contact Name', datafield: 'ContactName' },
{ text: 'Contact Title', datafield: 'Title' },
{ text: 'City', datafield: 'City' },
{ text: 'Country', datafield: 'Country' }
]);
onMounted(() => {
myDataTable.value.addRow(
null,
{
ContactName: 'Added Name',
Title: 'Added Title',
City: 'Added City',
Country: 'Added Country'
},
'first'
);
});
</script>
|
|
addFilter
# |
dataField, filerGroup
|
None
|
Adds a new filter.
<template>
<JqxDataTable
ref="myDataTable"
:width="850"
:source="source"
:columns="columns"
:filterable="true"
:ready="ready"
/>
</template>
<script setup>
import { ref } from 'vue';
import JqxDataTable from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxdatatable.vue';
const myDataTable = ref(null);
let dataSource = {
localdata: [
['Maria Anders', 'Sales Representative', 'Berlin', 'Germany'],
['Ana Trujillo', 'Owner', 'México D.F.', 'Mexico'],
['Antonio Moreno', 'Owner', 'México D.F.', 'Mexico'],
['Andrew Nodier', 'Accounting Manager', 'Ottawa', 'Canada']
],
datafields: [
{ name: 'ContactName', type: 'string', map: '0' },
{ name: 'Title', type: 'string', map: '1' },
{ name: 'City', type: 'string', map: '2' },
{ name: 'Country', type: 'string', map: '3' }
],
datatype: 'array'
};
const source = ref(new jqx.dataAdapter(dataSource));
const columns = ref([
{ text: 'Contact Name', datafield: 'ContactName', hidden: false },
{ text: 'Contact Title', datafield: 'Title' },
{ text: 'City', datafield: 'City' },
{ text: 'Country', datafield: 'Country' }
]);
const ready = ref(() => {
let filtertype = 'stringfilter';
let filtergroup = new jqx.filter();
let filter_or_operator = 1;
// set filter's value.
let filtervalue = 'er';
// set filter's condition.
let filtercondition = 'contains';
// create new filter.
let filter = filtergroup.createfilter(filtertype, filtervalue, filtercondition);
// add the filter to the filter group.
filtergroup.addfilter(filter_or_operator, filter);
// add the filters.
myDataTable.value.addFilter('ContactName', filtergroup);
// apply the filters.
myDataTable.value.applyFilters();
});
</script>
|
|
applyFilters
# |
None
|
None
|
Applies the added/removed filters.
<template>
<JqxDataTable
ref="myDataTable"
:width="850"
:source="source"
:columns="columns"
:filterable="true"
:ready="ready"
/>
</template>
<script setup>
import { ref } from 'vue';
import JqxDataTable from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxdatatable.vue';
const myDataTable = ref(null);
let dataSource = {
localdata: [
['Maria Anders', 'Sales Representative', 'Berlin', 'Germany'],
['Ana Trujillo', 'Owner', 'México D.F.', 'Mexico'],
['Antonio Moreno', 'Owner', 'México D.F.', 'Mexico'],
['Andrew Nodier', 'Accounting Manager', 'Ottawa', 'Canada']
],
datafields: [
{ name: 'ContactName', type: 'string', map: '0' },
{ name: 'Title', type: 'string', map: '1' },
{ name: 'City', type: 'string', map: '2' },
{ name: 'Country', type: 'string', map: '3' }
],
datatype: 'array'
};
const source = ref(new jqx.dataAdapter(dataSource));
const columns = ref([
{ text: 'Contact Name', datafield: 'ContactName', hidden: false },
{ text: 'Contact Title', datafield: 'Title' },
{ text: 'City', datafield: 'City' },
{ text: 'Country', datafield: 'Country' }
]);
const ready = ref(() => {
let filtertype = 'stringfilter';
let filtergroup = new jqx.filter();
let filter_or_operator = 1;
// set filter's value.
let filtervalue = 'er';
// set filter's condition.
let filtercondition = 'contains';
// create new filter.
let filter = filtergroup.createfilter(filtertype, filtervalue, filtercondition);
// add the filter to the filter group.
filtergroup.addfilter(filter_or_operator, filter);
// add the filters.
myDataTable.value.addFilter('ContactName', filtergroup);
let filtergroup2 = new jqx.filter();
filtervalue = 'Ottawa';
let filter2 = filtergroup.createfilter(filtertype, filtervalue, filtercondition);
filtergroup2.addfilter(filter_or_operator, filter2);
myDataTable.value.addFilter('City', filtergroup2);
// apply the filters.
myDataTable.value.applyFilters();
});
</script>
|
|
beginUpdate
# |
None
|
None
|
Begins an update and stops all refreshes.
<template>
<JqxDataTable ref="myDataTable" :width="850" :source="source" :columns="columns" />
</template>
<script setup>
import { onMounted, ref } from 'vue';
import JqxDataTable from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxdatatable.vue';
const myDataTable = ref(null);
const sourceData = {
localdata: [
['Maria Anders', 'Sales Representative', 'Berlin', 'Germany'],
['Ana Trujillo', 'Owner', 'México D.F.', 'Mexico'],
['Antonio Moreno', 'Owner', 'México D.F.', 'Mexico']
],
datafields: [
{ name: 'ContactName', type: 'string', map: '0' },
{ name: 'Title', type: 'string', map: '1' },
{ name: 'City', type: 'string', map: '2' },
{ name: 'Country', type: 'string', map: '3' }
],
datatype: 'array'
};
const source = ref(new jqx.dataAdapter(sourceData));
const columns = ref([
{ text: 'Contact Name', datafield: 'ContactName' },
{ text: 'Contact Title', datafield: 'Title' },
{ text: 'City', datafield: 'City' },
{ text: 'Country', datafield: 'Country' }
]);
onMounted(() => {
myDataTable.value.beginUpdate();
});
</script>
|
|
beginRowEdit
# |
rowIndex
|
None
|
Begins a row edit operation when editable is set to true.
<template>
<JqxDataTable ref="myDataTable" :width="850" :source="source" :columns="columns" />
</template>
<script setup>
import { onMounted, ref } from 'vue';
import JqxDataTable from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxdatatable.vue';
const myDataTable = ref(null);
const sourceData = {
localdata: [
['Maria Anders', 'Sales Representative', 'Berlin', 'Germany'],
['Ana Trujillo', 'Owner', 'México D.F.', 'Mexico'],
['Antonio Moreno', 'Owner', 'México D.F.', 'Mexico']
],
datafields: [
{ name: 'ContactName', type: 'string', map: '0' },
{ name: 'Title', type: 'string', map: '1' },
{ name: 'City', type: 'string', map: '2' },
{ name: 'Country', type: 'string', map: '3' }
],
datatype: 'array'
};
const source = ref(new jqx.dataAdapter(sourceData));
const columns = ref([
{ text: 'Contact Name', datafield: 'ContactName' },
{ text: 'Contact Title', datafield: 'Title' },
{ text: 'City', datafield: 'City' },
{ text: 'Country', datafield: 'Country' }
]);
onMounted(() => {
myDataTable.value.beginRowEdit(0);
});
</script>
|
|
beginCellEdit
# |
rowIndex, dataField
|
None
|
Begins a cell edit operation when editable is set to true.
<template>
<JqxDataTable ref="myDataTable" :width="850" :source="source" :columns="columns" />
</template>
<script setup>
import { onMounted, ref } from 'vue';
import JqxDataTable from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxdatatable.vue';
const myDataTable = ref(null);
const sourceData = {
localdata: [
['Maria Anders', 'Sales Representative', 'Berlin', 'Germany'],
['Ana Trujillo', 'Owner', 'México D.F.', 'Mexico'],
['Antonio Moreno', 'Owner', 'México D.F.', 'Mexico']
],
datafields: [
{ name: 'ContactName', type: 'string', map: '0' },
{ name: 'Title', type: 'string', map: '1' },
{ name: 'City', type: 'string', map: '2' },
{ name: 'Country', type: 'string', map: '3' }
],
datatype: 'array'
};
const source = ref(new jqx.dataAdapter(sourceData));
const columns = ref([
{ text: 'Contact Name', datafield: 'ContactName' },
{ text: 'Contact Title', datafield: 'Title' },
{ text: 'City', datafield: 'City' },
{ text: 'Country', datafield: 'Country' }
]);
onMounted(() => {
myDataTable.value.beginCellEdit(0, 'ContactName');
});
</script>
|
|
clearSelection
# |
None
|
None
|
Clears the selection.
<template>
<JqxDataTable ref="myDataTable" :width="850" :source="source" :columns="columns" />
</template>
<script setup>
import { onMounted, ref } from 'vue';
import JqxDataTable from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxdatatable.vue';
const myDataTable = ref(null);
const sourceData = {
localdata: [
['Maria Anders', 'Sales Representative', 'Berlin', 'Germany'],
['Ana Trujillo', 'Owner', 'México D.F.', 'Mexico'],
['Antonio Moreno', 'Owner', 'México D.F.', 'Mexico']
],
datafields: [
{ name: 'ContactName', type: 'string', map: '0' },
{ name: 'Title', type: 'string', map: '1' },
{ name: 'City', type: 'string', map: '2' },
{ name: 'Country', type: 'string', map: '3' }
],
datatype: 'array'
};
const source = ref(new jqx.dataAdapter(sourceData));
const columns = ref([
{ text: 'Contact Name', datafield: 'ContactName' },
{ text: 'Contact Title', datafield: 'Title' },
{ text: 'City', datafield: 'City' },
{ text: 'Country', datafield: 'Country' }
]);
onMounted(() => {
myDataTable.value.clearSelection();
});
</script>
|
|
clearFilters
# |
None
|
None
|
Clears the filters.
<template>
<div>
<JqxDataTable
ref="myDataTable"
:width="850"
:source="source"
:columns="columns"
:filterable="true"
:ready="ready"
/>
<br />
<JqxButton @click="onClick($event)" :width="60" :height="20">Click</JqxButton>
</div>
</template>
<script setup>
import { ref } from 'vue';
import JqxDataTable from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxdatatable.vue';
import JqxButton from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxbuttons.vue';
const myDataTable = ref(null);
let dataSource = {
localdata: [
['Maria Anders', 'Sales Representative', 'Berlin', 'Germany'],
['Ana Trujillo', 'Owner', 'México D.F.', 'Mexico'],
['Antonio Moreno', 'Owner', 'México D.F.', 'Mexico'],
['Andrew Nodier', 'Accounting Manager', 'Ottawa', 'Canada']
],
datafields: [
{ name: 'ContactName', type: 'string', map: '0' },
{ name: 'Title', type: 'string', map: '1' },
{ name: 'City', type: 'string', map: '2' },
{ name: 'Country', type: 'string', map: '3' }
],
datatype: 'array'
};
const source = ref(new jqx.dataAdapter(dataSource));
const columns = ref([
{ text: 'Contact Name', datafield: 'ContactName', hidden: false },
{ text: 'Contact Title', datafield: 'Title' },
{ text: 'City', datafield: 'City' },
{ text: 'Country', datafield: 'Country' }
]);
const ready = ref(() => {
let filtertype = 'stringfilter';
let filtergroup = new jqx.filter();
let filter_or_operator = 1;
// set filter's value.
let filtervalue = 'er';
// set filter's condition.
let filtercondition = 'contains';
// create new filter.
let filter = filtergroup.createfilter(filtertype, filtervalue, filtercondition);
// add the filter to the filter group.
filtergroup.addfilter(filter_or_operator, filter);
// add the filters.
myDataTable.value.addFilter('ContactName', filtergroup);
// apply the filters.
myDataTable.value.applyFilters();
});
function onClick(event) {
myDataTable.value.clearFilters();
}
</script>
|
|
clear
# |
None
|
None
|
Clears the jqxDataTable.
<template>
<JqxDataTable ref="myDataTable" :width="850" :source="source" :columns="columns" />
</template>
<script setup>
import { onMounted, ref } from 'vue';
import JqxDataTable from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxdatatable.vue';
const myDataTable = ref(null);
const sourceData = {
localdata: [
['Maria Anders', 'Sales Representative', 'Berlin', 'Germany'],
['Ana Trujillo', 'Owner', 'México D.F.', 'Mexico'],
['Antonio Moreno', 'Owner', 'México D.F.', 'Mexico']
],
datafields: [
{ name: 'ContactName', type: 'string', map: '0' },
{ name: 'Title', type: 'string', map: '1' },
{ name: 'City', type: 'string', map: '2' },
{ name: 'Country', type: 'string', map: '3' }
],
datatype: 'array'
};
const source = ref(new jqx.dataAdapter(sourceData));
const columns = ref([
{ text: 'Contact Name', datafield: 'ContactName' },
{ text: 'Contact Title', datafield: 'Title' },
{ text: 'City', datafield: 'City' },
{ text: 'Country', datafield: 'Country' }
]);
onMounted(() => {
myDataTable.value.clear();
});
</script>
|
|
destroy
# |
None
|
None
|
Destroys jqxDataTable and removes it from the DOM.
<template>
<JqxDataTable ref="myDataTable" :width="850" :source="source" :columns="columns" />
</template>
<script setup>
import { onMounted, ref } from 'vue';
import JqxDataTable from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxdatatable.vue';
const myDataTable = ref(null);
const sourceData = {
localdata: [
['Maria Anders', 'Sales Representative', 'Berlin', 'Germany'],
['Ana Trujillo', 'Owner', 'México D.F.', 'Mexico'],
['Antonio Moreno', 'Owner', 'México D.F.', 'Mexico']
],
datafields: [
{ name: 'ContactName', type: 'string', map: '0' },
{ name: 'Title', type: 'string', map: '1' },
{ name: 'City', type: 'string', map: '2' },
{ name: 'Country', type: 'string', map: '3' }
],
datatype: 'array'
};
const source = ref(new jqx.dataAdapter(sourceData));
const columns = ref([
{ text: 'Contact Name', datafield: 'ContactName' },
{ text: 'Contact Title', datafield: 'Title' },
{ text: 'City', datafield: 'City' },
{ text: 'Country', datafield: 'Country' }
]);
onMounted(() => {
myDataTable.value.destroy();
});
</script>
|
|
deleteRow
# |
rowIndex
|
None
|
Deletes a row. For synchronization with a server, please look also the jqxDataAdapter plug-in's help documentation.
<template>
<JqxDataTable ref="myDataTable" :width="850" :source="source" :columns="columns" />
</template>
<script setup>
import { onMounted, ref } from 'vue';
import JqxDataTable from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxdatatable.vue';
const myDataTable = ref(null);
const sourceData = {
localdata: [
['Maria Anders', 'Sales Representative', 'Berlin', 'Germany'],
['Ana Trujillo', 'Owner', 'México D.F.', 'Mexico'],
['Antonio Moreno', 'Owner', 'México D.F.', 'Mexico']
],
datafields: [
{ name: 'ContactName', type: 'string', map: '0' },
{ name: 'Title', type: 'string', map: '1' },
{ name: 'City', type: 'string', map: '2' },
{ name: 'Country', type: 'string', map: '3' }
],
datatype: 'array'
};
const source = ref(new jqx.dataAdapter(sourceData));
const columns = ref([
{ text: 'Contact Name', datafield: 'ContactName' },
{ text: 'Contact Title', datafield: 'Title' },
{ text: 'City', datafield: 'City' },
{ text: 'Country', datafield: 'Country' }
]);
onMounted(() => {
myDataTable.value.deleteRow(0);
});
</script>
|
|
endUpdate
# |
None
|
None
|
Ends the update and resumes all refreshes.
<template>
<JqxDataTable ref="myDataTable" :width="850" :source="source" :columns="columns" />
</template>
<script setup>
import { onMounted, ref } from 'vue';
import JqxDataTable from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxdatatable.vue';
const myDataTable = ref(null);
const sourceData = {
localdata: [
['Maria Anders', 'Sales Representative', 'Berlin', 'Germany'],
['Ana Trujillo', 'Owner', 'México D.F.', 'Mexico'],
['Antonio Moreno', 'Owner', 'México D.F.', 'Mexico']
],
datafields: [
{ name: 'ContactName', type: 'string', map: '0' },
{ name: 'Title', type: 'string', map: '1' },
{ name: 'City', type: 'string', map: '2' },
{ name: 'Country', type: 'string', map: '3' }
],
datatype: 'array'
};
const source = ref(new jqx.dataAdapter(sourceData));
const columns = ref([
{ text: 'Contact Name', datafield: 'ContactName' },
{ text: 'Contact Title', datafield: 'Title' },
{ text: 'City', datafield: 'City' },
{ text: 'Country', datafield: 'Country' }
]);
onMounted(() => {
myDataTable.value.endUpdate();
});
</script>
|
|
ensureRowVisible
# |
rowIndex
|
None
|
Moves the vertical scrollbar to a row index.
<template>
<JqxDataTable
ref="myDataTable"
:width="850"
:height="100"
:source="source"
:columns="columns"
:ready="ready"
/>
</template>
<script setup>
import { ref } from 'vue';
import JqxDataTable from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxdatatable.vue';
import JqxButton from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxbuttons.vue';
const myDataTable = ref(null);
let dataSource = {
localdata: [
['Maria Anders', 'Sales Representative', 'Berlin', 'Germany'],
['Ana Trujillo', 'Owner', 'México D.F.', 'Mexico'],
['Antonio Moreno', 'Owner', 'México D.F.', 'Mexico'],
['Andrew Nodier', 'Accounting Manager', 'Ottawa', 'Canada']
],
datafields: [
{ name: 'ContactName', type: 'string', map: '0' },
{ name: 'Title', type: 'string', map: '1' },
{ name: 'City', type: 'string', map: '2' },
{ name: 'Country', type: 'string', map: '3' }
],
datatype: 'array'
};
const source = ref(new jqx.dataAdapter(dataSource));
const columns = ref([
{ text: 'Contact Name', datafield: 'ContactName', hidden: false },
{ text: 'Contact Title', datafield: 'Title' },
{ text: 'City', datafield: 'City' },
{ text: 'Country', datafield: 'Country' }
]);
const ready = ref(() => {
myDataTable.value.ensureRowVisible(2);
});
</script>
|
|
endRowEdit
# |
rowIndex, cancelChanges
|
None
|
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)"
<template>
<JqxDataTable ref="myDataTable" :width="850" :source="source" :columns="columns" />
</template>
<script setup>
import { onMounted, ref } from 'vue';
import JqxDataTable from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxdatatable.vue';
const myDataTable = ref(null);
const sourceData = {
localdata: [
['Maria Anders', 'Sales Representative', 'Berlin', 'Germany'],
['Ana Trujillo', 'Owner', 'México D.F.', 'Mexico'],
['Antonio Moreno', 'Owner', 'México D.F.', 'Mexico']
],
datafields: [
{ name: 'ContactName', type: 'string', map: '0' },
{ name: 'Title', type: 'string', map: '1' },
{ name: 'City', type: 'string', map: '2' },
{ name: 'Country', type: 'string', map: '3' }
],
datatype: 'array'
};
const source = ref(new jqx.dataAdapter(sourceData));
const columns = ref([
{ text: 'Contact Name', datafield: 'ContactName' },
{ text: 'Contact Title', datafield: 'Title' },
{ text: 'City', datafield: 'City' },
{ text: 'Country', datafield: 'Country' }
]);
onMounted(() => {
myDataTable.value.endRowEdit(0);
});
</script>
|
|
endCellEdit
# |
rowIndex, dataField
|
None
|
Ends a cell edit operation when editable is set to true.
<template>
<JqxDataTable
ref="myDataTable"
:width="850"
:source="source"
:columns="columns"
:editable="true"
:ready="ready"
/>
</template>
<script setup>
import { ref } from 'vue';
import JqxDataTable from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxdatatable.vue';
const myDataTable = ref(null);
let dataSource = {
localdata: [
['Maria Anders', 'Sales Representative', 'Berlin', 'Germany'],
['Ana Trujillo', 'Owner', 'México D.F.', 'Mexico'],
['Antonio Moreno', 'Owner', 'México D.F.', 'Mexico'],
['Andrew Nodier', 'Accounting Manager', 'Ottawa', 'Canada']
],
datafields: [
{ name: 'ContactName', type: 'string', map: '0' },
{ name: 'Title', type: 'string', map: '1' },
{ name: 'City', type: 'string', map: '2' },
{ name: 'Country', type: 'string', map: '3' }
],
datatype: 'array'
};
const source = ref(new jqx.dataAdapter(dataSource));
const columns = ref([
{ text: 'Contact Name', datafield: 'ContactName', hidden: false },
{ text: 'Contact Title', datafield: 'Title' },
{ text: 'City', datafield: 'City' },
{ text: 'Country', datafield: 'Country' }
]);
const ready = ref(() => {
myDataTable.value.beginCellEdit(0, 'ContactName');
setTimeout(() => {
myDataTable.value.endCellEdit(0, 'ContactName');
}, 1000);
});
</script>
|
|
exportData
# |
exportDataType
|
Object(optional)
|
Exports jqxDataTable's data to Excel, HTML, XML, JSON, CSV or TSV. See also the exportSettings property
<template>
<JqxDataTable ref="myDataTable" :width="850" :source="source" :columns="columns" />
</template>
<script setup>
import { onMounted, ref } from 'vue';
import JqxDataTable from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxdatatable.vue';
const myDataTable = ref(null);
const sourceData = {
localdata: [
['Maria Anders', 'Sales Representative', 'Berlin', 'Germany'],
['Ana Trujillo', 'Owner', 'México D.F.', 'Mexico'],
['Antonio Moreno', 'Owner', 'México D.F.', 'Mexico']
],
datafields: [
{ name: 'ContactName', type: 'string', map: '0' },
{ name: 'Title', type: 'string', map: '1' },
{ name: 'City', type: 'string', map: '2' },
{ name: 'Country', type: 'string', map: '3' }
],
datatype: 'array'
};
const source = ref(new jqx.dataAdapter(sourceData));
const columns = ref([
{ text: 'Contact Name', datafield: 'ContactName' },
{ text: 'Contact Title', datafield: 'Title' },
{ text: 'City', datafield: 'City' },
{ text: 'Country', datafield: 'Country' }
]);
onMounted(() => {
const value = myDataTable.value.exportData('xls');
});
</script>
|
|
focus
# |
None
|
None
|
Focus jqxDataTable.
<template>
<JqxDataTable ref="myDataTable" :width="850" :source="source" :columns="columns" />
</template>
<script setup>
import { onMounted, ref } from 'vue';
import JqxDataTable from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxdatatable.vue';
const myDataTable = ref(null);
const sourceData = {
localdata: [
['Maria Anders', 'Sales Representative', 'Berlin', 'Germany'],
['Ana Trujillo', 'Owner', 'México D.F.', 'Mexico'],
['Antonio Moreno', 'Owner', 'México D.F.', 'Mexico']
],
datafields: [
{ name: 'ContactName', type: 'string', map: '0' },
{ name: 'Title', type: 'string', map: '1' },
{ name: 'City', type: 'string', map: '2' },
{ name: 'Country', type: 'string', map: '3' }
],
datatype: 'array'
};
const source = ref(new jqx.dataAdapter(sourceData));
const columns = ref([
{ text: 'Contact Name', datafield: 'ContactName' },
{ text: 'Contact Title', datafield: 'Title' },
{ text: 'City', datafield: 'City' },
{ text: 'Country', datafield: 'Country' }
]);
onMounted(() => {
myDataTable.value.focus();
});
</script>
|
|
getColumnProperty
# |
dataField, propertyName
|
Object
|
Gets a property value of a column.
<template>
<JqxDataTable ref="myDataTable" :width="850" :source="source" :columns="columns" />
</template>
<script setup>
import { onMounted, ref } from 'vue';
import JqxDataTable from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxdatatable.vue';
const myDataTable = ref(null);
const sourceData = {
localdata: [
['Maria Anders', 'Sales Representative', 'Berlin', 'Germany'],
['Ana Trujillo', 'Owner', 'México D.F.', 'Mexico'],
['Antonio Moreno', 'Owner', 'México D.F.', 'Mexico']
],
datafields: [
{ name: 'ContactName', type: 'string', map: '0' },
{ name: 'Title', type: 'string', map: '1' },
{ name: 'City', type: 'string', map: '2' },
{ name: 'Country', type: 'string', map: '3' }
],
datatype: 'array'
};
const source = ref(new jqx.dataAdapter(sourceData));
const columns = ref([
{ text: 'Contact Name', datafield: 'ContactName' },
{ text: 'Contact Title', datafield: 'Title' },
{ text: 'City', datafield: 'City' },
{ text: 'Country', datafield: 'Country' }
]);
onMounted(() => {
const value = myDataTable.value.getColumnProperty('ContactName', 'width');
});
</script>
|
|
goToPage
# |
pageIndex
|
None
|
Navigates to a page when pageable is set to true.
<template>
<JqxDataTable
ref="myDataTable"
:width="850"
:source="source"
:columns="columns"
:pageable="true"
:pageSize="2"
:ready="ready"
/>
</template>
<script setup>
import { ref } from 'vue';
import JqxDataTable from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxdatatable.vue';
const myDataTable = ref(null);
let dataSource = {
localdata: [
['Maria Anders', 'Sales Representative', 'Berlin', 'Germany'],
['Ana Trujillo', 'Owner', 'México D.F.', 'Mexico'],
['Antonio Moreno', 'Owner', 'México D.F.', 'Mexico'],
['Andrew Nodier', 'Accounting Manager', 'Ottawa', 'Canada']
],
datafields: [
{ name: 'ContactName', type: 'string', map: '0' },
{ name: 'Title', type: 'string', map: '1' },
{ name: 'City', type: 'string', map: '2' },
{ name: 'Country', type: 'string', map: '3' }
],
datatype: 'array'
};
const source = ref(new jqx.dataAdapter(dataSource));
const columns = ref([
{ text: 'Contact Name', datafield: 'ContactName', hidden: false },
{ text: 'Contact Title', datafield: 'Title' },
{ text: 'City', datafield: 'City' },
{ text: 'Country', datafield: 'Country' }
]);
const ready = ref(() => {
myDataTable.value.goToPage(1);
});
</script>
|
|
goToPrevPage
# |
None
|
None
|
Navigates to a previous page when pageable is set to true.
<template>
<div>
<JqxDataTable
ref="myDataTable"
:width="850"
:source="source"
:columns="columns"
:pageable="true"
:pageSize="2"
:ready="ready"
/>
<br />
<JqxButton @click="onClick($event)" :width="60" :height="20">Click</JqxButton>
</div>
</template>
<script setup>
import { ref } from 'vue';
import JqxDataTable from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxdatatable.vue';
import JqxButton from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxbuttons.vue';
const myDataTable = ref(null);
let dataSource = {
localdata: [
['Maria Anders', 'Sales Representative', 'Berlin', 'Germany'],
['Ana Trujillo', 'Owner', 'México D.F.', 'Mexico'],
['Antonio Moreno', 'Owner', 'México D.F.', 'Mexico'],
['Andrew Nodier', 'Accounting Manager', 'Ottawa', 'Canada']
],
datafields: [
{ name: 'ContactName', type: 'string', map: '0' },
{ name: 'Title', type: 'string', map: '1' },
{ name: 'City', type: 'string', map: '2' },
{ name: 'Country', type: 'string', map: '3' }
],
datatype: 'array'
};
const source = ref(new jqx.dataAdapter(dataSource));
const columns = ref([
{ text: 'Contact Name', datafield: 'ContactName', hidden: false },
{ text: 'Contact Title', datafield: 'Title' },
{ text: 'City', datafield: 'City' },
{ text: 'Country', datafield: 'Country' }
]);
const ready = ref(() => {
myDataTable.value.goToPage(1);
});
function onClick(event) {
myDataTable.value.goToPrevPage();
}
</script>
|
|
goToNextPage
# |
None
|
None
|
Navigates to a next page when pageable is set to true.
<template>
<div>
<JqxDataTable
ref="myDataTable"
:width="850"
:source="source"
:columns="columns"
:pageable="true"
:pageSize="2"
/>
<br />
<JqxButton @click="onClick($event)" :width="60" :height="20">Click</JqxButton>
</div>
</template>
<script setup>
import { ref } from 'vue';
import JqxDataTable from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxdatatable.vue';
import JqxButton from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxbuttons.vue';
const myDataTable = ref(null);
let dataSource = {
localdata: [
['Maria Anders', 'Sales Representative', 'Berlin', 'Germany'],
['Ana Trujillo', 'Owner', 'México D.F.', 'Mexico'],
['Antonio Moreno', 'Owner', 'México D.F.', 'Mexico'],
['Andrew Nodier', 'Accounting Manager', 'Ottawa', 'Canada']
],
datafields: [
{ name: 'ContactName', type: 'string', map: '0' },
{ name: 'Title', type: 'string', map: '1' },
{ name: 'City', type: 'string', map: '2' },
{ name: 'Country', type: 'string', map: '3' }
],
datatype: 'array'
};
const source = ref(new jqx.dataAdapter(dataSource));
const columns = ref([
{ text: 'Contact Name', datafield: 'ContactName', hidden: false },
{ text: 'Contact Title', datafield: 'Title' },
{ text: 'City', datafield: 'City' },
{ text: 'Country', datafield: 'Country' }
]);
function onClick(event) {
myDataTable.value.goToNextPage();
}
</script>
|
|
getSelection
# |
None
|
Array
|
Returns an array of selected rows.
<template>
<JqxDataTable ref="myDataTable" :width="850" :source="source" :columns="columns" />
</template>
<script setup>
import { onMounted, ref } from 'vue';
import JqxDataTable from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxdatatable.vue';
const myDataTable = ref(null);
const sourceData = {
localdata: [
['Maria Anders', 'Sales Representative', 'Berlin', 'Germany'],
['Ana Trujillo', 'Owner', 'México D.F.', 'Mexico'],
['Antonio Moreno', 'Owner', 'México D.F.', 'Mexico']
],
datafields: [
{ name: 'ContactName', type: 'string', map: '0' },
{ name: 'Title', type: 'string', map: '1' },
{ name: 'City', type: 'string', map: '2' },
{ name: 'Country', type: 'string', map: '3' }
],
datatype: 'array'
};
const source = ref(new jqx.dataAdapter(sourceData));
const columns = ref([
{ text: 'Contact Name', datafield: 'ContactName' },
{ text: 'Contact Title', datafield: 'Title' },
{ text: 'City', datafield: 'City' },
{ text: 'Country', datafield: 'Country' }
]);
onMounted(() => {
const value = myDataTable.value.getSelection();
});
</script>
|
|
getRows
# |
None
|
Array
|
Returns an array of all rows loaded in the widget.
<template>
<JqxDataTable ref="myDataTable" :width="850" :source="source" :columns="columns" />
</template>
<script setup>
import { onMounted, ref } from 'vue';
import JqxDataTable from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxdatatable.vue';
const myDataTable = ref(null);
const sourceData = {
localdata: [
['Maria Anders', 'Sales Representative', 'Berlin', 'Germany'],
['Ana Trujillo', 'Owner', 'México D.F.', 'Mexico'],
['Antonio Moreno', 'Owner', 'México D.F.', 'Mexico']
],
datafields: [
{ name: 'ContactName', type: 'string', map: '0' },
{ name: 'Title', type: 'string', map: '1' },
{ name: 'City', type: 'string', map: '2' },
{ name: 'Country', type: 'string', map: '3' }
],
datatype: 'array'
};
const source = ref(new jqx.dataAdapter(sourceData));
const columns = ref([
{ text: 'Contact Name', datafield: 'ContactName' },
{ text: 'Contact Title', datafield: 'Title' },
{ text: 'City', datafield: 'City' },
{ text: 'Country', datafield: 'Country' }
]);
onMounted(() => {
const value = myDataTable.value.getRows();
});
</script>
|
|
getView
# |
None
|
Array
|
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.
<template>
<JqxDataTable ref="myDataTable" :width="850" :source="source" :columns="columns" />
</template>
<script setup>
import { onMounted, ref } from 'vue';
import JqxDataTable from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxdatatable.vue';
const myDataTable = ref(null);
const sourceData = {
localdata: [
['Maria Anders', 'Sales Representative', 'Berlin', 'Germany'],
['Ana Trujillo', 'Owner', 'México D.F.', 'Mexico'],
['Antonio Moreno', 'Owner', 'México D.F.', 'Mexico']
],
datafields: [
{ name: 'ContactName', type: 'string', map: '0' },
{ name: 'Title', type: 'string', map: '1' },
{ name: 'City', type: 'string', map: '2' },
{ name: 'Country', type: 'string', map: '3' }
],
datatype: 'array'
};
const source = ref(new jqx.dataAdapter(sourceData));
const columns = ref([
{ text: 'Contact Name', datafield: 'ContactName' },
{ text: 'Contact Title', datafield: 'Title' },
{ text: 'City', datafield: 'City' },
{ text: 'Country', datafield: 'Country' }
]);
onMounted(() => {
const value = myDataTable.value.getView();
});
</script>
|
|
getCellValue
# |
rowIndex, dataField
|
Object
|
Returns a value of a cell.
<template>
<JqxDataTable ref="myDataTable" :width="850" :source="source" :columns="columns" />
</template>
<script setup>
import { onMounted, ref } from 'vue';
import JqxDataTable from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxdatatable.vue';
const myDataTable = ref(null);
const sourceData = {
localdata: [
['Maria Anders', 'Sales Representative', 'Berlin', 'Germany'],
['Ana Trujillo', 'Owner', 'México D.F.', 'Mexico'],
['Antonio Moreno', 'Owner', 'México D.F.', 'Mexico']
],
datafields: [
{ name: 'ContactName', type: 'string', map: '0' },
{ name: 'Title', type: 'string', map: '1' },
{ name: 'City', type: 'string', map: '2' },
{ name: 'Country', type: 'string', map: '3' }
],
datatype: 'array'
};
const source = ref(new jqx.dataAdapter(sourceData));
const columns = ref([
{ text: 'Contact Name', datafield: 'ContactName' },
{ text: 'Contact Title', datafield: 'Title' },
{ text: 'City', datafield: 'City' },
{ text: 'Country', datafield: 'Country' }
]);
onMounted(() => {
const value = myDataTable.value.getCellValue(1, 'ContactName');
});
</script>
|
|
hideColumn
# |
dataField
|
None
|
Hides a column.
<template>
<JqxDataTable ref="myDataTable" :width="850" :source="source" :columns="columns" />
</template>
<script setup>
import { onMounted, ref } from 'vue';
import JqxDataTable from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxdatatable.vue';
const myDataTable = ref(null);
const sourceData = {
localdata: [
['Maria Anders', 'Sales Representative', 'Berlin', 'Germany'],
['Ana Trujillo', 'Owner', 'México D.F.', 'Mexico'],
['Antonio Moreno', 'Owner', 'México D.F.', 'Mexico']
],
datafields: [
{ name: 'ContactName', type: 'string', map: '0' },
{ name: 'Title', type: 'string', map: '1' },
{ name: 'City', type: 'string', map: '2' },
{ name: 'Country', type: 'string', map: '3' }
],
datatype: 'array'
};
const source = ref(new jqx.dataAdapter(sourceData));
const columns = ref([
{ text: 'Contact Name', datafield: 'ContactName' },
{ text: 'Contact Title', datafield: 'Title' },
{ text: 'City', datafield: 'City' },
{ text: 'Country', datafield: 'Country' }
]);
onMounted(() => {
myDataTable.value.hideColumn('ContactName');
});
</script>
|
|
hideDetails
# |
rowIndex
|
None
|
Hides the details of a row.
<template>
<div>
<JqxDataTable
ref="myDataTable"
:width="850"
:source="source"
:columns="columns"
:ready="ready"
:rowDetails="true"
:initRowDetails="initRowDetails"
/>
<br />
<JqxButton @click="onClick($event)" :width="60" :height="20">Click</JqxButton>
</div>
</template>
<script setup>
import { ref } from 'vue';
import JqxDataTable from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxdatatable.vue';
import JqxButton from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxbuttons.vue';
const myDataTable = ref(null);
let dataSource = {
localdata: [
['Maria Anders', 'Sales Representative', 'Berlin', 'Germany'],
['Ana Trujillo', 'Owner', 'México D.F.', 'Mexico'],
['Antonio Moreno', 'Owner', 'México D.F.', 'Mexico'],
['Andrew Nodier', 'Accounting Manager', 'Ottawa', 'Canada']
],
datafields: [
{ name: 'ContactName', type: 'string', map: '0' },
{ name: 'Title', type: 'string', map: '1' },
{ name: 'City', type: 'string', map: '2' },
{ name: 'Country', type: 'string', map: '3' }
],
datatype: 'array'
};
const source = ref(new jqx.dataAdapter(dataSource));
const columns = ref([
{ text: 'Contact Name', datafield: 'ContactName', hidden: false },
{ text: 'Contact Title', datafield: 'Title' },
{ text: 'City', datafield: 'City' },
{ text: 'Country', datafield: 'Country' }
]);
const initRowDetails = ref((id, row, element, rowinfo) => {
rowinfo.detailsHeight = 48;
element.html('<strong>Details</strong><br/>Row Index: ' + id);
});
const ready = ref(() => {
myDataTable.value.showDetails(1);
});
function onClick(event) {
const value = myDataTable.value.hideDetails(1);
}
</script>
|
|
isBindingCompleted
# |
None
|
Boolean
|
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.
<template>
<JqxDataTable ref="myDataTable" :width="850" :source="source" :columns="columns" />
</template>
<script setup>
import { onMounted, ref } from 'vue';
import JqxDataTable from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxdatatable.vue';
const myDataTable = ref(null);
const sourceData = {
localdata: [
['Maria Anders', 'Sales Representative', 'Berlin', 'Germany'],
['Ana Trujillo', 'Owner', 'México D.F.', 'Mexico'],
['Antonio Moreno', 'Owner', 'México D.F.', 'Mexico']
],
datafields: [
{ name: 'ContactName', type: 'string', map: '0' },
{ name: 'Title', type: 'string', map: '1' },
{ name: 'City', type: 'string', map: '2' },
{ name: 'Country', type: 'string', map: '3' }
],
datatype: 'array'
};
const source = ref(new jqx.dataAdapter(sourceData));
const columns = ref([
{ text: 'Contact Name', datafield: 'ContactName' },
{ text: 'Contact Title', datafield: 'Title' },
{ text: 'City', datafield: 'City' },
{ text: 'Country', datafield: 'Country' }
]);
onMounted(() => {
const value = myDataTable.value.isBindingCompleted();
});
</script>
|
|
lockRow
# |
rowIndex
|
None
|
Locks a row i.e editing of the row would be disabled.
<template>
<JqxDataTable ref="myDataTable" :width="850" :source="source" :columns="columns" />
</template>
<script setup>
import { onMounted, ref } from 'vue';
import JqxDataTable from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxdatatable.vue';
const myDataTable = ref(null);
const sourceData = {
localdata: [
['Maria Anders', 'Sales Representative', 'Berlin', 'Germany'],
['Ana Trujillo', 'Owner', 'México D.F.', 'Mexico'],
['Antonio Moreno', 'Owner', 'México D.F.', 'Mexico']
],
datafields: [
{ name: 'ContactName', type: 'string', map: '0' },
{ name: 'Title', type: 'string', map: '1' },
{ name: 'City', type: 'string', map: '2' },
{ name: 'Country', type: 'string', map: '3' }
],
datatype: 'array'
};
const source = ref(new jqx.dataAdapter(sourceData));
const columns = ref([
{ text: 'Contact Name', datafield: 'ContactName' },
{ text: 'Contact Title', datafield: 'Title' },
{ text: 'City', datafield: 'City' },
{ text: 'Country', datafield: 'Country' }
]);
onMounted(() => {
myDataTable.value.lockRow(0);
});
</script>
|
|
refresh
# |
None
|
None
|
Performs a layout and updates the HTML elements position and size.
<template>
<JqxDataTable ref="myDataTable" :width="850" :source="source" :columns="columns" />
</template>
<script setup>
import { onMounted, ref } from 'vue';
import JqxDataTable from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxdatatable.vue';
const myDataTable = ref(null);
const sourceData = {
localdata: [
['Maria Anders', 'Sales Representative', 'Berlin', 'Germany'],
['Ana Trujillo', 'Owner', 'México D.F.', 'Mexico'],
['Antonio Moreno', 'Owner', 'México D.F.', 'Mexico']
],
datafields: [
{ name: 'ContactName', type: 'string', map: '0' },
{ name: 'Title', type: 'string', map: '1' },
{ name: 'City', type: 'string', map: '2' },
{ name: 'Country', type: 'string', map: '3' }
],
datatype: 'array'
};
const source = ref(new jqx.dataAdapter(sourceData));
const columns = ref([
{ text: 'Contact Name', datafield: 'ContactName' },
{ text: 'Contact Title', datafield: 'Title' },
{ text: 'City', datafield: 'City' },
{ text: 'Country', datafield: 'Country' }
]);
onMounted(() => {
myDataTable.value.refresh();
});
</script>
|
|
render
# |
None
|
None
|
Renders jqxDataTable.
<template>
<JqxDataTable ref="myDataTable" :width="850" :source="source" :columns="columns" />
</template>
<script setup>
import { onMounted, ref } from 'vue';
import JqxDataTable from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxdatatable.vue';
const myDataTable = ref(null);
const sourceData = {
localdata: [
['Maria Anders', 'Sales Representative', 'Berlin', 'Germany'],
['Ana Trujillo', 'Owner', 'México D.F.', 'Mexico'],
['Antonio Moreno', 'Owner', 'México D.F.', 'Mexico']
],
datafields: [
{ name: 'ContactName', type: 'string', map: '0' },
{ name: 'Title', type: 'string', map: '1' },
{ name: 'City', type: 'string', map: '2' },
{ name: 'Country', type: 'string', map: '3' }
],
datatype: 'array'
};
const source = ref(new jqx.dataAdapter(sourceData));
const columns = ref([
{ text: 'Contact Name', datafield: 'ContactName' },
{ text: 'Contact Title', datafield: 'Title' },
{ text: 'City', datafield: 'City' },
{ text: 'Country', datafield: 'Country' }
]);
onMounted(() => {
myDataTable.value.render();
});
</script>
|
|
removeFilter
# |
dataField
|
None
|
Removes a filter.
<template>
<div>
<JqxDataTable
ref="myDataTable"
:width="850"
:source="source"
:columns="columns"
:filterable="true"
:ready="ready"
/>
<br />
<JqxButton @click="onClick($event)" :width="60" :height="20">Click</JqxButton>
</div>
</template>
<script setup>
import { ref } from 'vue';
import JqxDataTable from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxdatatable.vue';
import JqxButton from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxbuttons.vue';
const myDataTable = ref(null);
let dataSource = {
localdata: [
['Maria Anders', 'Sales Representative', 'Berlin', 'Germany'],
['Ana Trujillo', 'Owner', 'México D.F.', 'Mexico'],
['Antonio Moreno', 'Owner', 'México D.F.', 'Mexico'],
['Andrew Nodier', 'Accounting Manager', 'Ottawa', 'Canada']
],
datafields: [
{ name: 'ContactName', type: 'string', map: '0' },
{ name: 'Title', type: 'string', map: '1' },
{ name: 'City', type: 'string', map: '2' },
{ name: 'Country', type: 'string', map: '3' }
],
datatype: 'array'
};
const source = ref(new jqx.dataAdapter(dataSource));
const columns = ref([
{ text: 'Contact Name', datafield: 'ContactName', hidden: false },
{ text: 'Contact Title', datafield: 'Title' },
{ text: 'City', datafield: 'City' },
{ text: 'Country', datafield: 'Country' }
]);
const ready = ref(() => {
let filtertype = 'stringfilter';
let filtergroup = new jqx.filter();
let filter_or_operator = 1;
// set filter's value.
let filtervalue = 'er';
// set filter's condition.
let filtercondition = 'contains';
// create new filter.
let filter = filtergroup.createfilter(filtertype, filtervalue, filtercondition);
// add the filter to the filter group.
filtergroup.addfilter(filter_or_operator, filter);
// add the filters.
myDataTable.value.addFilter('ContactName', filtergroup);
// apply the filters.
myDataTable.value.applyFilters();
});
function onClick(event) {
myDataTable.value.removeFilter('ContactName');
myDataTable.value.applyFilters();
}
</script>
|
|
scrollOffset
# |
top, left
|
None
|
Scrolls to a position.
<template>
<JqxDataTable ref="myDataTable" :width="850" :source="source" :columns="columns" />
</template>
<script setup>
import { onMounted, ref } from 'vue';
import JqxDataTable from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxdatatable.vue';
const myDataTable = ref(null);
const sourceData = {
localdata: [
['Maria Anders', 'Sales Representative', 'Berlin', 'Germany'],
['Ana Trujillo', 'Owner', 'México D.F.', 'Mexico'],
['Antonio Moreno', 'Owner', 'México D.F.', 'Mexico']
],
datafields: [
{ name: 'ContactName', type: 'string', map: '0' },
{ name: 'Title', type: 'string', map: '1' },
{ name: 'City', type: 'string', map: '2' },
{ name: 'Country', type: 'string', map: '3' }
],
datatype: 'array'
};
const source = ref(new jqx.dataAdapter(sourceData));
const columns = ref([
{ text: 'Contact Name', datafield: 'ContactName' },
{ text: 'Contact Title', datafield: 'Title' },
{ text: 'City', datafield: 'City' },
{ text: 'Country', datafield: 'Country' }
]);
onMounted(() => {
myDataTable.value.scrollOffset(10, 0);
});
</script>
|
|
setColumnProperty
# |
dataField, propertyName, propertyValue
|
None
|
Sets a property of a column. See the columns property for more information.
<template>
<JqxDataTable ref="myDataTable" :width="850" :source="source" :columns="columns" />
</template>
<script setup>
import { onMounted, ref } from 'vue';
import JqxDataTable from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxdatatable.vue';
const myDataTable = ref(null);
const sourceData = {
localdata: [
['Maria Anders', 'Sales Representative', 'Berlin', 'Germany'],
['Ana Trujillo', 'Owner', 'México D.F.', 'Mexico'],
['Antonio Moreno', 'Owner', 'México D.F.', 'Mexico']
],
datafields: [
{ name: 'ContactName', type: 'string', map: '0' },
{ name: 'Title', type: 'string', map: '1' },
{ name: 'City', type: 'string', map: '2' },
{ name: 'Country', type: 'string', map: '3' }
],
datatype: 'array'
};
const source = ref(new jqx.dataAdapter(sourceData));
const columns = ref([
{ text: 'Contact Name', datafield: 'ContactName' },
{ text: 'Contact Title', datafield: 'Title' },
{ text: 'City', datafield: 'City' },
{ text: 'Country', datafield: 'Country' }
]);
onMounted(() => {
myDataTable.value.setColumnProperty('ContactName', 'hidden', true);
});
</script>
|
|
showColumn
# |
dataField
|
None
|
Shows a column.
<template>
<div>
<JqxDataTable ref="myDataTable" :width="850" :source="source" :columns="columns" />
<br />
<JqxButton @click="onClick($event)" :width="60" :height="20">Click</JqxButton>
</div>
</template>
<script setup>
import { ref } from 'vue';
import JqxDataTable from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxdatatable.vue';
import JqxButton from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxbuttons.vue';
const myDataTable = ref(null);
let dataSource = {
localdata: [
['Maria Anders', 'Sales Representative', 'Berlin', 'Germany'],
['Ana Trujillo', 'Owner', 'México D.F.', 'Mexico'],
['Antonio Moreno', 'Owner', 'México D.F.', 'Mexico']
],
datafields: [
{ name: 'ContactName', type: 'string', map: '0' },
{ name: 'Title', type: 'string', map: '1' },
{ name: 'City', type: 'string', map: '2' },
{ name: 'Country', type: 'string', map: '3' }
],
datatype: 'array'
};
const source = ref(new jqx.dataAdapter(dataSource));
const columns = ref([
{ text: 'Contact Name', datafield: 'ContactName', hidden: true },
{ text: 'Contact Title', datafield: 'Title' },
{ text: 'City', datafield: 'City' },
{ text: 'Country', datafield: 'Country' }
]);
function onClick(event) {
myDataTable.value.showColumn('ContactName');
}
</script>
|
|
selectRow
# |
rowIndex
|
None
|
Selects a row.
<template>
<JqxDataTable ref="myDataTable" :width="850" :source="source" :columns="columns" />
</template>
<script setup>
import { onMounted, ref } from 'vue';
import JqxDataTable from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxdatatable.vue';
const myDataTable = ref(null);
const sourceData = {
localdata: [
['Maria Anders', 'Sales Representative', 'Berlin', 'Germany'],
['Ana Trujillo', 'Owner', 'México D.F.', 'Mexico'],
['Antonio Moreno', 'Owner', 'México D.F.', 'Mexico']
],
datafields: [
{ name: 'ContactName', type: 'string', map: '0' },
{ name: 'Title', type: 'string', map: '1' },
{ name: 'City', type: 'string', map: '2' },
{ name: 'Country', type: 'string', map: '3' }
],
datatype: 'array'
};
const source = ref(new jqx.dataAdapter(sourceData));
const columns = ref([
{ text: 'Contact Name', datafield: 'ContactName' },
{ text: 'Contact Title', datafield: 'Title' },
{ text: 'City', datafield: 'City' },
{ text: 'Country', datafield: 'Country' }
]);
onMounted(() => {
myDataTable.value.selectRow(1);
});
</script>
|
|
showDetails
# |
rowIndex
|
None
|
Shows a row details.
<template>
<JqxDataTable
ref="myDataTable"
:width="850"
:source="source"
:columns="columns"
:ready="ready"
:rowDetails="true"
:initRowDetails="initRowDetails"
/>
</template>
<script setup>
import { ref } from 'vue';
import JqxDataTable from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxdatatable.vue';
const myDataTable = ref(null);
const sourceData = {
localdata: [
['Maria Anders', 'Sales Representative', 'Berlin', 'Germany'],
['Ana Trujillo', 'Owner', 'México D.F.', 'Mexico'],
['Antonio Moreno', 'Owner', 'México D.F.', 'Mexico']
],
datafields: [
{ name: 'ContactName', type: 'string', map: '0' },
{ name: 'Title', type: 'string', map: '1' },
{ name: 'City', type: 'string', map: '2' },
{ name: 'Country', type: 'string', map: '3' }
],
datatype: 'array'
};
const source = ref(new jqx.dataAdapter(sourceData));
const columns = ref([
{ text: 'Contact Name', datafield: 'ContactName' },
{ text: 'Contact Title', datafield: 'Title' },
{ text: 'City', datafield: 'City' },
{ text: 'Country', datafield: 'Country' }
]);
const initRowDetails = ref((id, row, element, rowinfo) => {
rowinfo.detailsHeight = 48;
element.text('Row Details: ' + id);
});
const ready = ref(() => {
myDataTable.value.showDetails(1);
});
</script>
|
|
setCellValue
# |
rowIndex, dataField, value
|
None
|
Sets a value of a cell.
<template>
<JqxDataTable ref="myDataTable" :width="850" :source="source" :columns="columns" />
</template>
<script setup>
import { onMounted, ref } from 'vue';
import JqxDataTable from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxdatatable.vue';
const myDataTable = ref(null);
const sourceData = {
localdata: [
['Maria Anders', 'Sales Representative', 'Berlin', 'Germany'],
['Ana Trujillo', 'Owner', 'México D.F.', 'Mexico'],
['Antonio Moreno', 'Owner', 'México D.F.', 'Mexico']
],
datafields: [
{ name: 'ContactName', type: 'string', map: '0' },
{ name: 'Title', type: 'string', map: '1' },
{ name: 'City', type: 'string', map: '2' },
{ name: 'Country', type: 'string', map: '3' }
],
datatype: 'array'
};
const source = ref(new jqx.dataAdapter(sourceData));
const columns = ref([
{ text: 'Contact Name', datafield: 'ContactName' },
{ text: 'Contact Title', datafield: 'Title' },
{ text: 'City', datafield: 'City' },
{ text: 'Country', datafield: 'Country' }
]);
onMounted(() => {
myDataTable.value.setCellValue(1, 'ContactName', 'New Value');
});
</script>
|
|
sortBy
# |
dataField, sortOrder
|
None
|
Sorts a column, if sortable is set to true.
<template>
<JqxDataTable ref="myDataTable" :width="850" :source="source" :columns="columns" />
</template>
<script setup>
import { onMounted, ref } from 'vue';
import JqxDataTable from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxdatatable.vue';
const myDataTable = ref(null);
const sourceData = {
localdata: [
['Maria Anders', 'Sales Representative', 'Berlin', 'Germany'],
['Ana Trujillo', 'Owner', 'México D.F.', 'Mexico'],
['Antonio Moreno', 'Owner', 'México D.F.', 'Mexico']
],
datafields: [
{ name: 'ContactName', type: 'string', map: '0' },
{ name: 'Title', type: 'string', map: '1' },
{ name: 'City', type: 'string', map: '2' },
{ name: 'Country', type: 'string', map: '3' }
],
datatype: 'array'
};
const source = ref(new jqx.dataAdapter(sourceData));
const columns = ref([
{ text: 'Contact Name', datafield: 'ContactName' },
{ text: 'Contact Title', datafield: 'Title' },
{ text: 'City', datafield: 'City' },
{ text: 'Country', datafield: 'Country' }
]);
onMounted(() => {
myDataTable.value.sortable = true;
myDataTable.value.sortBy('ContactName', 'asc');
});
</script>
|
|
updating
# |
None
|
Boolean
|
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.
<template>
<JqxDataTable ref="myDataTable" :width="850" :source="source" :columns="columns" />
</template>
<script setup>
import { onMounted, ref } from 'vue';
import JqxDataTable from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxdatatable.vue';
const myDataTable = ref(null);
const sourceData = {
localdata: [
['Maria Anders', 'Sales Representative', 'Berlin', 'Germany'],
['Ana Trujillo', 'Owner', 'México D.F.', 'Mexico'],
['Antonio Moreno', 'Owner', 'México D.F.', 'Mexico']
],
datafields: [
{ name: 'ContactName', type: 'string', map: '0' },
{ name: 'Title', type: 'string', map: '1' },
{ name: 'City', type: 'string', map: '2' },
{ name: 'Country', type: 'string', map: '3' }
],
datatype: 'array'
};
const source = ref(new jqx.dataAdapter(sourceData));
const columns = ref([
{ text: 'Contact Name', datafield: 'ContactName' },
{ text: 'Contact Title', datafield: 'Title' },
{ text: 'City', datafield: 'City' },
{ text: 'Country', datafield: 'Country' }
]);
onMounted(() => {
const value = myDataTable.value.updating();
});
</script>
|
|
updateBoundData
# |
None
|
None
|
Performs a data bind and updates jqxDataTable with the new data.
<template>
<div>
<JqxDataTable ref="myDataTable" :width="850" :source="source" :columns="columns" />
<br />
<JqxButton @click="onClick($event)" :width="60" :height="20">Click</JqxButton>
</div>
</template>
<script setup>
import { ref } from 'vue';
import JqxDataTable from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxdatatable.vue';
import JqxButton from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxbuttons.vue';
const myDataTable = ref(null);
let dataSource = {
localdata: [
['Maria Anders', 'Sales Representative', 'Berlin', 'Germany'],
['Ana Trujillo', 'Owner', 'México D.F.', 'Mexico'],
['Antonio Moreno', 'Owner', 'México D.F.', 'Mexico']
],
datafields: [
{ name: 'ContactName', type: 'string', map: '0' },
{ name: 'Title', type: 'string', map: '1' },
{ name: 'City', type: 'string', map: '2' },
{ name: 'Country', type: 'string', map: '3' }
],
datatype: 'array'
};
const source = ref(new jqx.dataAdapter(dataSource));
const columns = ref([
{ text: 'Contact Name', datafield: 'ContactName' },
{ text: 'Contact Title', datafield: 'Title' },
{ text: 'City', datafield: 'City' },
{ text: 'Country', datafield: 'Country' }
]);
function onClick(event) {
this.dataSource.localdata = [
['Nancy Wilson', 'Owner', 'Rome', 'Italy'],
['Cheryl Nodier', 'Sales Representative', 'Prague', 'Czech Republic'],
['Guylene Bjorn', 'Owner', 'Paris', 'France'],
['Regina Murphy', 'Sales Representative', 'Lisbon', 'Portugal']
];
myDataTable.value.updateBoundData();
}
</script>
|
|
unselectRow
# |
rowIndex
|
None
|
Unselects a row.
<template>
<div>
<JqxDataTable
ref="myDataTable"
:width="850"
:source="source"
:columns="columns"
:ready="ready"
/>
<br />
<JqxButton @click="onClick($event)" :width="60" :height="20">Click</JqxButton>
</div>
</template>
<script setup>
import { ref } from 'vue';
import JqxDataTable from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxdatatable.vue';
import JqxButton from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxbuttons.vue';
const myDataTable = ref(null);
const sourceData = {
localdata: [
['Maria Anders', 'Sales Representative', 'Berlin', 'Germany'],
['Ana Trujillo', 'Owner', 'México D.F.', 'Mexico'],
['Antonio Moreno', 'Owner', 'México D.F.', 'Mexico']
],
datafields: [
{ name: 'ContactName', type: 'string', map: '0' },
{ name: 'Title', type: 'string', map: '1' },
{ name: 'City', type: 'string', map: '2' },
{ name: 'Country', type: 'string', map: '3' }
],
datatype: 'array'
};
const source = ref(new jqx.dataAdapter(sourceData));
const columns = ref([
{ text: 'Contact Name', datafield: 'ContactName' },
{ text: 'Contact Title', datafield: 'Title' },
{ text: 'City', datafield: 'City' },
{ text: 'Country', datafield: 'Country' }
]);
const ready = ref(() => {
myDataTable.value.selectRow(1);
});
function onClick(event) {
myDataTable.value.unselectRow(1);
}
</script>
|
|
updateRow
# |
rowIndex, rowData
|
None
|
Updates the row's data. For synchronization with a server, please look also the jqxDataAdapter plug-in's help documentation.
<template>
<JqxDataTable ref="myDataTable" :width="850" :source="source" :columns="columns" />
</template>
<script setup>
import { onMounted, ref } from 'vue';
import JqxDataTable from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxdatatable.vue';
const myDataTable = ref(null);
const sourceData = {
localdata: [
['Maria Anders', 'Sales Representative', 'Berlin', 'Germany'],
['Ana Trujillo', 'Owner', 'México D.F.', 'Mexico'],
['Antonio Moreno', 'Owner', 'México D.F.', 'Mexico']
],
datafields: [
{ name: 'ContactName', type: 'string', map: '0' },
{ name: 'Title', type: 'string', map: '1' },
{ name: 'City', type: 'string', map: '2' },
{ name: 'Country', type: 'string', map: '3' }
],
datatype: 'array'
};
const source = ref(new jqx.dataAdapter(sourceData));
const columns = ref([
{ text: 'Contact Name', datafield: 'ContactName' },
{ text: 'Contact Title', datafield: 'Title' },
{ text: 'City', datafield: 'City' },
{ text: 'Country', datafield: 'Country' }
]);
onMounted(() => {
myDataTable.value.updateRow(1, {});
});
</script>
|
|
unlockRow
# |
rowIndex
|
None
|
Unlocks a row.
<template>
<div>
<JqxDataTable
ref="myDataTable"
:width="850"
:source="source"
:columns="columns"
:ready="ready"
/>
<br />
<JqxButton @click="onClick($event)" :width="60" :height="20">Click</JqxButton>
</div>
</template>
<script setup>
import { ref } from 'vue';
import JqxDataTable from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxdatatable.vue';
import JqxButton from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxbuttons.vue';
const myDataTable = ref(null);
const sourceData = {
localdata: [
['Maria Anders', 'Sales Representative', 'Berlin', 'Germany'],
['Ana Trujillo', 'Owner', 'México D.F.', 'Mexico'],
['Antonio Moreno', 'Owner', 'México D.F.', 'Mexico']
],
datafields: [
{ name: 'ContactName', type: 'string', map: '0' },
{ name: 'Title', type: 'string', map: '1' },
{ name: 'City', type: 'string', map: '2' },
{ name: 'Country', type: 'string', map: '3' }
],
datatype: 'array'
};
const source = ref(new jqx.dataAdapter(sourceData));
const columns = ref([
{ text: 'Contact Name', datafield: 'ContactName' },
{ text: 'Contact Title', datafield: 'Title' },
{ text: 'City', datafield: 'City' },
{ text: 'Country', datafield: 'Country' }
]);
const ready = ref(() => {
myDataTable.value.lockRow(1);
});
function onClick(event) {
myDataTable.value.unlockRow(1);
}
</script>
|