| Name | Type | Default |
|
altrows
# |
Boolean
|
false
|
Enables or disables the alternating rows.
<template>
<JqxGrid
ref="myGrid"
:width="850"
:source="source"
:columns="columns"
:autoheight="true"
:altrows="true"
/>
</template>
<script setup>
import { ref } from 'vue';
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.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>
|
|
altstart
# |
Number
|
1
|
This property specifies the first alternating row.
<template>
<JqxGrid
ref="myGrid"
:width="850"
:source="source"
:columns="columns"
:autoheight="true"
:altrows="true"
:altstart="2"
/>
</template>
<script setup>
import { ref } from 'vue';
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.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>
|
|
altstep
# |
Number
|
1
|
Sets or gets the alternating step
<template>
<JqxGrid
ref="myGrid"
:width="850"
:source="source"
:columns="columns"
:autoheight="true"
:altrows="true"
:altstart="0"
:altstep="2"
/>
</template>
<script setup>
import { ref } from 'vue';
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.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>
|
|
autoshowloadelement
# |
Boolean
|
true
|
Determines whether the loading image should be displayed until the Grid's data is loaded.
<template>
<JqxGrid
ref="myGrid"
:width="850"
:source="source"
:columns="columns"
:autoheight="true"
:autoshowloadelement="false"
/>
</template>
<script setup>
import { ref } from 'vue';
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.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>
|
|
autoshowfiltericon
# |
Boolean
|
true
|
Displays the filter icon only when the column is filtered. When the value of this property is set to false, all grid columns will display a filter icon when the filtering is enabled.
<template>
<JqxGrid
ref="myGrid"
:width="850"
:source="source"
:columns="columns"
:autoheight="true"
:filterable="true"
:autoshowfiltericon="false"
/>
</template>
<script setup>
import { ref } from 'vue';
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.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>
|
|
autoshowcolumnsmenubutton
# |
Boolean
|
true
|
Sets or gets whether the columns menu button will be displayed only when the mouse cursor is over a columns header or will be always displayed.
<template>
<JqxGrid
ref="myGrid"
:width="850"
:source="source"
:columns="columns"
:autoheight="true"
:filterable="true"
:autoshowcolumnsmenubutton="false"
/>
</template>
<script setup>
import { ref } from 'vue';
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.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>
|
|
showcolumnlines
# |
Boolean
|
true
|
Sets or gets whether the columns lines are displayed.
<template>
<JqxGrid
ref="myGrid"
:width="850"
:source="source"
:columns="columns"
:autoheight="true"
:showcolumnlines="false"
/>
</template>
<script setup>
import { ref } from 'vue';
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.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>
|
|
showrowlines
# |
Boolean
|
true
|
Sets or gets whether the row lines are displayed.
<template>
<JqxGrid
ref="myGrid"
:width="850"
:source="source"
:columns="columns"
:autoheight="true"
:showrowlines="false"
/>
</template>
<script setup>
import { ref } from 'vue';
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.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>
|
|
showcolumnheaderlines
# |
Boolean
|
true
|
Sets or gets whether the column header lines are displayed.
<template>
<JqxGrid
ref="myGrid"
:width="850"
:source="source"
:columns="columns"
:autoheight="true"
:showcolumnheaderlines="false"
/>
</template>
<script setup>
import { ref } from 'vue';
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.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>
|
|
adaptive
# |
Boolean
|
false
|
Sets or gets whether adaptive mode is enabled.
<template>
<JqxGrid
ref="myGrid"
:width="850"
:source="source"
:columns="columns"
:autoheight="true"
:adaptive="true"
/>
</template>
<script setup>
import { ref } from 'vue';
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.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>
|
|
compact
# |
Boolean
|
false
|
Sets or gets whether compact mode is enabled.
<template>
<JqxGrid ref="myGrid"
:width="850" :source="dataAdapter" :columns="columns" :autoheight="true"
:compact="true"
/>
</template>
<script setup>
import { ref } from "vue";
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.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>
|
Sets or gets whether context menu items are set.
<template>
<JqxGrid ref="myGrid"
:width="850" :source="dataAdapter" :columns="columns" :autoheight="true"
:contextmenuitems=" ['Item 1', 'Item 2'] "
/>
</template>
<script setup>
import { ref } from "vue";
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.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>
|
Sets or gets whether context menu is enabled.
<template>
<JqxGrid ref="myGrid"
:width="850" :source="dataAdapter" :columns="columns" :autoheight="true"
:contextmenuenabled="true"
/>
</template>
<script setup>
import { ref } from "vue";
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.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>
|
Sets or gets whether context menu width is set.
<template>
<JqxGrid ref="myGrid"
:width="850" :source="dataAdapter" :columns="columns" :autoheight="true"
:contextmenuwidth="200"
/>
</template>
<script setup>
import { ref } from "vue";
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.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>
|
Sets or gets whether context menu height is set.
<template>
<JqxGrid ref="myGrid"
:width="850" :source="dataAdapter" :columns="columns" :autoheight="true"
:contextmenuheight="250"
/>
</template>
<script setup>
import { ref } from "vue";
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.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>
|
Sets or gets whether contextmenuitemclick is set.
<template>
<JqxGrid ref="myGrid"
:width="850" :source="dataAdapter" :columns="columns" :autoheight="true"
:contextmenuitemclick="(event, cell) => { } "
/>
</template>
<script setup>
import { ref } from "vue";
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.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>
|
|
adaptivewidth
# |
Number
|
600
|
Sets or gets the Grid's breakpoint width when adaptive mode is activated.
<template>
<JqxGrid
ref="myGrid"
:width="850"
:source="source"
:columns="columns"
:autoheight="true"
:adaptive="true"
:adaptivewidth="400"
/>
</template>
<script setup>
import { ref } from 'vue';
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.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>
|
|
commandcolumn
# |
Boolean
|
false
|
Sets or gets whether command column is enabled.
<template>
<JqxGrid ref="myGrid"
:width="850" :source="dataAdapter" :columns="columns" :autoheight="true"
:commandcolumn="true"
/>
</template>
<script setup>
import { ref } from "vue";
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.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>
|
|
commandcolumnrenderer
# |
Function
|
|
Sets a custom command column rendering function
<template>
<JqxGrid ref="myGrid"
:width="850" :source="dataAdapter" :columns="columns" :autoheight="true"
/>
</template>
<script setup>
import { ref } from "vue";
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.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>
|
|
clipboard
# |
Boolean
|
true
|
Enables or disables the clipboard operations
<template>
<JqxGrid
ref="myGrid"
:width="850"
:source="source"
:columns="columns"
:autoheight="true"
:clipboard="false"
/>
</template>
<script setup>
import { ref } from 'vue';
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.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>
|
|
closeablegroups
# |
Boolean
|
true
|
When the value of this property is true, a close button is displayed in each grouping column.
<template>
<JqxGrid
ref="myGrid"
:width="850"
:source="source"
:columns="columns"
:autoheight="true"
:groupable="true"
:groups="['City']"
:closeablegroups="false"
/>
</template>
<script setup>
import { ref } from 'vue';
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.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>
|
|
columnsmenuwidth
# |
Number
|
15
|
Sets or gets the columns menu width.
<template>
<JqxGrid
ref="myGrid"
:width="850"
:source="source"
:columns="columns"
:autoheight="true"
:filterable="true"
:autoshowcolumnsmenubutton="false"
:columnsmenuwidth="40"
/>
</template>
<script setup>
import { ref } from 'vue';
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.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>
|
|
columnmenuopening
# |
Function
|
null
|
Callback called when a column menu is opening. You can use it for changing the size of the menu or cancelling the opening. Three params are passed - menu, datafield and menu's height. If you return false, the opening will be cancelled.
<template>
<JqxGrid
ref="myGrid"
:width="850"
:source="source"
:columns="columns"
:autoheight="true"
:columnmenuopening="columnmenuopening"
:filterable="true"
/>
</template>
<script setup>
import { ref } from 'vue';
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.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 columnmenuopening(menu, datafield, height) {
alert('Menu Opening');
}
</script>
|
|
columnmenuclosing
# |
Function
|
null
|
Callback called when a column menu is opening. You can use it for changing the size of the menu or cancelling the opening. Three params are passed - menu, datafield and menu's height. If you return false, the opening will be cancelled.
<template>
<JqxGrid
ref="myGrid"
:width="850"
:source="source"
:columns="columns"
:autoheight="true"
:columnmenuclosing="columnmenuclosing"
:filterable="true"
/>
</template>
<script setup>
import { ref } from 'vue';
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.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 columnmenuclosing(menu, datafield, height) {
alert('Menu Closing');
}
</script>
|
|
cellhover
# |
Function
|
null
|
Callback called when a cell is hovered.
<template>
<JqxGrid
ref="myGrid"
:width="850"
:source="source"
:columns="columns"
:autoheight="true"
:cellhover="cellhover"
/>
</template>
<script setup>
import { ref } from 'vue';
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.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 cellhover(cellhtmlElement, x, y) {
alert('Cell Hovered!');
}
</script>
|
|
enablekeyboarddelete
# |
Boolean
|
true
|
Enables or disables the delete of a cell/row values by using the "delete" key.
<template>
<JqxGrid
ref="myGrid"
:width="850"
:source="source"
:columns="columns"
:autoheight="true"
:editable="true"
:enablekeyboarddelete="false"
/>
</template>
<script setup>
import { ref } from 'vue';
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.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>
|
|
enableellipsis
# |
Boolean
|
true
|
Determines whether ellipsis will be displayed, if the cells or columns content overflows.
<template>
<JqxGrid
ref="myGrid"
:width="850"
:source="source"
:columns="columns"
:autoheight="true"
:enableellipsis="false"
/>
</template>
<script setup>
import { ref } from 'vue';
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.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>
|
|
enablemousewheel
# |
Boolean
|
true
|
Determines whether mousewheel scrolling is enabled.
<template>
<JqxGrid
ref="myGrid"
:width="850"
:source="source"
:columns="columns"
:autoheight="false"
:height="100"
:enablemousewheel="false"
/>
</template>
<script setup>
import { ref } from 'vue';
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.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>
|
|
enableanimations
# |
Boolean
|
true
|
Enables or disables the grid animations.
<template>
<JqxGrid
ref="myGrid"
:width="850"
:source="source"
:columns="columns"
:autoheight="true"
:filterable="true"
:enableanimations="false"
/>
</template>
<script setup>
import { ref } from 'vue';
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.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>
|
|
enabletooltips
# |
Boolean
|
false
|
Enables or disables the grid tooltips.
<template>
<JqxGrid
ref="myGrid"
:width="850"
:source="source"
:columns="columns"
:autoheight="true"
:enabletooltips="true"
/>
</template>
<script setup>
import { ref } from 'vue';
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.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>
|
|
enablehover
# |
Boolean
|
true
|
Enables or disables the grid rows hover state.
<template>
<JqxGrid
ref="myGrid"
:width="850"
:source="source"
:columns="columns"
:autoheight="true"
:enablehover="false"
/>
</template>
<script setup>
import { ref } from 'vue';
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.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>
|
|
enablebrowserselection
# |
Boolean
|
false
|
Enables the text selection of the browser.
<template>
<JqxGrid
ref="myGrid"
:width="850"
:source="source"
:columns="columns"
:autoheight="true"
:enablebrowserselection="true"
/>
</template>
<script setup>
import { ref } from 'vue';
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.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>
|
|
everpresentrowposition
# |
String
|
'top'
|
Sets the position of the ever present row. Possible values: "top", "bottom", "topAboveFilterRow".
<template>
<JqxGrid
ref="myGrid"
:width="850"
:source="source"
:columns="columns"
:autoheight="true"
:showeverpresentrow="true"
:everpresentrowposition="'bottom'"
/>
</template>
<script setup>
import { ref } from 'vue';
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.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>
|
|
everpresentrowheight
# |
Number
|
30
|
Sets the height of the ever present row.
<template>
<JqxGrid
ref="myGrid"
:width="850"
:source="source"
:columns="columns"
:autoheight="true"
:showeverpresentrow="true"
:everpresentrowheight="40"
/>
</template>
<script setup>
import { ref } from 'vue';
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.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>
|
|
everpresentrowactions
# |
String
|
"add reset"
|
Sets the actions of the ever present row. Possible values: "add", "reset", "update", "delete". Instead of "add", you can also use "addBottom" which is the same as "add", but adds the new row to the bottom of the Grid.
<template>
<JqxGrid
ref="myGrid"
:width="850"
:source="source"
:columns="columns"
:autoheight="true"
:showeverpresentrow="true"
:everpresentrowactions="'add update delete reset'"
/>
</template>
<script setup>
import { ref } from 'vue';
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.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>
|
|
everpresentrowactionsmode
# |
String
|
"popup"
|
Sets the actions display mode. By default they are displayed in a popup. You can set the property to "columns" and define columns with datafields - addButtonColumn, resetButtonColumn, updateButtonColumn and deleteButtonColumn to display the actions in columns.
<template>
<JqxGrid
ref="myGrid"
:width="850"
:source="source"
:columns="columns"
:autoheight="true"
:showeverpresentrow="true"
:everpresentrowactionsmode="'columns'"
/>
</template>
<script setup>
import { ref } from 'vue';
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.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' },
{ datafield: 'addButtonColumn', width: 50 },
{ datafield: 'resetButtonColumn', width: 50 }
]);
</script>
|
|
filterrowheight
# |
Number
|
36
|
Sets or gets the filter row's height.
<template>
<JqxGrid
ref="myGrid"
:width="850"
:source="source"
:columns="columns"
:autoheight="true"
:filterable="true"
:showfilterrow="true"
:filterrowheight="40"
/>
</template>
<script setup>
import { ref } from 'vue';
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.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>
|
|
filtermode
# |
String
|
"default"
|
The property specifies the type of rendering of the Filter Menu. Possible values: "default" and "excel". In "excel" mode, the Filter Menu displays a ListBox with Checkboxes with all unique cell values.
<template>
<JqxGrid
ref="myGrid"
:width="850"
:source="source"
:columns="columns"
:autoheight="true"
:filterable="true"
:filtermode="'excel'"
/>
</template>
<script setup>
import { ref } from 'vue';
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.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>
|
|
groupsrenderer
# |
Function
|
null
|
This function is called when a group is rendered. You can use it to customize the default group rendering.
<template>
<JqxGrid
ref="myGrid"
:width="850"
:source="source"
:columns="columns"
:autoheight="true"
:groupsrenderer="groupsrenderer"
:groupable="true"
:groups="['City']"
/>
</template>
<script setup>
import { ref } from 'vue';
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.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(text, group, expanded) {
return 'City: ' + group;
}
</script>
|
|
groupcolumnrenderer
# |
Function
|
null
|
Sets or gets a custom renderer for the grouping columns displayed in the grouping header when the grouping feature is enabled.
<template>
<JqxGrid
ref="myGrid"
:width="850"
:source="source"
:columns="columns"
:autoheight="true"
:groupcolumnrenderer="groupcolumnrenderer"
:groupable="true"
:groups="['City']"
/>
</template>
<script setup>
import { ref } from 'vue';
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.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 groupcolumnrenderer(text) {
return 'Grouped By: ' + text;
}
</script>
|
|
groupsexpandedbydefault
# |
Boolean
|
false
|
Sets or gets the default state of the grouped rows.
<template>
<JqxGrid
ref="myGrid"
:width="850"
:source="source"
:columns="columns"
:autoheight="true"
:groupable="true"
:groups="['ContactName']"
:groupsexpandedbydefault="true"
/>
</template>
<script setup>
import { ref } from 'vue';
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.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>
|
|
handlekeyboardnavigation
# |
Function
|
null
|
The function is called when a key is pressed. If the result of the function is true, the default keyboard navigation will be overridden for the pressed key.
<template>
<JqxGrid
ref="myGrid"
:width="850"
:source="source"
:columns="columns"
:autoheight="true"
:handlekeyboardnavigation="handlekeyboardnavigation"
/>
</template>
<script setup>
import { ref } from 'vue';
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.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 handlekeyboardnavigation() {
const key = event.charCode ? event.charCode : event.keyCode ? event.keyCode : 0;
alert(key);
}
</script>
|
The function is called when the Grid Pager is rendered. This allows you to customize the default rendering of the pager.
<template>
<JqxGrid
ref="myGrid"
:width="850"
:source="source"
:columns="columns"
:autoheight="true"
:pagerrenderer="pagerrenderer"
:pageable="true"
/>
</template>
<script setup>
import { ref } from 'vue';
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.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() {
const element = document.createElement('div');
element.innerHTML = 'Custom Render of the JqxGrid Pager!';
return element;
}
</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>
<JqxGrid
ref="myGrid"
:width="850"
:source="source"
:columns="columns"
:autoheight="true"
:rtl="true"
/>
</template>
<script setup>
import { ref } from 'vue';
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.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>
|
|
showdefaultloadelement
# |
Boolean
|
true
|
Determines whether the Grid should display the built-in loading element or should use a DIV tag with class 'jqx-grid-load'
<template>
<JqxGrid
ref="myGrid"
:width="850"
:source="source"
:columns="columns"
:autoheight="true"
:showdefaultloadelement="false"
/>
</template>
<script setup>
import { ref } from 'vue';
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.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>
|
|
showfiltercolumnbackground
# |
Boolean
|
true
|
When this property is true, the Grid adds an additional visual style to the grid cells in the filter column(s).
<template>
<JqxGrid
ref="myGrid"
:width="850"
:source="source"
:columns="columns"
:autoheight="true"
:filterable="true"
:showfiltercolumnbackground="false"
/>
</template>
<script setup>
import { ref } from 'vue';
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.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>
|
Determines whether to display the filtering items in the column's menu.
<template>
<JqxGrid
ref="myGrid"
:width="850"
:source="source"
:columns="columns"
:autoheight="true"
:filterable="true"
:showfiltermenuitems="false"
/>
</template>
<script setup>
import { ref } from 'vue';
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.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>
|
|
showpinnedcolumnbackground
# |
Boolean
|
true
|
When this property is true, the Grid adds an additional visual style to the grid cells in the pinned column(s).
<template>
<JqxGrid
ref="myGrid"
:width="500"
:source="source"
:columns="columns"
:autoheight="true"
:showpinnedcolumnbackground="false"
/>
</template>
<script setup>
import { ref } from 'vue';
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.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([
{ pinned: 'true', text: 'Contact Name', datafield: 'ContactName', width: 150 },
{ text: 'Contact Title', datafield: 'Title', width: 150 },
{ text: 'City', datafield: 'City', width: 150 },
{ text: 'Country', datafield: 'Country', width: 150 },
{ text: 'Country1', width: 150 },
{ text: 'Country2', width: 150 },
{ text: 'Country3', width: 150 },
{ text: 'Country4', width: 150 },
{ text: 'Country5', width: 150 }
]);
</script>
|
|
showsortcolumnbackground
# |
Boolean
|
true
|
When this property is true, the Grid adds an additional visual style to the grid cells in the sort column.
<template>
<JqxGrid
ref="myGrid"
:width="850"
:source="source"
:columns="columns"
:autoheight="true"
:sortable="true"
:showsortcolumnbackground="false"
/>
</template>
<script setup>
import { ref } from 'vue';
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.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>
|
Determines whether to display the sort menu items.
<template>
<JqxGrid
ref="myGrid"
:width="850"
:source="source"
:columns="columns"
:autoheight="true"
:sortable="true"
:showsortmenuitems="false"
/>
</template>
<script setup>
import { ref } from 'vue';
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.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>
|
Determines whether to display the group menu items.
<template>
<JqxGrid
ref="myGrid"
:width="850"
:source="source"
:columns="columns"
:autoheight="true"
:groupable="true"
:showgroupmenuitems="false"
/>
</template>
<script setup>
import { ref } from 'vue';
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.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>
|
|
showrowdetailscolumn
# |
Boolean
|
true
|
Shows an additional column with expand/collapse toggle buttons when the Row details feature is enabled.
<template>
<JqxGrid
ref="myGrid"
:width="850"
:source="source"
:columns="columns"
:autoheight="true"
:rowdetails="true"
:showrowdetailscolumn="false"
/>
</template>
<script setup>
import { ref } from 'vue';
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.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>
|
Shows or hides the columns header.
<template>
<JqxGrid
ref="myGrid"
:width="850"
:source="source"
:columns="columns"
:autoheight="true"
:showheader="false"
/>
</template>
<script setup>
import { ref } from 'vue';
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.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>
|
Shows or hides the groups header area.
<template>
<JqxGrid
ref="myGrid"
:width="850"
:source="source"
:columns="columns"
:autoheight="true"
:groupable="true"
:showgroupsheader="false"
/>
</template>
<script setup>
import { ref } from 'vue';
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.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>
|
|
showaggregates
# |
Boolean
|
false
|
Shows or hides the aggregates in the grid's statusbar.
<template>
<JqxGrid
ref="myGrid"
:width="850"
:source="source"
:columns="columns"
:autoheight="true"
:showaggregates="true"
:showstatusbar="true"
:statusbarheight="50"
/>
</template>
<script setup>
import { ref } from 'vue';
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.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',
aggregates: [
'count',
{
Owners: function (aggregatedValue, currentValue) {
if (currentValue == 'Owner') {
return aggregatedValue + 1;
}
return aggregatedValue;
}
}
]
},
{ text: 'City', datafield: 'City' },
{ text: 'Country', datafield: 'Country', aggregates: ['count'] }
]);
</script>
|
|
showgroupaggregates
# |
Boolean
|
false
|
Shows or hides the aggregates in Grid groups.
<template>
<JqxGrid
ref="myGrid"
:width="850"
:source="source"
:columns="columns"
:autoheight="true"
:groupable="true"
:showaggregates="true"
:showgroupaggregates="true"
:showstatusbar="true"
:statusbarheight="50"
/>
</template>
<script setup>
import { ref } from 'vue';
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.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',
aggregates: [
'count',
{
Owners: function (aggregatedValue, currentValue) {
if (currentValue == 'Owner') {
return aggregatedValue + 1;
}
return aggregatedValue;
}
}
]
},
{ text: 'City', datafield: 'City' },
{ text: 'Country', datafield: 'Country', aggregates: ['count'] }
]);
</script>
|
|
showeverpresentrow
# |
Boolean
|
false
|
Shows or hides an additional row in jqxGrid which allows you to easily add new rows.
<template>
<JqxGrid
ref="myGrid"
:width="850"
:source="source"
:columns="columns"
:autoheight="true"
:showeverpresentrow="true"
/>
</template>
<script setup>
import { ref } from 'vue';
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.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>
|
|
showfilterrow
# |
Boolean
|
false
|
Shows or hides the filter row.
<template>
<JqxGrid
ref="myGrid"
:width="850"
:source="source"
:columns="columns"
:autoheight="true"
:filterable="true"
:showfilterrow="true"
/>
</template>
<script setup>
import { ref } from 'vue';
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.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>
|
|
showemptyrow
# |
Boolean
|
true
|
Shows or hides the empty row label when the Grid has no records to display.
<template>
<JqxGrid
ref="myGrid"
:width="850"
:columns="columns"
:autoheight="true"
:showemptyrow="false"
/>
</template>
<script setup>
import { ref } from 'vue';
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.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 columns = ref([
{ text: 'Contact Name', datafield: 'ContactName' },
{ text: 'Contact Title', datafield: 'Title' },
{ text: 'City', datafield: 'City' },
{ text: 'Country', datafield: 'Country' }
]);
</script>
|
|
showstatusbar
# |
Boolean
|
false
|
Shows or hides the grid's statusbar.
<template>
<JqxGrid
ref="myGrid"
:width="850"
:source="source"
:columns="columns"
:autoheight="true"
:showstatusbar="true"
/>
</template>
<script setup>
import { ref } from 'vue';
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.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>
|
|
statusbarheight
# |
Number
|
34
|
Sets the statusbar's height.
<template>
<JqxGrid
ref="myGrid"
:width="850"
:source="source"
:columns="columns"
:autoheight="true"
:showstatusbar="true"
:statusbarheight="50"
/>
</template>
<script setup>
import { ref } from 'vue';
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.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>
|
|
showtoolbar
# |
Boolean
|
false
|
Shows or hides the grid's toolbar.
<template>
<JqxGrid
ref="myGrid"
:width="850"
:source="source"
:columns="columns"
:autoheight="true"
:showtoolbar="true"
/>
</template>
<script setup>
import { ref } from 'vue';
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.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>
|
|
showfilterbar
# |
Boolean
|
false
|
Shows or hides the grid's filter bar.
<template>
<JqxGrid ref="myGrid"
:width="850" :source="dataAdapter" :columns="columns" :autoheight="true"
:showfilterbar="true"
/>
</template>
<script setup>
import { ref } from "vue";
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.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>
|
|
filterbarmode
# |
String
|
default
|
<template>
<JqxGrid ref="myGrid"
:width="850" :source="dataAdapter" :columns="columns" :autoheight="true"
/>
</template>
<script setup>
import { ref } from "vue";
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.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>
|
|
selectionmode
# |
String
|
'singlerow'
|
Sets or gets the selection mode.
Possible Values:
'none'-disables the selection
'singlerow'- full row selection
'multiplerows' - each click selects a new row. Click on a selected row unselects it
'multiplerowsextended' - multiple rows selection with drag and drop. The selection behavior resembles the selection of icons on your desktop
'singlecell' - single cell selection
'multiplecells' - each click selects a new cell. Click on a selected cell unselects it
'multiplecellsextended' - in this mode, users can select multiple cells with a drag and drop. The selection behavior resembles the selection of icons on your desktop
'multiplecellsadvanced' - this mode is the most advanced cells selection mode. In this mode, users can select multiple cells with a drag and drop. The selection behavior resembles the selection of cells in a spreadsheet
'checkbox' - multiple rows selection through a checkbox.
<template>
<JqxGrid
ref="myGrid"
:width="850"
:source="source"
:columns="columns"
:autoheight="true"
:selectionmode="'multiplerows'"
/>
</template>
<script setup>
import { ref } from 'vue';
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.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>
|
|
updatefilterconditions
# |
Function
|
null
|
<template>
<JqxGrid
ref="myGrid"
:width="800"
:source="source"
:autoheight="true"
:columns="columns"
:filterable="true"
:autoshowfiltericon="true"
:ready="ready"
:updatefilterconditions="updatefilterconditions"
:updatefilterpanel="updatefilterpanel"
>
</JqxGrid>
</template>
<script setup>
import { ref } from 'vue';
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.vue';
const myGrid = 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 addfilter() {
let filtergroup = new jqx.filter();
let filter_or_operator = 1;
let filtervalue = 'Beate';
let filtercondition = 'contains';
let filter1 = filtergroup.createfilter('stringfilter', filtervalue, filtercondition);
filtervalue = 'Andrew';
filtercondition = 'contains';
let filter2 = filtergroup.createfilter('stringfilter', filtervalue, filtercondition);
filtergroup.addfilter(filter_or_operator, filter1);
filtergroup.addfilter(filter_or_operator, filter2);
// add the filters.
myGrid.value.addfilter('firstname', filtergroup);
// apply the filters.
myGrid.value.applyfilters();
}
function updatefilterconditions(type, defaultconditions) {
let stringcomparisonoperators = ['CONTAINS', 'DOES_NOT_CONTAIN'];
let numericcomparisonoperators = ['LESS_THAN', 'GREATER_THAN'];
let datecomparisonoperators = ['LESS_THAN', 'GREATER_THAN'];
let booleancomparisonoperators = ['EQUAL', 'NOT_EQUAL'];
switch (type) {
case 'stringfilter':
return stringcomparisonoperators;
case 'numericfilter':
return numericcomparisonoperators;
case 'datefilter':
return datecomparisonoperators;
case 'booleanfilter':
return booleancomparisonoperators;
}
}
function updatefilterpanel(
filtertypedropdown1,
filtertypedropdown2,
filteroperatordropdown,
filterinputfield1,
filterinputfield2,
filterbutton,
clearbutton,
columnfilter,
filtertype,
filterconditions
) {
let index1 = 0;
let index2 = 0;
if (columnfilter != null) {
let filter1 = columnfilter.getfilterat(0);
let filter2 = columnfilter.getfilterat(1);
if (filter1) {
index1 = filterconditions.indexOf(filter1.comparisonoperator);
let value1 = filter1.filtervalue;
filterinputfield1.val(value1);
}
if (filter2) {
index2 = filterconditions.indexOf(filter2.comparisonoperator);
let value2 = filter2.filtervalue;
filterinputfield2.val(value2);
}
}
filtertypedropdown1.jqxDropDownList({ autoDropDownHeight: true, selectedIndex: index1 });
filtertypedropdown2.jqxDropDownList({ autoDropDownHeight: true, selectedIndex: index2 });
}
function ready() {
this.addfilter();
let localizationObject = {
filterstringcomparisonoperators: ['contains', 'does not contain'],
// filter numeric comparison operators.
filternumericcomparisonoperators: ['less than', 'greater than'],
// filter date comparison operators.
filterdatecomparisonoperators: ['less than', 'greater than'],
// filter bool comparison operators.
filterbooleancomparisonoperators: ['equal', 'not equal']
};
myGrid.value.localizestrings(localizationObject);
}
</script>
|
|
updatefilterpanel
# |
Function
|
null
|
<template>
<JqxGrid
ref="myGrid"
:width="800"
:source="source"
:autoheight="true"
:columns="columns"
:filterable="true"
:autoshowfiltericon="true"
:ready="ready"
:updatefilterconditions="updatefilterconditions"
:updatefilterpanel="updatefilterpanel"
>
</JqxGrid>
</template>
<script setup>
import { ref } from 'vue';
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.vue';
const myGrid = 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 addfilter() {
let filtergroup = new jqx.filter();
let filter_or_operator = 1;
let filtervalue = 'Beate';
let filtercondition = 'contains';
let filter1 = filtergroup.createfilter('stringfilter', filtervalue, filtercondition);
filtervalue = 'Andrew';
filtercondition = 'contains';
let filter2 = filtergroup.createfilter('stringfilter', filtervalue, filtercondition);
filtergroup.addfilter(filter_or_operator, filter1);
filtergroup.addfilter(filter_or_operator, filter2);
// add the filters.
myGrid.value.addfilter('firstname', filtergroup);
// apply the filters.
myGrid.value.applyfilters();
}
function updatefilterconditions(type, defaultconditions) {
let stringcomparisonoperators = ['CONTAINS', 'DOES_NOT_CONTAIN'];
let numericcomparisonoperators = ['LESS_THAN', 'GREATER_THAN'];
let datecomparisonoperators = ['LESS_THAN', 'GREATER_THAN'];
let booleancomparisonoperators = ['EQUAL', 'NOT_EQUAL'];
switch (type) {
case 'stringfilter':
return stringcomparisonoperators;
case 'numericfilter':
return numericcomparisonoperators;
case 'datefilter':
return datecomparisonoperators;
case 'booleanfilter':
return booleancomparisonoperators;
}
}
function updatefilterpanel(
filtertypedropdown1,
filtertypedropdown2,
filteroperatordropdown,
filterinputfield1,
filterinputfield2,
filterbutton,
clearbutton,
columnfilter,
filtertype,
filterconditions
) {
let index1 = 0;
let index2 = 0;
if (columnfilter != null) {
let filter1 = columnfilter.getfilterat(0);
let filter2 = columnfilter.getfilterat(1);
if (filter1) {
index1 = filterconditions.indexOf(filter1.comparisonoperator);
let value1 = filter1.filtervalue;
filterinputfield1.val(value1);
}
if (filter2) {
index2 = filterconditions.indexOf(filter2.comparisonoperator);
let value2 = filter2.filtervalue;
filterinputfield2.val(value2);
}
}
filtertypedropdown1.jqxDropDownList({ autoDropDownHeight: true, selectedIndex: index1 });
filtertypedropdown2.jqxDropDownList({ autoDropDownHeight: true, selectedIndex: index2 });
}
function ready() {
this.addfilter();
let localizationObject = {
filterstringcomparisonoperators: ['contains', 'does not contain'],
// filter numeric comparison operators.
filternumericcomparisonoperators: ['less than', 'greater than'],
// filter date comparison operators.
filterdatecomparisonoperators: ['less than', 'greater than'],
// filter bool comparison operators.
filterbooleancomparisonoperators: ['equal', 'not equal']
};
myGrid.value.localizestrings(localizationObject);
}
</script>
|
|
theme
# |
String
|
''
|
Sets the widget's theme.
<template>
<JqxGrid
ref="myGrid"
:width="850"
:source="source"
:columns="columns"
:autoheight="true"
:theme="'material'"
/>
</template>
<script setup>
import { ref } from 'vue';
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.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 toolbar's height.
<template>
<JqxGrid
ref="myGrid"
:width="850"
:source="source"
:columns="columns"
:autoheight="true"
:showtoolbar="true"
:toolbarheight="40"
/>
</template>
<script setup>
import { ref } from 'vue';
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.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>
|
|
autoheight
# |
Boolean
|
false
|
Sets or gets the height of the grid to be equal to the summary height of the grid rows. This option should be set when the Grid is in paging mode.
<template>
<JqxGrid ref="myGrid" :width="850" :source="source" :columns="columns" :autoheight="true" />
</template>
<script setup>
import { ref } from 'vue';
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.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>
|
|
autorowheight
# |
Boolean
|
false
|
This property works along with the "autoheight" property. When it is set to true, the height of the Grid rows is dynamically changed depending on the cell values.
<template>
<JqxGrid
ref="myGrid"
:width="850"
:source="source"
:columns="columns"
:autoheight="true"
:autorowheight="true"
/>
</template>
<script setup>
import { ref } from 'vue';
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.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>
|
|
columnsheight
# |
Number
|
32
|
Sets or gets the columns height.
<template>
<JqxGrid
ref="myGrid"
:width="850"
:source="source"
:columns="columns"
:autoheight="true"
:columnsheight="40"
/>
</template>
<script setup>
import { ref } from 'vue';
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.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>
|
|
deferreddatafields
# |
Array
|
[]
|
Determines the cell values displayed in a tooltip next to the scrollbar when the "scrollmode" is set to "deferred".
<template>
<JqxGrid
ref="myGrid"
:width="850"
:source="source"
:columns="columns"
:autoheight="false"
:height="100"
:scrollmode="'deferred'"
:deferreddatafields="['ContactName']"
/>
</template>
<script setup>
import { ref } from 'vue';
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.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>
|
Sets or gets the height of the Grid Groups Header.
<template>
<JqxGrid
ref="myGrid"
:width="850"
:source="source"
:columns="columns"
:autoheight="true"
:groupable="true"
:groupsheaderheight="60"
/>
</template>
<script setup>
import { ref } from 'vue';
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.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>
|
|
groupindentwidth
# |
Number
|
20
|
Sets or gets the group indent size. This size is used when the grid is grouped. This is the size of the columns with expand/collapse toggle buttons.
<template>
<JqxGrid
ref="myGrid"
:width="850"
:source="source"
:columns="columns"
:autoheight="true"
:groupable="true"
:groupindentwidth="40"
/>
</template>
<script setup>
import { ref } from 'vue';
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.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>
|
|
height
# |
String | Number
|
400
|
Sets or gets the Grid's height.
<template>
<JqxGrid
ref="myGrid"
:width="850"
:source="source"
:columns="columns"
:autoheight="false"
:height="500"
/>
</template>
<script setup>
import { ref } from 'vue';
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.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>
|
Sets or gets the height of the Grid Pager.
<template>
<JqxGrid
ref="myGrid"
:width="850"
:source="source"
:columns="columns"
:autoheight="true"
:pageable="true"
:pagerheight="50"
/>
</template>
<script setup>
import { ref } from 'vue';
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.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>
|
|
rowsheight
# |
Number
|
32
|
Sets or gets the height of the grid rows.
<template>
<JqxGrid
ref="myGrid"
:width="850"
:source="source"
:columns="columns"
:autoheight="true"
:rowsheight="30"
/>
</template>
<script setup>
import { ref } from 'vue';
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.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>
|
|
scrollbarsize
# |
Number
|
15
|
Sets or gets the scrollbars size.
<template>
<JqxGrid
ref="myGrid"
:width="850"
:source="source"
:columns="columns"
:autoheight="false"
:height="100"
:scrollbarsize="20"
/>
</template>
<script setup>
import { ref } from 'vue';
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.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>
|
|
scrollmode
# |
String
|
"default"
|
Determines the scrolling mode.
Possible Values:
'default'
'logical'- the movement of the scrollbar thumb is by row, not by pixel
'deferred'-content is stationary when the user drags the Thumb of a ScrollBar
<template>
<JqxGrid
ref="myGrid"
:width="850"
:source="source"
:columns="columns"
:autoheight="false"
:height="100"
:scrollmode="'logical'"
/>
</template>
<script setup>
import { ref } from 'vue';
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.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>
|
|
scrollfeedback
# |
Function
|
null
|
When the "scrollmode" is set to "deferred", the "scrollfeedback" function may be used to display custom UI Tooltip next to the scrollbar.
<template>
<JqxGrid
ref="myGrid"
:width="850"
:source="source"
:columns="columns"
:autoheight="false"
:height="100"
:scrollmode="'deferred'"
:scrollfeedback="scrollfeedback"
/>
</template>
<script setup>
import { ref } from 'vue';
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.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 scrollfeedback(row) {
return 'row ' + row.uid;
}
</script>
|
|
width
# |
String | Number
|
600
|
Sets or gets the Grid's width.
<template>
<JqxGrid ref="myGrid" :width="850" :source="source" :columns="columns" :autoheight="true" />
</template>
<script setup>
import { ref } from 'vue';
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.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>
|
|
autosavestate
# |
Boolean
|
false
|
Determines whether the Grid automatically saves its current state.
<template>
<JqxGrid
ref="myGrid"
:width="850"
:source="source"
:columns="columns"
:autoheight="true"
:autoloadstate="true"
:autosavestate="true"
/>
</template>
<script setup>
import { ref } from 'vue';
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.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>
|
|
autoloadstate
# |
Boolean
|
false
|
Determines whether the Grid automatically loads its current state(if there's already saved one). The Grid's state is loaded when the page is refreshed.
<template>
<JqxGrid
ref="myGrid"
:width="850"
:source="source"
:columns="columns"
:autoheight="true"
:autoloadstate="true"
:autosavestate="true"
/>
</template>
<script setup>
import { ref } from 'vue';
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.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>
|
|
columns
# |
Array
|
[]
|
Sets the Grid columns.
<template>
<JqxGrid ref="myGrid" :width="850" :source="source" :columns="columns" :autoheight="true" />
</template>
<script setup>
import { ref } from 'vue';
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.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>
|
|
enableSanitize
# |
Boolean
|
false
|
<template>
<JqxGrid ref="myGrid"
:width="850" :source="dataAdapter" :columns="columns" :autoheight="true"
/>
</template>
<script setup>
import { ref } from "vue";
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.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>
|
|
cardview
# |
Boolean
|
false
|
<template>
<JqxGrid ref="myGrid"
:width="850" :source="dataAdapter" :columns="columns" :autoheight="true"
/>
</template>
<script setup>
import { ref } from "vue";
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.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>
|
|
cardviewcolumns
# |
[]
|
[]
|
<template>
<JqxGrid ref="myGrid"
:width="850" :source="dataAdapter" :columns="columns" :autoheight="true"
/>
</template>
<script setup>
import { ref } from "vue";
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.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>
|
|
cardheight
# |
Number
|
250
|
<template>
<JqxGrid ref="myGrid"
:width="850" :source="dataAdapter" :columns="columns" :autoheight="true"
/>
</template>
<script setup>
import { ref } from "vue";
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.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>
|
|
cardsize
# |
Number
|
3
|
<template>
<JqxGrid ref="myGrid"
:width="850" :source="dataAdapter" :columns="columns" :autoheight="true"
/>
</template>
<script setup>
import { ref } from "vue";
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.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>
|
|
columngroups
# |
Array
|
[]
|
- parentgroup - sets the column header's parent group name.
- name - sets the column header's name.
- align - sets the column header's alignment to 'left', 'center' or 'right'.
<template>
<JqxGrid
ref="myGrid"
:width="850"
:source="source"
:columns="columns"
:autoheight="true"
:columngroups="columngroups"
/>
</template>
<script setup>
import { ref } from 'vue';
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.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', columngroup: 'ContactInfo' },
{ text: 'Contact Title', datafield: 'Title', columngroup: 'ContactInfo' },
{ text: 'City', datafield: 'City' },
{ text: 'Country', datafield: 'Country' }
]);
const columngroups = ref([{ text: 'Contact Info', name: 'ContactInfo', align: 'center' }]);
</script>
|
|
columnsmenu
# |
Boolean
|
true
|
Enables or disables the columns dropdown menu.
<template>
<JqxGrid
ref="myGrid"
:width="850"
:source="source"
:columns="columns"
:autoheight="true"
:sortable="true"
:columnsmenu="false"
/>
</template>
<script setup>
import { ref } from 'vue';
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.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>
|
|
columnsresize
# |
Boolean
|
false
|
Enables or disables the columns resizing.
<template>
<JqxGrid
ref="myGrid"
:width="850"
:source="source"
:columns="columns"
:autoheight="true"
:columnsresize="true"
/>
</template>
<script setup>
import { ref } from 'vue';
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.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>
|
|
columnsautoresize
# |
Boolean
|
true
|
Enables or disables the columns resizing when the column's border is double-clicked and columnsresize is set to true.
<template>
<JqxGrid
ref="myGrid"
:width="850"
:source="source"
:columns="columns"
:autoheight="true"
:columnsresize="true"
:columnsautoresize="false"
/>
</template>
<script setup>
import { ref } from 'vue';
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.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>
|
|
columnsreorder
# |
Boolean
|
false
|
Enables or disables the columns reordering.
<template>
<JqxGrid
ref="myGrid"
:width="850"
:source="source"
:columns="columns"
:autoheight="true"
:columnsreorder="true"
/>
</template>
<script setup>
import { ref } from 'vue';
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.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>
|
|
charting
# |
Object
|
null
|
Data visualization of Grid Data in a Chart.
<template>
<JqxGrid ref="myGrid"
:width="850" :source="dataAdapter" :columns="columns" :autoheight="true"
/>
</template>
<script setup>
import { ref } from "vue";
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.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>
|
|
disabled
# |
Boolean
|
false
|
Enables or disables the Grid's plugin.
<template>
<JqxGrid
ref="myGrid"
:width="850"
:source="source"
:columns="columns"
:autoheight="true"
:disabled="true"
/>
</template>
<script setup>
import { ref } from 'vue';
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.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>
|
|
editable
# |
Boolean
|
false
|
The editable property enables or disables the Grid editing feature.
<template>
<JqxGrid
ref="myGrid"
:width="850"
:source="source"
:columns="columns"
:autoheight="true"
:editable="true"
/>
</template>
<script setup>
import { ref } from 'vue';
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.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>
|
|
batcheditable
# |
Boolean
|
false
|
The batcheditable property enables or disables the Grid batch editing feature. It works in combination with the editable property.
<template>
<JqxGrid ref="myGrid"
:width="850" :source="dataAdapter" :columns="columns" :autoheight="true"
:editable="true"
/>
</template>
<script setup>
import { ref } from "vue";
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.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>
|
|
editmode
# |
String
|
'selectedcell'
|
The editmode property specifies the action that the end-user should make to open an editor.
Possible Values:
'click' - Marks the clicked cell as selected and shows the editor. The editor’s value is equal to the cell’s value
'selectedcell' - Marks the cell as selected. A second click on the selected cell shows the editor. The editor’s value is equal to the cell’s value
'selectedrow' - A second click on a selected row shows the row editors.
'dblclick' - Marks the clicked cell as selected and shows the editor. The editor’s value is equal to the cell’s value
'programmatic' - Cell editors are activated and deactivated only through the API(see begincelledit and endcelledit methods)
<template>
<JqxGrid
ref="myGrid"
:width="850"
:source="source"
:columns="columns"
:autoheight="true"
:editable="true"
:editmode="'dblclick'"
/>
</template>
<script setup>
import { ref } from 'vue';
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.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>
|
|
filter
# |
Function
|
null
|
Custom Filtering function. It overrides the built-in Filtering. When the user filters, the Grid calls this function, when it is implemented. The function is expected to return a boolean value or undefined.
- cellValue - current cell's value.
- rowData - JSON object which contains the current row's data.
- dataField - filter column's field.
- filterGroup - group of filters.
- defaultFilterResult - the default filter result.
<template>
<JqxGrid
ref="myGrid"
:width="850"
:source="source"
:columns="columns"
:autoheight="true"
:filterable="true"
:filter="filter"
/>
</template>
<script setup>
import { ref } from 'vue';
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.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 filter(cellValue, rowData, dataField, filterGroup, defaultFilterResult) {
// implements a custom filter for the "Contactname" field.
if (dataField === 'ContactName') {
var filters = filterGroup.getfilters();
for (var i = 0; i < filters.length; i++) {
var filter = filters[i];
var filterValue = filter.value;
var filterCondition = filter.condition;
var filterType = filter.type;
if (cellValue.indexOf('Ana') >= 0) {
return true;
}
}
return false;
}
}
</script>
|
|
filterable
# |
Boolean
|
false
|
Enables or disables the Grid Filtering feature. When the value of this property is true, the Grid displays a filtering panel in the columns popup menus.
<template>
<JqxGrid
ref="myGrid"
:width="850"
:source="source"
:columns="columns"
:autoheight="true"
:filterable="true"
/>
</template>
<script setup>
import { ref } from 'vue';
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.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>
|
|
filternlpinput
# |
String
|
|
<template>
<JqxGrid ref="myGrid"
:width="850" :source="dataAdapter" :columns="columns" :autoheight="true"
/>
</template>
<script setup>
import { ref } from "vue";
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.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>
|
|
aiKey
# |
String
|
|
<template>
<JqxGrid ref="myGrid"
:width="850" :source="dataAdapter" :columns="columns" :autoheight="true"
/>
</template>
<script setup>
import { ref } from "vue";
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.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>
|
|
aiUrl
# |
String
|
|
<template>
<JqxGrid ref="myGrid"
:width="850" :source="dataAdapter" :columns="columns" :autoheight="true"
/>
</template>
<script setup>
import { ref } from "vue";
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.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>
|
|
aiProvider
# |
String
|
anthropic
|
<template>
<JqxGrid ref="myGrid"
:width="850" :source="dataAdapter" :columns="columns" :autoheight="true"
/>
</template>
<script setup>
import { ref } from "vue";
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.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>
|
|
aiModel
# |
String
|
null
|
<template>
<JqxGrid ref="myGrid"
:width="850" :source="dataAdapter" :columns="columns" :autoheight="true"
/>
</template>
<script setup>
import { ref } from "vue";
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.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>
|
|
aiProxyUrl
# |
String
|
null
|
<template>
<JqxGrid ref="myGrid"
:width="850" :source="dataAdapter" :columns="columns" :autoheight="true"
/>
</template>
<script setup>
import { ref } from "vue";
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.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>
|
<template>
<JqxGrid ref="myGrid"
:width="850" :source="dataAdapter" :columns="columns" :autoheight="true"
/>
</template>
<script setup>
import { ref } from "vue";
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.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>
|
|
aiSendRequest
# |
Any
|
null
|
<template>
<JqxGrid ref="myGrid"
:width="850" :source="dataAdapter" :columns="columns" :autoheight="true"
/>
</template>
<script setup>
import { ref } from "vue";
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.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>
|
|
aiMaxRows
# |
Number
|
40
|
<template>
<JqxGrid ref="myGrid"
:width="850" :source="dataAdapter" :columns="columns" :autoheight="true"
/>
</template>
<script setup>
import { ref } from "vue";
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.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>
|
|
groupable
# |
Boolean
|
false
|
This property enables or disables the grouping feature.
<template>
<JqxGrid
ref="myGrid"
:width="850"
:source="source"
:columns="columns"
:autoheight="true"
:groupable="true"
:groups="['ContactName']"
/>
</template>
<script setup>
import { ref } from 'vue';
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.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>
|
|
groups
# |
Array
|
[]
|
Sets or gets the Grid groups when the Grouping feature is enabled.
<template>
<JqxGrid
ref="myGrid"
:width="850"
:source="source"
:columns="columns"
:autoheight="true"
:groupable="true"
:groups="['ContactName']"
/>
</template>
<script setup>
import { ref } from 'vue';
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.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>
|
|
horizontalscrollbarstep
# |
Number
|
5
|
Sets or gets the scrollbar's step when the user clicks the scroll arrows.
<template>
<JqxGrid
ref="myGrid"
:width="400"
:source="source"
:columns="columns"
:autoheight="true"
:horizontalscrollbarstep="200"
/>
</template>
<script setup>
import { ref } from 'vue';
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.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', width: '100' },
{ text: 'Contact Title', datafield: 'Title', width: '100' },
{ text: 'City', datafield: 'City', width: '100' },
{ text: 'Country', datafield: 'Country', width: '100' },
{ text: 'Column5', width: '100' },
{ text: 'Column6', width: '100' },
{ text: 'Column7', width: '100' },
{ text: 'Column8', width: '100' },
{ text: 'Column9', width: '100' },
{ text: 'Column10', width: '100' }
]);
</script>
|
|
horizontalscrollbarlargestep
# |
Number
|
50
|
Sets or gets the scrollbar's large step. This property specifies the step with which the horizontal scrollbar's value is changed when the user clicks the area above or below the thumb.
<template>
<JqxGrid
ref="myGrid"
:width="400"
:source="source"
:columns="columns"
:autoheight="true"
:horizontalscrollbarlargestep="600"
/>
</template>
<script setup>
import { ref } from 'vue';
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.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', width: '100' },
{ text: 'Contact Title', datafield: 'Title', width: '100' },
{ text: 'City', datafield: 'City', width: '100' },
{ text: 'Country', datafield: 'Country', width: '100' },
{ text: 'Column5', width: '100' },
{ text: 'Column6', width: '100' },
{ text: 'Column7', width: '100' },
{ text: 'Column8', width: '100' },
{ text: 'Column9', width: '100' },
{ text: 'Column10', width: '100' }
]);
</script>
|
|
initrowdetails
# |
Function
|
null
|
This function is called when the user expands the row details and the details are going to be rendered.
<template>
<JqxGrid
ref="myGrid"
:width="850"
:source="source"
:columns="columns"
:autoheight="true"
:rowdetails="true"
:initrowdetails="initrowdetails"
:rowdetailstemplate="rowdetailstemplate"
/>
</template>
<script setup>
import { ref } from 'vue';
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.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' }
]);
const rowdetailstemplate = ref({
rowdetails: "<div style='margin: 10px;'>Row Details</div>",
rowdetailsheight: 50
});
function initrowdetails(index, parentElement, gridElement, datarecord) {
var details = $($(parentElement).children()[0]);
details.html('Details: ' + index);
}
</script>
|
|
disablerowdetails
# |
Function
|
null
|
This function is called when the user wants to disable the row details for particular rows
<template>
<JqxGrid ref="myGrid"
:width="850" :source="source" :columns="columns" :autoheight="true"
:rowdetails="true" :initrowdetails="initrowdetails" :rowdetailstemplate="rowdetailstemplate" />
</template>
<script setup>
import { ref } from "vue";
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.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'
}]);
const rowdetailstemplate = ref({
rowdetails: "<div style='margin: 10px;'>Row Details</div>",
rowdetailsheight: 50
});
function initrowdetails(index, parentElement, gridElement, datarecord) {
parentElement.children[0].innerHTML = 'Details: ' + index;
}
</script>
|
|
keyboardnavigation
# |
Boolean
|
true
|
Enables or disables the keyboard navigation.
<template>
<JqxGrid
ref="myGrid"
:width="850"
:source="source"
:columns="columns"
:autoheight="true"
:keyboardnavigation="false"
/>
</template>
<script setup>
import { ref } from 'vue';
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.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>
|
|
localization
# |
Object
|
null
|
Localizes the Grid.
<template>
<JqxGrid
ref="myGrid"
:width="850"
:source="source"
:columns="columns"
:autoheight="true"
:pageable="true"
:localization="localization"
/>
</template>
<script setup>
import { ref } from 'vue';
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.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(getLocalization('de'));
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>
|
|
pagesize
# |
Number
|
10
|
Sets or gets the number of visible rows per page when the Grid paging is enabled.
<template>
<JqxGrid
ref="myGrid"
:width="850"
:source="source"
:columns="columns"
:autoheight="true"
:pageable="true"
:pagesize="2"
/>
</template>
<script setup>
import { ref } from 'vue';
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.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>
|
|
pagesizeoptions
# |
Array
|
['5', '10', '20']
|
Sets or gets the available page size options.
<template>
<JqxGrid
ref="myGrid"
:width="850"
:source="source"
:columns="columns"
:autoheight="true"
:pageable="true"
:pagesizeoptions="['15', '30', '50']"
/>
</template>
<script setup>
import { ref } from 'vue';
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.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>
|
Sets or gets the rendering mode of the pager. Available values - "simple" and "default".
<template>
<JqxGrid
ref="myGrid"
:width="850"
:source="source"
:columns="columns"
:autoheight="true"
:pageable="true"
:pagermode="'simple'"
/>
</template>
<script setup>
import { ref } from 'vue';
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.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>
|
Sets or gets the buttons displayed in the pager when the "pagermode" is set to "simple".
<template>
<JqxGrid
ref="myGrid"
:width="850"
:source="source"
:columns="columns"
:autoheight="true"
:pageable="true"
:pagermode="'simple'"
:pagesize="1"
:pagerbuttonscount="10"
/>
</template>
<script setup>
import { ref } from 'vue';
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.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'],
['Maria Anders', 'Sales Representative', 'Berlin', 'Germany'],
['Ana Trujillo', 'Owner', 'México D.F.', 'Mexico'],
['Antonio Moreno', 'Owner', 'México D.F.', 'Mexico'],
['Maria Anders', 'Sales Representative', 'Berlin', 'Germany'],
['Ana Trujillo', 'Owner', 'México D.F.', 'Mexico'],
['Antonio Moreno', 'Owner', 'México D.F.', 'Mexico'],
['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>
|
|
pageable
# |
Boolean
|
false
|
Enables or disables the Grid Paging feature. When the value of this property is true, the Grid displays a pager below the rows.
<template>
<JqxGrid
ref="myGrid"
:width="850"
:source="source"
:columns="columns"
:autoheight="true"
:pageable="true"
/>
</template>
<script setup>
import { ref } from 'vue';
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.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>
|
|
autofill
# |
Boolean
|
false
|
Enables or disables the Grid Auto Fill feature. This feature can be used with 'multiplecellsadvanced' cell selection mode. It allows you to dynamically copy cell values.
<template>
<JqxGrid ref="myGrid"
:width="850" :source="dataAdapter" :columns="columns" :autoheight="true"
:pageable="true"
/>
</template>
<script setup>
import { ref } from "vue";
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.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>
|
|
rowdetails
# |
Boolean
|
false
|
Enables or disables the row details. When this option is enabled, the Grid can show additional information below each grid row.
<template>
<JqxGrid
ref="myGrid"
:width="850"
:source="source"
:columns="columns"
:autoheight="true"
:rowdetails="true"
:initrowdetails="initrowdetails"
:rowdetailstemplate="rowdetailstemplate"
/>
</template>
<script setup>
import { ref } from 'vue';
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.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' }
]);
const rowdetailstemplate = ref({
rowdetails: "<div style='margin: 10px;'>Row Details</div>",
rowdetailsheight: 50
});
function initrowdetails(index, parentElement, gridElement, datarecord) {
var details = $($(parentElement).children()[0]);
details.html('Details: ' + index);
}
</script>
|
|
rowdetailstemplate
# |
Object
|
null
|
Determines the template of the row details. The rowdetails field specifies the HTML used for details. The rowdetailsheight specifies the height of the details.
<template>
<JqxGrid
ref="myGrid"
:width="850"
:source="source"
:columns="columns"
:autoheight="true"
:rowdetails="true"
:initrowdetails="initrowdetails"
:rowdetailstemplate="rowdetailstemplate"
/>
</template>
<script setup>
import { ref } from 'vue';
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.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' }
]);
const rowdetailstemplate = ref({
rowdetails: "<div style='margin: 10px;'>Row Details</div>",
rowdetailsheight: 50
});
function initrowdetails(index, parentElement, gridElement, datarecord) {
var details = $($(parentElement).children()[0]);
details.html('Details: ' + index);
}
</script>
|
|
ready
# |
Function
|
null
|
This function is called when the grid is initialized and the binding is complete.
<template>
<JqxGrid
ref="myGrid"
:width="850"
:source="source"
:columns="columns"
:autoheight="true"
:ready="ready"
/>
</template>
<script setup>
import { ref } from 'vue';
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.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>
|
|
rendered
# |
Function
|
null
|
Callback function which is called when the jqxGrid's render function is called either internally or not.
<template>
<JqxGrid
ref="myGrid"
:width="850"
:source="source"
:columns="columns"
:autoheight="true"
:rendered="rendered"
/>
</template>
<script setup>
import { ref } from 'vue';
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.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>
|
|
renderstatusbar
# |
Function
|
null
|
Callback function which allows you to customize the rendering of the Grid's statusbar.
<template>
<JqxGrid
ref="myGrid"
:width="850"
:source="source"
:columns="columns"
:autoheight="true"
:showstatusbar="true"
:renderstatusbar="renderstatusbar"
/>
</template>
<script setup>
import { ref } from 'vue';
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.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(statusbar) {
statusbar.append($("<span style='margin: 5px;'>Status Bar</span>"));
}
</script>
|
|
rendertoolbar
# |
Function
|
null
|
Callback function which allows you to customize the rendering of the Grid's toolbar.
<template>
<JqxGrid
ref="myGrid"
:width="850"
:source="source"
:columns="columns"
:autoheight="true"
:showtoolbar="true"
:rendertoolbar="rendertoolbar"
/>
</template>
<script setup>
import { ref } from 'vue';
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.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) {
toolbar.append($("<span style='margin: 5px;'>Tool Bar</span>"));
}
</script>
|
|
rendergridrows
# |
Function
|
null
|
This is a function called when the grid is used in virtual mode. The function should return an array of rows which will be rendered by the Grid.
<template>
<div style="font-size: 13px; font-family: Verdana; float: left">
<JqxGrid
:width="800"
:source="dataAdapter"
:columns="columns"
:autoheight="true"
:virtualmode="true"
:pageable="true"
:rendergridrows="rendergridrows"
>
</JqxGrid>
</div>
</template>
<script setup>
import { ref } from 'vue';
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.vue';
let source = { datatype: 'array', localdata: {}, totalrecords: 1000000 };
let firstNames = [
'Andrew',
'Nancy',
'Shelley',
'Regina',
'Yoshi',
'Antoni',
'Mayumi',
'Ian',
'Peter',
'Lars',
'Petra',
'Martin',
'Sven',
'Elio',
'Beate',
'Cheryl',
'Michael',
'Guylene'
];
let lastNames = [
'Fuller',
'Davolio',
'Burke',
'Murphy',
'Nagase',
'Saavedra',
'Ohno',
'Devling',
'Wilson',
'Peterson',
'Winkler',
'Bein',
'Petersen',
'Rossi',
'Vileid',
'Saylor',
'Bjorn',
'Nodier'
];
let productNames = [
'Black Tea',
'Green Tea',
'Caffe Espresso',
'Doubleshot Espresso',
'Caffe Latte',
'White Chocolate Mocha',
'Cramel Latte',
'Caffe Americano',
'Cappuccino',
'Espresso Truffle',
'Espresso con Panna',
'Peppermint Mocha Twist'
];
let priceValues = [
'2.25',
'1.5',
'3.0',
'3.3',
'4.5',
'3.6',
'3.8',
'2.5',
'5.0',
'1.75',
'3.25',
'4.0'
];
const dataAdapter = ref(new jqx.dataAdapter(source));
const columns = ref([
{ text: 'Id', datafield: 'id', width: 50 },
{ text: 'First Name', datafield: 'firstname', width: 120 },
{ text: 'Last Name', datafield: 'lastname', width: 120 },
{ text: 'Product', datafield: 'productname', width: 180 },
{ text: 'Quantity', datafield: 'quantity', width: 100, cellsalign: 'right' },
{ text: 'Unit Price', datafield: 'price', width: 100, cellsalign: 'right', cellsformat: 'c2' },
{ text: 'Total', datafield: 'total', cellsrenderer: totalcolumnrenderer, cellsalign: 'right' }
]);
function generateData(startindex, endindex) {
let data = {};
for (let i = startindex; i < endindex; i++) {
let row = {};
let productindex = Math.floor(Math.random() * this.productNames.length);
let price = parseFloat(this.priceValues[productindex]);
let quantity = 1 + Math.round(Math.random() * 10);
row['id'] = i;
row['firstname'] = this.firstNames[Math.floor(Math.random() * this.firstNames.length)];
row['lastname'] = this.lastNames[Math.floor(Math.random() * this.lastNames.length)];
row['productname'] = this.productNames[productindex];
row['price'] = price;
row['quantity'] = quantity;
row['total'] = price * quantity;
data[i] = row;
}
return data;
}
function rendergridrows(params) {
let data = this.generateData(params.startindex, params.endindex);
return data;
}
function totalcolumnrenderer(row, column, cellvalue) {
let newCellValue = jqx.dataFormat.formatnumber(cellvalue, 'c2');
return (
'<span style="margin: 6px 3px; font-size: 12px; float: right; font-weight: bold;">' +
newCellValue +
'</span>'
);
}
</script>
|
|
sortable
# |
Boolean
|
false
|
The sortable property enables or disables the sorting feature.
<template>
<JqxGrid
ref="myGrid"
:width="850"
:source="source"
:columns="columns"
:autoheight="true"
:sortable="true"
/>
</template>
<script setup>
import { ref } from 'vue';
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.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>
|
|
sortmode
# |
String
|
'one'
|
The sortmode property determines the Grid can sort by single or multiple columns.
<template>
<JqxGrid
ref="myGrid"
:width="850"
:source="source"
:columns="columns"
:autoheight="true"
:sortable="true"
:sortmode="'many'"
/>
</template>
<script setup>
import { ref } from 'vue';
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.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>
|
|
sortmodekey
# |
String
|
''
|
The sortmodekey property determines the Grid can sort by multiple columns only when the property is set to Control and the control key is pressed.
<template>
<JqxGrid ref="myGrid"
:width="850" :source="dataAdapter" :columns="columns" :autoheight="true"
:sortable="true" :sortmode="'many'" :sortmodekey="'Control'"
/>
</template>
<script setup>
import { ref } from "vue";
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.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>
|
|
selectedrowindex
# |
Number
|
-1
|
Selects a row at a specified index.
<template>
<JqxGrid
ref="myGrid"
:width="850"
:source="source"
:columns="columns"
:autoheight="true"
:selectedrowindex="2"
/>
</template>
<script setup>
import { ref } from 'vue';
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.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>
|
|
selectedrowindexes
# |
Array
|
[]
|
Selects single or multiple rows.
<template>
<JqxGrid
ref="myGrid"
:width="850"
:source="source"
:columns="columns"
:autoheight="true"
:selectionmode="'multiplerows'"
:selectedrowindexes="[0, 2]"
/>
</template>
<script setup>
import { ref } from 'vue';
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.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>
|
|
source
# |
Object
|
{}
|
Sets and gets the source.
<template>
<JqxGrid ref="myGrid" :width="850" :source="source" :columns="columns" :autoheight="true" />
</template>
<script setup>
import { ref } from 'vue';
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.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>
|
|
sorttogglestates
# |
Number
|
2
|
Possible Values:
'0'-disables toggling
'1'-enables togging. Click on a column toggles the sort direction
'2'-enables remove sorting option
<template>
<JqxGrid
ref="myGrid"
:width="850"
:source="source"
:columns="columns"
:autoheight="true"
:sortable="true"
:sorttogglestates="1"
/>
</template>
<script setup>
import { ref } from 'vue';
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.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>
|
|
updatedelay
# |
Number
|
0
|
Sets or gets the rendering update delay. This could be used for deferred scrolling scenarios.
<template>
<JqxGrid
ref="myGrid"
:width="850"
:source="source"
:columns="columns"
:autoheight="true"
:updatedelay="20"
/>
</template>
<script setup>
import { ref } from 'vue';
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.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>
|
|
virtualmode
# |
Boolean
|
false
|
Enables or disables the virtual data mode.
<template>
<div style="font-size: 13px; font-family: Verdana; float: left">
<JqxGrid
:width="800"
:source="dataAdapter"
:columns="columns"
:autoheight="true"
:virtualmode="true"
:pageable="true"
:rendergridrows="rendergridrows"
>
</JqxGrid>
</div>
</template>
<script setup>
import { ref } from 'vue';
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.vue';
let source = { datatype: 'array', localdata: {}, totalrecords: 1000000 };
let firstNames = [
'Andrew',
'Nancy',
'Shelley',
'Regina',
'Yoshi',
'Antoni',
'Mayumi',
'Ian',
'Peter',
'Lars',
'Petra',
'Martin',
'Sven',
'Elio',
'Beate',
'Cheryl',
'Michael',
'Guylene'
];
let lastNames = [
'Fuller',
'Davolio',
'Burke',
'Murphy',
'Nagase',
'Saavedra',
'Ohno',
'Devling',
'Wilson',
'Peterson',
'Winkler',
'Bein',
'Petersen',
'Rossi',
'Vileid',
'Saylor',
'Bjorn',
'Nodier'
];
let productNames = [
'Black Tea',
'Green Tea',
'Caffe Espresso',
'Doubleshot Espresso',
'Caffe Latte',
'White Chocolate Mocha',
'Cramel Latte',
'Caffe Americano',
'Cappuccino',
'Espresso Truffle',
'Espresso con Panna',
'Peppermint Mocha Twist'
];
let priceValues = [
'2.25',
'1.5',
'3.0',
'3.3',
'4.5',
'3.6',
'3.8',
'2.5',
'5.0',
'1.75',
'3.25',
'4.0'
];
const dataAdapter = ref(new jqx.dataAdapter(source));
const columns = ref([
{ text: 'Id', datafield: 'id', width: 50 },
{ text: 'First Name', datafield: 'firstname', width: 120 },
{ text: 'Last Name', datafield: 'lastname', width: 120 },
{ text: 'Product', datafield: 'productname', width: 180 },
{ text: 'Quantity', datafield: 'quantity', width: 100, cellsalign: 'right' },
{ text: 'Unit Price', datafield: 'price', width: 100, cellsalign: 'right', cellsformat: 'c2' },
{ text: 'Total', datafield: 'total', cellsrenderer: totalcolumnrenderer, cellsalign: 'right' }
]);
function generateData(startindex, endindex) {
let data = {};
for (let i = startindex; i < endindex; i++) {
let row = {};
let productindex = Math.floor(Math.random() * this.productNames.length);
let price = parseFloat(this.priceValues[productindex]);
let quantity = 1 + Math.round(Math.random() * 10);
row['id'] = i;
row['firstname'] = this.firstNames[Math.floor(Math.random() * this.firstNames.length)];
row['lastname'] = this.lastNames[Math.floor(Math.random() * this.lastNames.length)];
row['productname'] = this.productNames[productindex];
row['price'] = price;
row['quantity'] = quantity;
row['total'] = price * quantity;
data[i] = row;
}
return data;
}
function rendergridrows(params) {
let data = this.generateData(params.startindex, params.endindex);
return data;
}
function totalcolumnrenderer(row, column, cellvalue) {
let newCellValue = jqx.dataFormat.formatnumber(cellvalue, 'c2');
return (
'<span style="margin: 6px 3px; font-size: 12px; float: right; font-weight: bold;">' +
newCellValue +
'</span>'
);
}
</script>
|
|
verticalscrollbarstep
# |
Number
|
5
|
Sets or gets the scrollbar's step when the user clicks the scroll arrows.
<template>
<JqxGrid
:width="getWidth"
:source="dataAdapter"
:columns="columns"
:columnsresize="true"
:verticalscrollbarstep="200"
>
</JqxGrid>
</template>
<script setup>
import { ref } from 'vue';
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.vue';
let firstNames = [
'Andrew',
'Nancy',
'Shelley',
'Regina',
'Yoshi',
'Antoni',
'Mayumi',
'Ian',
'Peter',
'Lars',
'Petra',
'Martin',
'Sven',
'Elio',
'Beate',
'Cheryl',
'Michael',
'Guylene'
];
let lastNames = [
'Fuller',
'Davolio',
'Burke',
'Murphy',
'Nagase',
'Saavedra',
'Ohno',
'Devling',
'Wilson',
'Peterson',
'Winkler',
'Bein',
'Petersen',
'Rossi',
'Vileid',
'Saylor',
'Bjorn',
'Nodier'
];
let productNames = [
'Black Tea',
'Green Tea',
'Caffe Espresso',
'Doubleshot Espresso',
'Caffe Latte',
'White Chocolate Mocha',
'Cramel Latte',
'Caffe Americano',
'Cappuccino',
'Espresso Truffle',
'Espresso con Panna',
'Peppermint Mocha Twist'
];
let priceValues = [
'2.25',
'1.5',
'3.0',
'3.3',
'4.5',
'3.6',
'3.8',
'2.5',
'5.0',
'1.75',
'3.25',
'4.0'
];
let generateData = () => {
let data = {};
for (let i = 0; i < 200; i++) {
let row = {};
let productindex = Math.floor(Math.random() * productNames.length);
let price = parseFloat(priceValues[productindex]);
let quantity = 1 + Math.round(Math.random() * 10);
row['id'] = i;
row['firstname'] = firstNames[Math.floor(Math.random() * firstNames.length)];
row['lastname'] = lastNames[Math.floor(Math.random() * lastNames.length)];
row['productname'] = productNames[productindex];
row['price'] = price;
row['quantity'] = quantity;
row['total'] = price * quantity;
data[i] = row;
}
return data;
};
let source = {
localdata: generateData(),
datatype: 'array',
datafields: [
{ name: 'firstname', type: 'string' },
{ name: 'lastname', type: 'string' },
{ name: 'productname', type: 'string' },
{ name: 'quantity', type: 'number' },
{ name: 'price', type: 'number' },
{ name: 'total', type: 'number' }
]
};
const getWidth = ref(getWidth('grid'));
const dataAdapter = ref(new jqx.dataAdapter(source));
const columns = ref([
{ text: 'Name', datafield: 'firstname', width: 120 },
{ text: 'Last Name', datafield: 'lastname', width: 120 },
{ text: 'Product', datafield: 'productname', width: 180 },
{ text: 'Quantity', datafield: 'quantity', width: 80, cellsalign: 'right' },
{ text: 'Unit Price', datafield: 'price', width: 90, cellsalign: 'right', cellsformat: 'c2' },
{ text: 'Total', datafield: 'total', cellsalign: 'right', cellsformat: 'c2' }
]);
</script>
|
|
verticalscrollbarlargestep
# |
Number
|
400
|
Sets or gets the scrollbar's large step. This property specifies the step with which the vertical scrollbar's value is changed when the user clicks the area above or below the thumb.
<template>
<JqxGrid
:width="getWidth"
:source="dataAdapter"
:columns="columns"
:columnsresize="true"
:verticalscrollbarlargestep="2000"
>
</JqxGrid>
</template>
<script setup>
import { ref } from 'vue';
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.vue';
let firstNames = [
'Andrew',
'Nancy',
'Shelley',
'Regina',
'Yoshi',
'Antoni',
'Mayumi',
'Ian',
'Peter',
'Lars',
'Petra',
'Martin',
'Sven',
'Elio',
'Beate',
'Cheryl',
'Michael',
'Guylene'
];
let lastNames = [
'Fuller',
'Davolio',
'Burke',
'Murphy',
'Nagase',
'Saavedra',
'Ohno',
'Devling',
'Wilson',
'Peterson',
'Winkler',
'Bein',
'Petersen',
'Rossi',
'Vileid',
'Saylor',
'Bjorn',
'Nodier'
];
let productNames = [
'Black Tea',
'Green Tea',
'Caffe Espresso',
'Doubleshot Espresso',
'Caffe Latte',
'White Chocolate Mocha',
'Cramel Latte',
'Caffe Americano',
'Cappuccino',
'Espresso Truffle',
'Espresso con Panna',
'Peppermint Mocha Twist'
];
let priceValues = [
'2.25',
'1.5',
'3.0',
'3.3',
'4.5',
'3.6',
'3.8',
'2.5',
'5.0',
'1.75',
'3.25',
'4.0'
];
let generateData = () => {
let data = {};
for (let i = 0; i < 200; i++) {
let row = {};
let productindex = Math.floor(Math.random() * productNames.length);
let price = parseFloat(priceValues[productindex]);
let quantity = 1 + Math.round(Math.random() * 10);
row['id'] = i;
row['firstname'] = firstNames[Math.floor(Math.random() * firstNames.length)];
row['lastname'] = lastNames[Math.floor(Math.random() * lastNames.length)];
row['productname'] = productNames[productindex];
row['price'] = price;
row['quantity'] = quantity;
row['total'] = price * quantity;
data[i] = row;
}
return data;
};
let source = {
localdata: generateData(),
datatype: 'array',
datafields: [
{ name: 'firstname', type: 'string' },
{ name: 'lastname', type: 'string' },
{ name: 'productname', type: 'string' },
{ name: 'quantity', type: 'number' },
{ name: 'price', type: 'number' },
{ name: 'total', type: 'number' }
]
};
const getWidth = ref(getWidth('grid'));
const dataAdapter = ref(new jqx.dataAdapter(source));
const columns = ref([
{ text: 'Name', datafield: 'firstname', width: 120 },
{ text: 'Last Name', datafield: 'lastname', width: 120 },
{ text: 'Product', datafield: 'productname', width: 180 },
{ text: 'Quantity', datafield: 'quantity', width: 80, cellsalign: 'right' },
{ text: 'Unit Price', datafield: 'price', width: 90, cellsalign: 'right', cellsformat: 'c2' },
{ text: 'Total', datafield: 'total', cellsalign: 'right', cellsformat: 'c2' }
]);
</script>
|
|
|
|
gridaiResult
# |
Event
|
|
Triggered when an AI action (aiCommand, aiAsk, aiSummarize, aiExplainRow or aiClassifyColumn) completes successfully. Part of the jqxgrid.ai.js module.
Code examples #
Bind to the gridaiResult event of jqxGrid.
<template>
<JqxGrid ref="myGrid" @gridaiResult="onGridaiResult($event)"
:width="850" :source="dataAdapter" :columns="columns" :autoheight="true"
/>
</template>
<script setup>
import { ref } from "vue";
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.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'
}]);
function onGridaiResult(event) {
alert('do something...');
}
</script>
|
|
gridaiError
# |
Event
|
|
Triggered when an AI request fails. Part of the jqxgrid.ai.js module.
Code examples #
Bind to the gridaiError event of jqxGrid.
<template>
<JqxGrid ref="myGrid" @gridaiError="onGridaiError($event)"
:width="850" :source="dataAdapter" :columns="columns" :autoheight="true"
/>
</template>
<script setup>
import { ref } from "vue";
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.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'
}]);
function onGridaiError(event) {
alert('do something...');
}
</script>
|
|
bindingcomplete
# |
Event
|
|
This event is triggered when the binding is completed. Note: Bind to that event before the Grid's initialization, because if you data bind the Grid to a local data source and bind to the "bindingcomplete" event after the initialization, the data binding will be already completed.
Code examples #
Bind to the bindingcomplete event of jqxGrid.
<template>
<JqxGrid
ref="myGrid"
@bindingcomplete="onBindingcomplete($event)"
:width="850"
:columns="columns"
:autoheight="true"
/>
</template>
<script setup>
import { onMounted, ref } from 'vue';
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.vue';
const myGrid = 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 onBindingcomplete(event) {
alert('do something...');
}
onMounted(() => {
myGrid.value.source = source.value;
});
</script>
|
|
columnresized
# |
Event
|
|
This event is triggered when a Grid Column is resized.
Code examples #
Bind to the columnresized event of jqxGrid.
<template>
<JqxGrid
ref="myGrid"
@columnresized="onColumnresized($event)"
:width="850"
:source="source"
:columns="columns"
:columnsresize="true"
:autoheight="true"
/>
</template>
<script setup>
import { ref } from 'vue';
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.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 a Grid Column is moved to a new position.
Code examples #
Bind to the columnreordered event of jqxGrid.
<template>
<JqxGrid
ref="myGrid"
@columnreordered="onColumnreordered($event)"
:width="850"
:source="source"
:columns="columns"
:columnsreorder="true"
:autoheight="true"
/>
</template>
<script setup>
import { ref } from 'vue';
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.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>
|
|
columnclick
# |
Event
|
|
This event is triggered when a column is clicked.
Code examples #
Bind to the columnclick event of jqxGrid.
<template>
<JqxGrid
ref="myGrid"
@columnclick="onColumnclick($event)"
:width="850"
:source="source"
:columns="columns"
:autoheight="true"
/>
</template>
<script setup>
import { ref } from 'vue';
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.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 onColumnclick(event) {
alert('do something...');
}
</script>
|
|
cellclick
# |
Event
|
|
This event is triggered when a cell is clicked.
Code examples #
Bind to the cellclick event of jqxGrid.
<template>
<JqxGrid
ref="myGrid"
@cellclick="onCellclick($event)"
:width="850"
:source="source"
:columns="columns"
:autoheight="true"
/>
</template>
<script setup>
import { ref } from 'vue';
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.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 onCellclick(event) {
alert('do something...');
}
</script>
|
|
celldoubleclick
# |
Event
|
|
This event is triggered when a cell is double-clicked.
Code examples #
Bind to the celldoubleclick event of jqxGrid.
<template>
<JqxGrid
ref="myGrid"
@celldoubleclick="onCelldoubleclick($event)"
:width="850"
:source="source"
:columns="columns"
:autoheight="true"
/>
</template>
<script setup>
import { ref } from 'vue';
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.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 onCelldoubleclick(event) {
alert('do something...');
}
</script>
|
|
cellselect
# |
Event
|
|
This event is triggered when a cell is selected.
Code examples #
Bind to the cellselect event of jqxGrid.
<template>
<JqxGrid
ref="myGrid"
@cellselect="onCellselect($event)"
:width="850"
:source="source"
:columns="columns"
:autoheight="true"
/>
</template>
<script setup>
import { onMounted, ref } from 'vue';
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.vue';
const myGrid = 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 onCellselect(event) {
alert('do something...');
}
onMounted(() => {
myGrid.value.selectionmode = 'singlecell';
});
</script>
|
|
cellunselect
# |
Event
|
|
This event is triggered when a cell is unselected.
Code examples #
Bind to the cellunselect event of jqxGrid.
<template>
<JqxGrid
ref="myGrid"
@cellunselect="onCellunselect($event)"
:width="850"
:source="source"
:columns="columns"
:autoheight="true"
/>
</template>
<script setup>
import { onMounted, ref } from 'vue';
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.vue';
const myGrid = 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 onCellunselect(event) {
alert('do something...');
}
onMounted(() => {
myGrid.value.selectionmode = 'singlecell';
});
</script>
|
|
cellvaluechanged
# |
Event
|
|
This event is triggered when a cell's value is changed.
Code examples #
Bind to the cellvaluechanged event of jqxGrid.
<template>
<JqxGrid
ref="myGrid"
@cellvaluechanged="onCellvaluechanged($event)"
:width="850"
:source="source"
:columns="columns"
:autoheight="true"
/>
</template>
<script setup>
import { onMounted, ref } from 'vue';
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.vue';
const myGrid = 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 onCellvaluechanged(event) {
alert('do something...');
}
onMounted(() => {
myGrid.value.editable = true;
});
</script>
|
|
cellbeginedit
# |
Event
|
|
This event is triggered when a cell's editor is displayed.
Code examples #
Bind to the cellbeginedit event of jqxGrid.
<template>
<JqxGrid
ref="myGrid"
@cellbeginedit="onCellbeginedit($event)"
:width="850"
:source="source"
:columns="columns"
:autoheight="true"
/>
</template>
<script setup>
import { onMounted, ref } from 'vue';
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.vue';
const myGrid = 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(() => {
myGrid.value.editable = true;
});
</script>
|
|
cellendedit
# |
Event
|
|
This event is triggered when a cell's edit operation has ended.
Code examples #
Bind to the cellendedit event of jqxGrid.
<template>
<JqxGrid
ref="myGrid"
@cellendedit="onCellendedit($event)"
:width="850"
:source="source"
:columns="columns"
:autoheight="true"
/>
</template>
<script setup>
import { onMounted, ref } from 'vue';
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.vue';
const myGrid = 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(() => {
myGrid.value.editable = true;
});
</script>
|
|
filter
# |
Event
|
|
This event is triggered when the Grid is filtered.
Code examples #
Bind to the filter event of jqxGrid.
<template>
<JqxGrid
ref="myGrid"
@filter="onFilter($event)"
:width="850"
:source="source"
:columns="columns"
:autoheight="true"
/>
</template>
<script setup>
import { onMounted, ref } from 'vue';
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.vue';
const myGrid = 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(() => {
myGrid.value.filterable = true;
});
</script>
|
|
groupschanged
# |
Event
|
|
This event is triggered when a group is added, inserted or removed.
Code examples #
Bind to the groupschanged event of jqxGrid.
<template>
<JqxGrid
ref="myGrid"
@groupschanged="onGroupschanged($event)"
:width="850"
:source="source"
:columns="columns"
:autoheight="true"
/>
</template>
<script setup>
import { onMounted, ref } from 'vue';
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.vue';
const myGrid = 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 onGroupschanged(event) {
alert('do something...');
}
onMounted(() => {
myGrid.value.groupable = true;
});
</script>
|
|
groupexpand
# |
Event
|
|
This event is triggered when a group is expanded.
Code examples #
Bind to the groupexpand event of jqxGrid.
<template>
<JqxGrid
ref="myGrid"
@groupexpand="onGroupexpand($event)"
:width="850"
:source="source"
:columns="columns"
:autoheight="true"
/>
</template>
<script setup>
import { onMounted, ref } from 'vue';
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.vue';
const myGrid = 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 onGroupexpand(event) {
alert('do something...');
}
onMounted(() => {
myGrid.value.groupable = true;
});
</script>
|
|
groupcollapse
# |
Event
|
|
This event is triggered when a group is collapsed.
Code examples #
Bind to the groupcollapse event of jqxGrid.
<template>
<JqxGrid
ref="myGrid"
@groupcollapse="onGroupcollapse($event)"
:width="850"
:source="source"
:columns="columns"
:autoheight="true"
/>
</template>
<script setup>
import { onMounted, ref } from 'vue';
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.vue';
const myGrid = 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 onGroupcollapse(event) {
alert('do something...');
}
onMounted(() => {
myGrid.value.groupable = true;
});
</script>
|
|
pagechanged
# |
Event
|
|
This event is triggered when the current page is changed.
Code examples #
Bind to the pagechanged event of jqxGrid.
<template>
<JqxGrid
ref="myGrid"
@pagechanged="onPagechanged($event)"
:width="850"
:source="source"
:columns="columns"
:autoheight="true"
/>
</template>
<script setup>
import { onMounted, ref } from 'vue';
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.vue';
const myGrid = 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 onPagechanged(event) {
alert('do something...');
}
onMounted(() => {
myGrid.value.pageable = true;
myGrid.value.pagesize = 1;
});
</script>
|
|
pagesizechanged
# |
Event
|
|
This event is triggered when the page size is changed.
Code examples #
Bind to the pagesizechanged event of jqxGrid.
<template>
<JqxGrid
ref="myGrid"
@pagesizechanged="onPagesizechanged($event)"
:width="850"
:source="source"
:columns="columns"
:autoheight="true"
/>
</template>
<script setup>
import { onMounted, ref } from 'vue';
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.vue';
const myGrid = 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(() => {
myGrid.value.pageable = true;
});
</script>
|
|
rowclick
# |
Event
|
|
This event is triggered when a row is clicked.
Code examples #
Bind to the rowclick event of jqxGrid.
<template>
<JqxGrid
ref="myGrid"
@rowclick="onRowclick($event)"
:width="850"
:source="source"
:columns="columns"
:autoheight="true"
/>
</template>
<script setup>
import { ref } from 'vue';
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.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 event is triggered when a row is double clicked.
Code examples #
Bind to the rowdoubleclick event of jqxGrid.
<template>
<JqxGrid
ref="myGrid"
@rowdoubleclick="onRowdoubleclick($event)"
:width="850"
:source="source"
:columns="columns"
:autoheight="true"
/>
</template>
<script setup>
import { ref } from 'vue';
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.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 event is triggered when a row is selected.
Code examples #
Bind to the rowselect event of jqxGrid.
<template>
<JqxGrid
ref="myGrid"
@rowselect="onRowselect($event)"
:width="850"
:source="source"
:columns="columns"
:autoheight="true"
/>
</template>
<script setup>
import { ref } from 'vue';
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.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 event is triggered when a row is unselected.
Code examples #
Bind to the rowunselect event of jqxGrid.
<template>
<JqxGrid
ref="myGrid"
@rowunselect="onRowunselect($event)"
:width="850"
:source="source"
:columns="columns"
:autoheight="true"
/>
</template>
<script setup>
import { ref } from 'vue';
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.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>
|
|
rowexpand
# |
Event
|
|
This event is triggered when a row with details is expanded.
Code examples #
Bind to the rowexpand event of jqxGrid.
<template>
<JqxGrid
ref="myGrid"
@rowexpand="onRowexpand($event)"
:width="850"
:source="source"
:columns="columns"
:rowdetails="true"
:initrowdetails="initrowdetails"
:rowdetailstemplate="rowdetailstemplate"
:autoheight="true"
/>
</template>
<script setup>
import { ref } from 'vue';
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.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' }
]);
const rowdetailstemplate = ref({
rowdetails: "<div style='margin: 10px;'>Row Details</div>",
rowdetailsheight: 50
});
function initrowdetails(index, parentElement, gridElement, datarecord) {
var details = $($(parentElement).children()[0]);
details.html('Details: ' + index);
}
function onRowexpand(event) {
alert('do something...');
}
</script>
|
|
rowcollapse
# |
Event
|
|
This event is triggered when a row with details is collapsed.
Code examples #
Bind to the rowcollapse event of jqxGrid.
<template>
<JqxGrid
ref="myGrid"
@rowcollapse="onRowcollapse($event)"
:width="850"
:source="source"
:columns="columns"
:rowdetails="true"
:initrowdetails="initrowdetails"
:rowdetailstemplate="rowdetailstemplate"
:autoheight="true"
/>
</template>
<script setup>
import { ref } from 'vue';
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.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' }
]);
const rowdetailstemplate = ref({
rowdetails: "<div style='margin: 10px;'>Row Details</div>",
rowdetailsheight: 50
});
function initrowdetails(index, parentElement, gridElement, datarecord) {
var details = $($(parentElement).children()[0]);
details.html('Details: ' + index);
}
function onRowcollapse(event) {
alert('do something...');
}
</script>
|
|
sort
# |
Event
|
|
This event is triggered when the Grid is sorted.
Code examples #
Bind to the sort event of jqxGrid.
<template>
<JqxGrid
ref="myGrid"
@sort="onSort($event)"
:width="850"
:source="source"
:columns="columns"
:autoheight="true"
/>
</template>
<script setup>
import { onMounted, ref } from 'vue';
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.vue';
const myGrid = 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(() => {
myGrid.value.sortable = true;
myGrid.value.showsortmenuitems = true;
});
</script>
|
|
|
| Name | Arguments | Return Type |
|
aiConfig
# |
config
|
Object
|
Configures the AI transport for the Grid (provider, key, model, proxy URL, headers, custom sendRequest and maxRows). Part of the jqxgrid.ai.js module.
<template>
<JqxGrid ref="myGrid"
:width="850" :source="dataAdapter" :columns="columns" :autoheight="true"
/>
</template>
<script setup>
import { onMounted, ref } from "vue";
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.vue';
const myGrid = ref(null);
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'
}]);
onMounted(() => {
const value = myGrid.value.aiConfig({
provider: 'anthropic',
proxyUrl: '/api/ai'
});
});
</script>
|
|
aiCommand
# |
text, callback
|
Object
|
Turns a plain-language request into validated filter, sort and group actions and applies them to the Grid - it never runs model output. Returns a Promise. Part of the jqxgrid.ai.js module.
<template>
<JqxGrid ref="myGrid"
:width="850" :source="dataAdapter" :columns="columns" :autoheight="true"
/>
</template>
<script setup>
import { onMounted, ref } from "vue";
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.vue';
const myGrid = ref(null);
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'
}]);
onMounted(() => {
const value = myGrid.value.aiCommand('Show the customers from Germany, sorted by name');
});
</script>
|
|
aiAsk
# |
text, callback
|
Object
|
Answers a natural-language question about the Grid data using column aggregates and a row sample; the result may include a chart spec. Returns a Promise. Part of the jqxgrid.ai.js module.
<template>
<JqxGrid ref="myGrid"
:width="850" :source="dataAdapter" :columns="columns" :autoheight="true"
/>
</template>
<script setup>
import { onMounted, ref } from "vue";
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.vue';
const myGrid = ref(null);
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'
}]);
onMounted(() => {
const value = myGrid.value.aiAsk('Which country has the most customers?');
});
</script>
|
|
aiSummarize
# |
rows, callback
|
Object
|
Returns a plain-language summary of the selected rows, or of the visible rows when none are selected. Returns a Promise. Part of the jqxgrid.ai.js module.
<template>
<JqxGrid ref="myGrid"
:width="850" :source="dataAdapter" :columns="columns" :autoheight="true"
/>
</template>
<script setup>
import { onMounted, ref } from "vue";
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.vue';
const myGrid = ref(null);
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'
}]);
onMounted(() => {
const value = myGrid.value.aiSummarize();
});
</script>
|
|
aiExplainRow
# |
rowindex, callback
|
Object
|
Explains a single row of the Grid in plain language. Returns a Promise. Part of the jqxgrid.ai.js module.
<template>
<JqxGrid ref="myGrid"
:width="850" :source="dataAdapter" :columns="columns" :autoheight="true"
/>
</template>
<script setup>
import { onMounted, ref } from "vue";
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.vue';
const myGrid = ref(null);
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'
}]);
onMounted(() => {
const value = myGrid.value.aiExplainRow(0);
});
</script>
|
|
aiClassifyColumn
# |
options, callback
|
Object
|
Asks the model to classify every visible row and writes a label into a Grid column. Returns a Promise. Part of the jqxgrid.ai.js module.
<template>
<JqxGrid ref="myGrid"
:width="850" :source="dataAdapter" :columns="columns" :autoheight="true"
/>
</template>
<script setup>
import { onMounted, ref } from "vue";
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.vue';
const myGrid = ref(null);
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'
}]);
onMounted(() => {
const value = myGrid.value.aiClassifyColumn({
datafield: 'Title',
categories: ['Sales', 'Management', 'Other']
});
});
</script>
|
|
autoresizecolumns
# |
type
|
None
|
Auto-resizes all columns.
<template>
<div>
<JqxGrid ref="myGrid" :width="410" :source="source" :columns="columns" :autoheight="true" />
<JqxButton style="margin-top: 20px" :width="150" @click="resizeColumns()"
>Auto Resize Columns</JqxButton
>
</div>
</template>
<script setup>
import { ref } from 'vue';
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.vue';
import JqxButton from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxbuttons.vue';
const myGrid = 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', width: 50 },
{ text: 'Contact Title', datafield: 'Title', width: 50 },
{ text: 'City', datafield: 'City', width: 50 },
{ text: 'Country', datafield: 'Country' }
]);
function resizeColumns() {
myGrid.value.autoresizecolumns();
}
</script>
|
|
autoresizecolumn
# |
dataField, type
|
None
|
Auto-resizes a column.
<template>
<div>
<JqxGrid ref="myGrid" :width="500" :source="source" :columns="columns" :autoheight="true" />
<JqxButton style="margin-top: 20px" :width="200" @click="resizeColumn()"
>Auto Resize Second Column</JqxButton
>
</div>
</template>
<script setup>
import { ref } from 'vue';
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.vue';
import JqxButton from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxbuttons.vue';
const myGrid = 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', width: 150 },
{ text: 'Contact Title', datafield: 'Title', width: 50 },
{ text: 'City', datafield: 'City', width: 100 },
{ text: 'Country', datafield: 'Country' }
]);
function resizeColumn() {
myGrid.value.autoresizecolumn('Title');
}
</script>
|
|
beginupdate
# |
None
|
None
|
Starts an update operation. This is appropriate when calling multiple methods or set multiple properties at once. Optional boolean parameter: suspendAllActions. When you call beginupdate with parameter equal to true, the jqxGrid stops all rendering processes and when you call "endupdate", it will call the "render" method. Otherwise, it will try to resume its state with minimal performance impact. Use the suspendAllActions when you make multiple changes which require full-rerender such as changing the Grid's source, columns, groups.
<template>
<div>
<JqxGrid
ref="myGrid"
:width="800"
:source="source"
:columns="columns"
:sortable="true"
:autoheight="true"
/>
<JqxButton style="margin-right: 20px" :width="100" @click="beginUpdate()"
>Begin Update</JqxButton
>
<JqxButton :width="100" @click="endUpdate()">End Update</JqxButton>
</div>
</template>
<script setup>
import { ref } from 'vue';
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.vue';
import JqxButton from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxbuttons.vue';
const myGrid = 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 beginUpdate() {
myGrid.value.beginupdate();
}
function endUpdate() {
myGrid.value.endupdate();
}
</script>
<style>
.jqx-button {
display: inline-block;
margin-top: 20px;
}
</style>
|
|
clear
# |
None
|
None
|
Clears the Grid contents.
<template>
<JqxGrid ref="myGrid" :width="850" :source="source" :columns="columns" :autoheight="true" />
</template>
<script setup>
import { onMounted, ref } from 'vue';
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.vue';
const myGrid = 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(() => {
myGrid.value.clear();
});
</script>
|
|
createChart
# |
type, dataSource
|
None
|
Creates a Chart from the Grid data.
<template>
<JqxGrid ref="myGrid"
:width="850" :source="dataAdapter" :columns="columns" :autoheight="true"
/>
</template>
<script setup>
import { onMounted, ref } from "vue";
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.vue';
const myGrid = ref(null);
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'
}]);
onMounted(() => {
myGrid.value.createChart('column');
});
</script>
|
|
destroy
# |
None
|
None
|
Removes the Grid from the document and releases its resources.
<template>
<JqxGrid ref="myGrid" :width="850" :source="source" :columns="columns" :autoheight="true" />
</template>
<script setup>
import { onMounted, ref } from 'vue';
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.vue';
const myGrid = 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(() => {
myGrid.value.destroy();
});
</script>
|
|
endupdate
# |
None
|
None
|
Ends the update operation.
<template>
<div>
<JqxGrid
ref="myGrid"
:width="800"
:source="source"
:columns="columns"
:sortable="true"
:autoheight="true"
/>
<JqxButton style="margin-right: 20px" :width="100" @click="beginUpdate()"
>Begin Update</JqxButton
>
<JqxButton :width="100" @click="endUpdate()">End Update</JqxButton>
</div>
</template>
<script setup>
import { ref } from 'vue';
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.vue';
import JqxButton from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxbuttons.vue';
const myGrid = 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 beginUpdate() {
myGrid.value.beginupdate();
}
function endUpdate() {
myGrid.value.endupdate();
}
</script>
<style>
.jqx-button {
display: inline-block;
margin-top: 20px;
}
</style>
|
|
ensurerowvisible
# |
rowBoundIndex
|
None
|
Scrolls to a row. The parameter is a bound index.
<template>
<JqxGrid ref="myGrid" :width="850" :source="source" :columns="columns" :height="70" />
</template>
<script setup>
import { onMounted, ref } from 'vue';
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.vue';
const myGrid = 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(() => {
myGrid.value.ensurerowvisible(2);
});
</script>
|
|
focus
# |
None
|
None
|
Sets the keyboard Focus to the jqxGrid widget.
<template>
<JqxGrid ref="myGrid" :width="850" :source="source" :columns="columns" :autoheight="true" />
</template>
<script setup>
import { onMounted, ref } from 'vue';
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.vue';
const myGrid = 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(() => {
myGrid.value.focus();
});
</script>
|
|
getcolumnindex
# |
dataField
|
Number
|
Gets the index of a column in the columns collection.
<template>
<JqxGrid ref="myGrid" :width="850" :source="source" :columns="columns" :autoheight="true" />
</template>
<script setup>
import { onMounted, ref } from 'vue';
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.vue';
const myGrid = 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 = myGrid.value.getcolumnindex('Title');
});
</script>
|
|
getcolumn
# |
dataField
|
Object
|
Gets a column by datafield value.Column's fields:
- datafield - column's datafield. To get the cells labels and values from the data source, the Grid uses the "datafield" and "displayfield" properties. If the "displayfield" is not set, the "displayfield" is equal to the "datafield'.
- text - column's text.
- displayfield - column's displayfield. To get the cells labels and values from the data source, the Grid uses the "datafield" and "displayfield" properties. If the "displayfield" is not set, the "displayfield" is equal to the "datafield'.
- sortable - determines whether the column is sortable.
- filterable - determines whether the column is filterable.
- exportable - determines whether the column will be exported through the "exportdata" method.
- editable - determines whether the column is editable.
- groupable - determines whether the column is groupable.
- resizable - determines whether the column is resizable.
- draggable - determines whether the column is draggable.
- classname - determines the column's header classname.
- cellclassname - determines the column's cells classname.
- width - determines the column's width.
- menu - determines whether the column has an associated popup menu or not.
<template>
<JqxGrid ref="myGrid" :width="850" :source="source" :columns="columns" :autoheight="true" />
</template>
<script setup>
import { onMounted, ref } from 'vue';
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.vue';
const myGrid = 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 = myGrid.value.getcolumn('Title');
});
</script>
|
|
getcolumnproperty
# |
dataField, propertyName
|
Object
|
Gets a property of a column. Possible property names: 'text', 'hidden', 'hideable', 'renderer', 'cellsrenderer', 'align', 'cellsalign', 'cellsformat', 'pinned', 'contenttype', 'resizable', 'filterable', 'editable', 'cellclassname', 'classname', 'width', 'minwidth', 'maxwidth'
<template>
<JqxGrid ref="myGrid" :width="850" :source="source" :columns="columns" :autoheight="true" />
</template>
<script setup>
import { onMounted, ref } from 'vue';
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.vue';
const myGrid = 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 = myGrid.value.getcolumnproperty('Title', 'text');
});
</script>
|
|
getrowid
# |
rowBoundIndex
|
String
|
Gets the id of a row. The returned value is a 'string' or 'number' depending on the id's type. The parameter is the row's bound index.
<template>
<JqxGrid ref="myGrid" :width="850" :source="source" :columns="columns" :autoheight="true" />
</template>
<script setup>
import { onMounted, ref } from 'vue';
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.vue';
const myGrid = 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 = myGrid.value.getrowid(0);
});
</script>
|
|
getrowdata
# |
rowBoundIndex
|
Object
|
Gets the data of a row. The returned value is a JSON object. The parameter is the row's bound index. Note: If you pass a bound index of a row which is not visible in the Grid, the method returns null.
<template>
<JqxGrid ref="myGrid" :width="850" :source="source" :columns="columns" :autoheight="true" />
</template>
<script setup>
import { onMounted, ref } from 'vue';
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.vue';
const myGrid = 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 = myGrid.value.getrowdata(0);
});
</script>
|
|
getrowdatabyid
# |
rowID
|
Object
|
Gets the data of a row. The returned value is a JSON object. The parameter is the row's id.
<template>
<JqxGrid ref="myGrid" :width="850" :source="source" :columns="columns" :autoheight="true" />
</template>
<script setup>
import { onMounted, ref } from 'vue';
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.vue';
const myGrid = 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 = myGrid.value.getrowdatabyid(0);
});
</script>
|
|
getrowboundindexbyid
# |
rowID
|
Number
|
Gets the index of a row in the array returned by the getboundrows method.
<template>
<JqxGrid ref="myGrid" :width="850" :source="source" :columns="columns" :autoheight="true" />
</template>
<script setup>
import { onMounted, ref } from 'vue';
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.vue';
const myGrid = 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 = myGrid.value.getrowboundindexbyid(0);
});
</script>
|
|
getrowboundindex
# |
rowDisplayIndex
|
Number
|
Gets the index of a row in the array returned by the getboundrows method.
<template>
<JqxGrid ref="myGrid" :width="850" :source="source" :columns="columns" :autoheight="true" />
</template>
<script setup>
import { onMounted, ref } from 'vue';
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.vue';
const myGrid = 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 = myGrid.value.getrowboundindex(0);
});
</script>
|
|
getrows
# |
None
|
Array
|
Gets all rows. Returns an array of all rows loaded in the Grid. If the Grid is filtered, the returned value is an array of the filtered records.
<template>
<JqxGrid ref="myGrid" :width="850" :source="source" :columns="columns" :autoheight="true" />
</template>
<script setup>
import { onMounted, ref } from 'vue';
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.vue';
const myGrid = 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 = myGrid.value.getrows();
});
</script>
|
|
getboundrows
# |
None
|
Array
|
Gets all rows loaded from the data source. The method returns an Array of all rows. The Grid's sorting, filtering, grouping and paging will not affect the result of this method. It will always return the rows collection loaded from the data source.
<template>
<JqxGrid ref="myGrid" :width="850" :source="source" :columns="columns" :autoheight="true" />
</template>
<script setup>
import { onMounted, ref } from 'vue';
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.vue';
const myGrid = 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 = myGrid.value.getboundrows();
});
</script>
|
|
getdisplayrows
# |
None
|
Array
|
Gets all rows that are currently displayed in the Grid. The method returns an Array of the displayed rows. The Grid's sorting, filtering, grouping and paging will affect the result of this method.
<template>
<JqxGrid ref="myGrid" :width="850" :source="source" :columns="columns" :autoheight="true" />
</template>
<script setup>
import { onMounted, ref } from 'vue';
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.vue';
const myGrid = 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 = myGrid.value.getdisplayrows();
});
</script>
|
|
getdatainformation
# |
None
|
Object
|
Gets bound data information.
<template>
<JqxGrid ref="myGrid" :width="850" :source="source" :columns="columns" :autoheight="true" />
</template>
<script setup>
import { onMounted, ref } from 'vue';
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.vue';
const myGrid = 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(() => {
myGrid.value.pageable = true;
myGrid.value.sortable = true;
const value = myGrid.value.getdatainformation();
});
</script>
|
|
getsortinformation
# |
None
|
Object
|
Gets the sort information.
<template>
<JqxGrid ref="myGrid" :width="850" :source="source" :columns="columns" :autoheight="true" />
</template>
<script setup>
import { onMounted, ref } from 'vue';
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.vue';
const myGrid = 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(() => {
myGrid.value.sortable = true;
const value = myGrid.value.getsortinformation();
});
</script>
|
|
getpaginginformation
# |
None
|
Object
|
Gets the paging information.
<template>
<JqxGrid ref="myGrid" :width="850" :source="source" :columns="columns" :autoheight="true" />
</template>
<script setup>
import { onMounted, ref } from 'vue';
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.vue';
const myGrid = 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(() => {
myGrid.value.pageable = true;
const value = myGrid.value.getpaginginformation();
});
</script>
|
|
hidecolumn
# |
dataField
|
None
|
Hides a column.
<template>
<div>
<JqxGrid ref="myGrid" :width="800" :source="source" :columns="columns" :autoheight="true" />
<JqxButton style="margin-right: 20px" :width="100" @click="showColumn()"
>Show Column</JqxButton
>
<JqxButton :width="100" @click="hideColumn()">Hide Column</JqxButton>
</div>
</template>
<script setup>
import { ref } from 'vue';
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.vue';
import JqxButton from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxbuttons.vue';
const myGrid = 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 showColumn() {
myGrid.value.showcolumn('ContactName');
}
function hideColumn() {
myGrid.value.hidecolumn('ContactName');
}
</script>
<style>
.jqx-button {
display: inline-block;
margin-top: 20px;
}
</style>
|
|
hideloadelement
# |
None
|
None
|
Hides the data loading image.
<template>
<div>
<JqxGrid ref="myGrid" :width="800" :source="source" :columns="columns" :autoheight="true" />
<JqxButton style="margin-right: 20px" :width="150" @click="showElement()"
>Show Load Element</JqxButton
>
<JqxButton :width="150" @click="hideElement()">Hide Load Element</JqxButton>
</div>
</template>
<script setup>
import { ref } from 'vue';
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.vue';
import JqxButton from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxbuttons.vue';
const myGrid = 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 showElement() {
myGrid.value.showloadelement();
}
function hideElement() {
myGrid.value.hideloadelement();
}
</script>
<style>
.jqx-button {
display: inline-block;
margin-top: 20px;
}
</style>
|
|
hiderowdetails
# |
rowBoundIndex
|
None
|
Hides the details of a row.
<template>
<div>
<JqxGrid
ref="myGrid"
:width="800"
:source="source"
:columns="columns"
:autoheight="true"
:rowdetails="true"
:initrowdetails="initrowdetails"
:rowdetailstemplate="rowdetailstemplate"
/>
<JqxButton style="margin-right: 20px" :width="150" @click="showDetails()"
>Show Row Details</JqxButton
>
<JqxButton :width="150" @click="hideDetails()">Hide Row Details</JqxButton>
</div>
</template>
<script setup>
import { ref } from 'vue';
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.vue';
import JqxButton from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxbuttons.vue';
const myGrid = 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 rowdetailstemplate = ref({
rowdetails: "<div style='margin: 10px;'>Row Details</div>",
rowdetailsheight: 50
});
function initrowdetails(index, parentElement, gridElement, datarecord) {
var details = $($(parentElement).children()[0]);
details.html('Details: ' + index);
}
function showDetails() {
myGrid.value.showrowdetails(0);
}
function hideDetails() {
myGrid.value.hiderowdetails(0);
}
</script>
<style>
.jqx-button {
display: inline-block;
margin-top: 20px;
}
</style>
|
|
iscolumnvisible
# |
dataField
|
Boolean
|
Gets whether a column is visible. Returns a boolean value.
<template>
<JqxGrid ref="myGrid" :width="850" :source="source" :columns="columns" :autoheight="true" />
</template>
<script setup>
import { onMounted, ref } from 'vue';
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.vue';
const myGrid = 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 = myGrid.value.iscolumnvisible('ContactName');
});
</script>
|
|
iscolumnpinned
# |
dataField
|
Boolean
|
Gets whether a column is pinned. Returns a boolean value.
<template>
<JqxGrid ref="myGrid" :width="850" :source="source" :columns="columns" :autoheight="true" />
</template>
<script setup>
import { onMounted, ref } from 'vue';
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.vue';
const myGrid = 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 = myGrid.value.iscolumnpinned('ContactName');
});
</script>
|
|
localizestrings
# |
localizationobject
|
None
|
Localizes the grid strings. This method allows you to change the values of all Grid strings and also to change the cells formatting settings.
<template>
<JqxGrid ref="myGrid" :width="850" :source="source" :columns="columns" :autoheight="true" />
</template>
<script setup>
import { onMounted, ref } from 'vue';
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.vue';
const myGrid = 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(() => {
myGrid.value.pageable = true;
myGrid.value.localizestrings(getLocalization('de'));
});
</script>
|
|
pincolumn
# |
dataField
|
None
|
Pins the column.
<template>
<div>
<JqxGrid ref="myGrid" :width="800" :source="source" :columns="columns" :autoheight="true" />
<JqxButton style="margin-right: 20px" :width="100" @click="pinColumn()"
>Pin Column</JqxButton
>
<JqxButton :width="100" @click="unpinColumn()">Unpin Column</JqxButton>
</div>
</template>
<script setup>
import { ref } from 'vue';
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.vue';
import JqxButton from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxbuttons.vue';
const myGrid = 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 pinColumn() {
myGrid.value.pincolumn('ContactName');
}
function unpinColumn() {
myGrid.value.unpincolumn('ContactName');
}
</script>
<style>
.jqx-button {
display: inline-block;
margin-top: 20px;
}
</style>
|
|
refreshdata
# |
None
|
None
|
Refreshes the data.
<template>
<JqxGrid ref="myGrid" :width="850" :source="source" :columns="columns" :autoheight="true" />
</template>
<script setup>
import { onMounted, ref } from 'vue';
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.vue';
const myGrid = 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(() => {
myGrid.value.refreshdata();
});
</script>
|
|
refresh
# |
None
|
None
|
Repaints the Grid View.
<template>
<JqxGrid ref="myGrid" :width="850" :source="source" :columns="columns" :autoheight="true" />
</template>
<script setup>
import { onMounted, ref } from 'vue';
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.vue';
const myGrid = 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(() => {
myGrid.value.refresh();
});
</script>
|
|
render
# |
None
|
None
|
Renders the Grid contents. This method completely refreshes the Grid cells, columns, layout and repaints the view.
<template>
<JqxGrid ref="myGrid" :width="850" :source="source" :columns="columns" :autoheight="true" />
</template>
<script setup>
import { onMounted, ref } from 'vue';
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.vue';
const myGrid = 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(() => {
myGrid.value.render();
});
</script>
|
|
scrolloffset
# |
top, left
|
None
|
Scrolls the grid contents.
<template>
<JqxGrid ref="myGrid" :width="400" :source="source" :columns="columns" :autoheight="true" />
</template>
<script setup>
import { onMounted, ref } from 'vue';
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.vue';
const myGrid = 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', width: 150 },
{ text: 'Contact Title', datafield: 'Title', width: 150 },
{ text: 'City', datafield: 'City', width: 150 },
{ text: 'Country', datafield: 'Country' }
]);
onMounted(() => {
myGrid.value.scrolloffset(0, 100);
});
</script>
|
|
scrollposition
# |
None
|
Object
|
Returns the scrollbars position.
<template>
<JqxGrid ref="myGrid" :width="400" :source="source" :columns="columns" :autoheight="true" />
</template>
<script setup>
import { onMounted, ref } from 'vue';
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.vue';
const myGrid = 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', width: 150 },
{ text: 'Contact Title', datafield: 'Title', width: 150 },
{ text: 'City', datafield: 'City', width: 150 },
{ text: 'Country', datafield: 'Country' }
]);
onMounted(() => {
let position = myGrid.value.scrollposition();
let left = position.left;
let top = position.top;
alert('Left: ' + left + ', Top: ' + top);
});
</script>
|
|
showloadelement
# |
None
|
None
|
Shows the data loading image.
<template>
<div>
<JqxGrid ref="myGrid" :width="800" :source="source" :columns="columns" :autoheight="true" />
<JqxButton style="margin-right: 20px" :width="150" @click="showElement()"
>Show Load Element</JqxButton
>
<JqxButton :width="150" @click="hideElement()">Hide Load Element</JqxButton>
</div>
</template>
<script setup>
import { ref } from 'vue';
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.vue';
import JqxButton from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxbuttons.vue';
const myGrid = 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 showElement() {
myGrid.value.showloadelement();
}
function hideElement() {
myGrid.value.hideloadelement();
}
</script>
<style>
.jqx-button {
display: inline-block;
margin-top: 20px;
}
</style>
|
|
showrowdetails
# |
rowBoundIndex
|
None
|
Shows the details of a row.
<template>
<div>
<JqxGrid
ref="myGrid"
:width="800"
:source="source"
:columns="columns"
:autoheight="true"
:rowdetails="true"
:initrowdetails="initrowdetails"
:rowdetailstemplate="rowdetailstemplate"
/>
<JqxButton style="margin-right: 20px" :width="150" @click="showDetails()"
>Show Row Details</JqxButton
>
<JqxButton :width="150" @click="hideDetails()">Hide Row Details</JqxButton>
</div>
</template>
<script setup>
import { ref } from 'vue';
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.vue';
import JqxButton from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxbuttons.vue';
const myGrid = 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 rowdetailstemplate = ref({
rowdetails: "<div style='margin: 10px;'>Row Details</div>",
rowdetailsheight: 50
});
function initrowdetails(index, parentElement, gridElement, datarecord) {
var details = $($(parentElement).children()[0]);
details.html('Details: ' + index);
}
function showDetails() {
myGrid.value.showrowdetails(0);
}
function hideDetails() {
myGrid.value.hiderowdetails(0);
}
</script>
<style>
.jqx-button {
display: inline-block;
margin-top: 20px;
}
</style>
|
|
setcolumnindex
# |
dataField, index
|
None
|
n Sets the index of a column in the columns collection.
<template>
<JqxGrid ref="myGrid" :width="850" :source="source" :columns="columns" :autoheight="true" />
</template>
<script setup>
import { onMounted, ref } from 'vue';
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.vue';
const myGrid = 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(() => {
myGrid.value.setcolumnindex('Title', 0);
});
</script>
|
|
setcolumnproperty
# |
dataField, propertyName, propertyValue
|
None
|
Sets a property of a column.Possible property names: 'text', 'hidden', 'hideable', 'renderer', 'cellsrenderer', 'align', 'cellsalign', 'cellsformat', 'pinned', 'contenttype', 'resizable', 'filterable', 'editable', 'cellclassname', 'classname', 'width', 'minwidth', 'maxwidth'
<template>
<JqxGrid ref="myGrid" :width="850" :source="source" :columns="columns" :autoheight="true" />
</template>
<script setup>
import { onMounted, ref } from 'vue';
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.vue';
const myGrid = 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(() => {
myGrid.value.setcolumnproperty('Title', 'text', 'New Name');
});
</script>
|
|
showcolumn
# |
dataField
|
None
|
Shows a column.
<template>
<div>
<JqxGrid ref="myGrid" :width="800" :source="source" :columns="columns" :autoheight="true" />
<JqxButton style="margin-right: 20px" :width="100" @click="showColumn()"
>Show Column</JqxButton
>
<JqxButton :width="100" @click="hideColumn()">Hide Column</JqxButton>
</div>
</template>
<script setup>
import { ref } from 'vue';
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.vue';
import JqxButton from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxbuttons.vue';
const myGrid = 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 showColumn() {
myGrid.value.showcolumn('ContactName');
}
function hideColumn() {
myGrid.value.hidecolumn('ContactName');
}
</script>
<style>
.jqx-button {
display: inline-block;
margin-top: 20px;
}
</style>
|
|
unpincolumn
# |
dataField
|
None
|
Unpins the column.
<template>
<div>
<JqxGrid ref="myGrid" :width="800" :source="source" :columns="columns" :autoheight="true" />
<JqxButton style="margin-right: 20px" :width="100" @click="pinColumn()"
>Pin Column</JqxButton
>
<JqxButton :width="100" @click="unpinColumn()">Unpin Column</JqxButton>
</div>
</template>
<script setup>
import { ref } from 'vue';
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.vue';
import JqxButton from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxbuttons.vue';
const myGrid = 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 pinColumn() {
myGrid.value.pincolumn('ContactName');
}
function unpinColumn() {
myGrid.value.unpincolumn('ContactName');
}
</script>
<style>
.jqx-button {
display: inline-block;
margin-top: 20px;
}
</style>
|
|
updatebounddata
# |
type
|
None
|
Updates the bound data and refreshes the grid. You can pass 'filter' or 'sort' as parameter, if the update reason is change in 'filtering' or 'sorting'. To update only the data without the columns, use the 'data' parameter. To make a quick update of the cells, pass "cells" as parameter. Passing "cells" will refresh only the cells values when the new rows count is equal to the previous rows count. To make a full update, do not pass any parameter.
<template>
<JqxGrid ref="myGrid" :width="850" :source="source" :columns="columns" :autoheight="true" />
</template>
<script setup>
import { onMounted, ref } from 'vue';
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.vue';
const myGrid = 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(() => {
myGrid.value.updatebounddata();
});
</script>
|
|
updating
# |
None
|
Boolean
|
Gets the updating operation state. Returns a boolean value.
<template>
<JqxGrid ref="myGrid" :width="850" :source="source" :columns="columns" :autoheight="true" />
</template>
<script setup>
import { onMounted, ref } from 'vue';
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.vue';
const myGrid = 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 = myGrid.value.updating();
});
</script>
|
|
getsortcolumn
# |
None
|
String
|
Gets the sort column. Returns the column's datafield or null, if sorting is not applied.
<template>
<JqxGrid ref="myGrid" :width="850" :source="source" :columns="columns" :autoheight="true" />
</template>
<script setup>
import { onMounted, ref } from 'vue';
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.vue';
const myGrid = 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(() => {
myGrid.value.sortable = true;
const value = myGrid.value.getsortcolumn();
});
</script>
|
|
removesort
# |
None
|
None
|
Removes the sorting.
<template>
<div>
<JqxGrid
ref="myGrid"
:width="850"
:source="source"
:columns="columns"
:sortable="true"
:autoheight="true"
/>
<JqxButton style="margin-top: 20px" :width="150" @click="removeSort()"
>Remove Sort</JqxButton
>
</div>
</template>
<script setup>
import { ref } from 'vue';
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.vue';
import JqxButton from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxbuttons.vue';
const myGrid = 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 removeSort() {
myGrid.value.removesort();
}
</script>
|
|
sortby
# |
dataField, sortOrder
|
None
|
Sorts the Grid data.
<template>
<JqxGrid ref="myGrid" :width="850" :source="source" :columns="columns" :autoheight="true" />
</template>
<script setup>
import { onMounted, ref } from 'vue';
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.vue';
const myGrid = 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(() => {
myGrid.value.sortable = true;
myGrid.value.sortby('ContactName', 'asc');
});
</script>
|
|
addgroup
# |
dataField
|
None
|
Groups by a column.
<template>
<div>
<JqxGrid
ref="myGrid"
:width="800"
:source="source"
:columns="columns"
:groupable="true"
:autoheight="true"
/>
<JqxButton style="margin-right: 20px" :width="100" @click="addGroup()">Add Group</JqxButton>
<JqxButton :width="100" @click="removeGroup()">Remove Group</JqxButton>
</div>
</template>
<script setup>
import { ref } from 'vue';
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.vue';
import JqxButton from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxbuttons.vue';
const myGrid = 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 addGroup() {
myGrid.value.addgroup('ContactName');
}
function removeGroup() {
myGrid.value.removegroup('ContactName');
}
</script>
<style>
.jqx-button {
display: inline-block;
margin-top: 20px;
}
</style>
|
|
cleargroups
# |
None
|
None
|
Clears all groups.
<template>
<div>
<JqxGrid
ref="myGrid"
:width="800"
:source="source"
:columns="columns"
:groupable="true"
:autoheight="true"
/>
<JqxButton style="margin-top: 20px" :width="100" @click="clearGroups()"
>Clear Groups</JqxButton
>
</div>
</template>
<script setup>
import { ref } from 'vue';
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.vue';
import JqxButton from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxbuttons.vue';
const myGrid = 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 clearGroups() {
myGrid.value.cleargroups();
}
</script>
|
|
collapsegroup
# |
group
|
None
|
Collapses a group.
<template>
<div>
<JqxGrid
ref="myGrid"
:width="800"
:source="source"
:columns="columns"
:groupable="true"
:groups="['ContactName']"
:autoheight="true"
/>
<JqxButton style="margin-right: 20px" :width="100" @click="expandGroup()"
>Expand Group</JqxButton
>
<JqxButton :width="100" @click="collapseGroup()">Collapse Group</JqxButton>
</div>
</template>
<script setup>
import { ref } from 'vue';
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.vue';
import JqxButton from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxbuttons.vue';
const myGrid = 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 expandGroup() {
myGrid.value.expandgroup(0);
}
function collapseGroup() {
myGrid.value.collapsegroup(0);
}
</script>
<style>
.jqx-button {
display: inline-block;
margin-top: 20px;
}
</style>
|
|
collapseallgroups
# |
None
|
None
|
Collapses all groups.
<template>
<div>
<JqxGrid
ref="myGrid"
:width="800"
:source="source"
:columns="columns"
:groupable="true"
:groups="['ContactName']"
:autoheight="true"
/>
<JqxButton style="margin-right: 20px" :width="110" @click="expandGroup()"
>Expand Groups</JqxButton
>
<JqxButton :width="110" @click="collapseGroup()">Collapse Groups</JqxButton>
</div>
</template>
<script setup>
import { ref } from 'vue';
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.vue';
import JqxButton from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxbuttons.vue';
const myGrid = 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 expandGroup() {
myGrid.value.expandallgroups();
}
function collapseGroup() {
myGrid.value.collapseallgroups();
}
</script>
<style>
.jqx-button {
display: inline-block;
margin-top: 20px;
}
</style>
|
|
expandallgroups
# |
None
|
None
|
Expands all groups.
<template>
<div>
<JqxGrid
ref="myGrid"
:width="800"
:source="source"
:columns="columns"
:groupable="true"
:groups="['ContactName']"
:autoheight="true"
/>
<JqxButton style="margin-right: 20px" :width="110" @click="expandGroup()"
>Expand Groups</JqxButton
>
<JqxButton :width="110" @click="collapseGroup()">Collapse Groups</JqxButton>
</div>
</template>
<script setup>
import { ref } from 'vue';
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.vue';
import JqxButton from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxbuttons.vue';
const myGrid = 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 expandGroup() {
myGrid.value.expandallgroups();
}
function collapseGroup() {
myGrid.value.collapseallgroups();
}
</script>
<style>
.jqx-button {
display: inline-block;
margin-top: 20px;
}
</style>
|
|
expandgroup
# |
group
|
None
|
Expands a group.
<template>
<div>
<JqxGrid
ref="myGrid"
:width="800"
:source="source"
:columns="columns"
:groupable="true"
:groups="['ContactName']"
:autoheight="true"
/>
<JqxButton style="margin-right: 20px" :width="100" @click="expandGroup()"
>Expand Group</JqxButton
>
<JqxButton :width="100" @click="collapseGroup()">Collapse Group</JqxButton>
</div>
</template>
<script setup>
import { ref } from 'vue';
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.vue';
import JqxButton from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxbuttons.vue';
const myGrid = 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 expandGroup() {
myGrid.value.expandgroup(0);
}
function collapseGroup() {
myGrid.value.collapsegroup(0);
}
</script>
<style>
.jqx-button {
display: inline-block;
margin-top: 20px;
}
</style>
|
|
getrootgroupscount
# |
None
|
Number
|
Gets the number of root groups.
<template>
<JqxGrid ref="myGrid" :width="850" :source="source" :columns="columns" :autoheight="true" />
</template>
<script setup>
import { onMounted, ref } from 'vue';
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.vue';
const myGrid = 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(() => {
myGrid.value.groupable = true;
myGrid.value.groups = ['ContactName'];
const value = myGrid.value.getrootgroupscount();
});
</script>
|
|
getgroup
# |
groupIndex
|
Object
|
Gets a group. The method returns an object with details about the Group. The object has the following fields:
- group - group's name.
- level - group's level in the group's hierarchy.
- expanded - group's expand state.
- subgroups - an array of sub groups or null.
- subrows - an array of rows or null.
<template>
<JqxGrid ref="myGrid" :width="850" :source="source" :columns="columns" :autoheight="true" />
</template>
<script setup>
import { onMounted, ref } from 'vue';
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.vue';
const myGrid = 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(() => {
myGrid.value.groupable = true;
myGrid.value.groups = ['ContactName'];
const value = myGrid.value.getgroup(0);
});
</script>
|
|
insertgroup
# |
groupIndex, dataField
|
None
|
Groups by a column.
<template>
<JqxGrid ref="myGrid" :width="850" :source="source" :columns="columns" :autoheight="true" />
</template>
<script setup>
import { onMounted, ref } from 'vue';
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.vue';
const myGrid = 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(() => {
myGrid.value.groupable = true;
myGrid.value.groups = ['ContactName'];
myGrid.value.insertgroup(0, 'Title');
});
</script>
|
|
iscolumngroupable
# |
None
|
Boolean
|
Gets whether the user can group by a column. Returns a boolean value.
<template>
<JqxGrid ref="myGrid" :width="850" :source="source" :columns="columns" :autoheight="true" />
</template>
<script setup>
import { onMounted, ref } from 'vue';
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.vue';
const myGrid = 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(() => {
myGrid.value.groupable = true;
const value = myGrid.value.iscolumngroupable('ContactName');
});
</script>
|
|
removegroupat
# |
groupIndex
|
None
|
Removes a group at specific index.
<template>
<div>
<JqxGrid
ref="myGrid"
:width="800"
:source="source"
:columns="columns"
:groupable="true"
:autoheight="true"
/>
<JqxButton style="margin-top: 20px" :width="150" @click="removeGroupAt()"
>Remove First Group</JqxButton
>
</div>
</template>
<script setup>
import { ref } from 'vue';
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.vue';
import JqxButton from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxbuttons.vue';
const myGrid = 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 removeGroupAt() {
myGrid.value.removegroupat('0');
}
</script>
|
|
removegroup
# |
dataField
|
None
|
Removes a group.
<template>
<div>
<JqxGrid
ref="myGrid"
:width="800"
:source="source"
:columns="columns"
:groupable="true"
:autoheight="true"
/>
<JqxButton style="margin-right: 20px" :width="100" @click="addGroup()">Add Group</JqxButton>
<JqxButton :width="100" @click="removeGroup()">Remove Group</JqxButton>
</div>
</template>
<script setup>
import { ref } from 'vue';
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.vue';
import JqxButton from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxbuttons.vue';
const myGrid = 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 addGroup() {
myGrid.value.addgroup('ContactName');
}
function removeGroup() {
myGrid.value.removegroup('ContactName');
}
</script>
<style>
.jqx-button {
display: inline-block;
margin-top: 20px;
}
</style>
|
|
addfilter
# |
dataField, filterGroup, refreshGrid
|
None
|
Adds a filter to the Grid.
<template>
<JqxGrid
ref="myGrid"
:width="850"
:source="source"
:columns="columns"
:filterable="true"
:autoheight="true"
/>
</template>
<script setup>
import { onMounted, ref } from 'vue';
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.vue';
const myGrid = 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(() => {
let filtergroup = new jqx.filter();
let filter_or_operator = 1;
let filtervalue = 'Maria';
let filtercondition = 'contains';
let filter = filtergroup.createfilter('stringfilter', filtervalue, filtercondition);
filtergroup.addfilter(filter_or_operator, filter);
myGrid.value.addfilter('ContactName', filtergroup);
myGrid.value.applyfilters();
});
</script>
|
|
applyfilters
# |
None
|
None
|
Applies all filters to the Grid.
<template>
<JqxGrid
ref="myGrid"
:width="850"
:source="source"
:columns="columns"
:filterable="true"
:autoheight="true"
/>
</template>
<script setup>
import { onMounted, ref } from 'vue';
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.vue';
const myGrid = 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(() => {
let filtergroup = new jqx.filter();
let filter_or_operator = 1;
let filtervalue = 'Maria';
let filtercondition = 'contains';
let filter = filtergroup.createfilter('stringfilter', filtervalue, filtercondition);
filtergroup.addfilter(filter_or_operator, filter);
myGrid.value.addfilter('ContactName', filtergroup);
myGrid.value.applyfilters();
});
</script>
|
|
clearfilters
# |
None
|
None
|
Clears all filters from the Grid. You can call the method with optional boolean parameter. If the parameter is "true" or you call the method without parameter, the Grid will clear the filters and refresh the Grid(default behavior). If the parameter is "false", the method will clear the filters without refreshing the Grid.
<template>
<div>
<JqxGrid
ref="myGrid"
:width="800"
:source="source"
:columns="columns"
:filterable="true"
:autoheight="true"
/>
<JqxButton style="margin-top: 20px" :width="100" @click="clearFilters()"
>Clear Filters</JqxButton
>
</div>
</template>
<script setup>
import { ref } from 'vue';
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.vue';
import JqxButton from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxbuttons.vue';
const myGrid = 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 clearFilters() {
myGrid.value.clearfilters();
}
</script>
|
|
getfilterinformation
# |
None
|
Any
|
Gets the information about the Grid filters. The method returns an array of the applied filters. The returned information includes the filter objects and filter columns. Each filter in the Array has the following fields:
- filter - a filter object which may contain one or more filters.
Properties and Methods of the filter object.
- getfilters - returns an array of all filters in the filter object. Each filter in the Array has:
- value - filter's value.
- id - filter's id.
- condition - filter's operator. For string filter the value could be: 'EMPTY', 'NOT_EMPTY', 'CONTAINS', 'CONTAINS_CASE_SENSITIVE', 'DOES_NOT_CONTAIN', 'DOES_NOT_CONTAIN_CASE_SENSITIVE', 'STARTS_WITH', 'STARTS_WITH_CASE_SENSITIVE', 'ENDS_WITH', 'ENDS_WITH_CASE_SENSITIVE', 'EQUAL', 'EQUAL_CASE_SENSITIVE', 'NULL', 'NOT_NULL. For Date and number filter the value could be: 'EQUAL', 'NOT_EQUAL', 'LESS_THAN', 'LESS_THAN_OR_EQUAL', 'GREATER_THAN', 'GREATER_THAN_OR_EQUAL', 'NULL', 'NOT_NULL'. For boolean filter, the value could be: 'EQUAL', 'NOT_EQUAL'
- type - filter's type - 'stringfilter', 'numericfilter', 'booleanfilter' or 'datefilter'.
- operator - 'and' or 'or'. Determines the connection between the filters in the group.
- datafield - the column's datafield.
- displayfield - the column's display field.
<template>
<JqxGrid ref="myGrid" :width="850" :source="source" :columns="columns" :autoheight="true" />
</template>
<script setup>
import { onMounted, ref } from 'vue';
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.vue';
const myGrid = 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(() => {
myGrid.value.filterable = true;
const value = myGrid.value.getfilterinformation();
});
</script>
|
|
getcolumnat
# |
index
|
Object
|
Method: getcolumnat
<template>
<JqxGrid ref="myGrid" :width="850" :source="source" :columns="columns" :autoheight="true" />
</template>
<script setup>
import { onMounted, ref } from 'vue';
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.vue';
const myGrid = 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 = myGrid.value.getcolumnat(3);
});
</script>
|
|
removefilter
# |
dataField, refreshGrid
|
None
|
Removes a filter from the Grid.
<template>
<div>
<JqxGrid
ref="myGrid"
:width="800"
:source="source"
:columns="columns"
:filterable="true"
:autoheight="true"
/>
<JqxButton style="margin-top: 20px" :width="200" @click="removeFilter()"
>Remove Contact Name Filter</JqxButton
>
</div>
</template>
<script setup>
import { ref } from 'vue';
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.vue';
import JqxButton from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxbuttons.vue';
const myGrid = 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 removeFilter() {
myGrid.value.removefilter('ContactName');
}
</script>
|
|
refreshfilterrow
# |
None
|
None
|
Refreshes the filter row and updates the filter widgets. The filter row's widgets are synchronized with the applied filters.
<template>
<div>
<JqxGrid
ref="myGrid"
:width="800"
:source="source"
:columns="columns"
:filterable="true"
:showfilterrow="true"
:autoheight="true"
/>
<JqxButton style="margin-top: 20px" :width="200" @click="refresh()"
>Refresh filter row</JqxButton
>
</div>
</template>
<script setup>
import { ref } from 'vue';
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.vue';
import JqxButton from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxbuttons.vue';
const myGrid = 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 addFilters() {
let filtergroup = new jqx.filter();
let filter_or_operator = 1;
let filtervalue = 'Maria';
let filtercondition = 'contains';
let filter = filtergroup.createfilter('stringfilter', filtervalue, filtercondition);
filtergroup.addfilter(filter_or_operator, filter);
myGrid.value.addfilter('ContactName', filtergroup);
myGrid.value.applyfilters();
}
function refresh() {
this.addFilters();
myGrid.value.refreshfilterrow();
}
</script>
|
|
gotopage
# |
pagenumber
|
None
|
Navigates to a page when the Grid paging is enabled i.e when the pageable property value is true.
<template>
<JqxGrid ref="myGrid" :width="850" :source="source" :columns="columns" :autoheight="true" />
</template>
<script setup>
import { onMounted, ref } from 'vue';
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.vue';
const myGrid = 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(() => {
myGrid.value.pageable = true;
myGrid.value.pagesize = 1;
myGrid.value.gotopage(2);
});
</script>
|
|
gotoprevpage
# |
None
|
None
|
Navigates to a previous page when the Grid paging is enabled i.e when the pageable property value is true.
<template>
<div>
<JqxGrid
ref="myGrid"
:width="800"
:source="source"
:columns="columns"
:pageable="true"
:pagesize="1"
:autoheight="true"
/>
<JqxButton style="margin-right: 20px; margin-top: 20px" :width="100" @click="prevPage()"
>Previous Page</JqxButton
>
<JqxButton style="margin-top: 20px" :width="100" @click="nextPage()">Next Page</JqxButton>
</div>
</template>
<script setup>
import { ref } from 'vue';
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.vue';
import JqxButton from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxbuttons.vue';
const myGrid = 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 prevPage() {
myGrid.value.gotoprevpage();
}
function nextPage() {
myGrid.value.gotonextpage();
}
</script>
<style>
.jqx-button {
display: inline-block;
}
</style>
|
|
gotonextpage
# |
None
|
None
|
Navigates to a next page when the Grid paging is enabled i.e when the pageable property value is true.
<template>
<div>
<JqxGrid
ref="myGrid"
:width="800"
:source="source"
:columns="columns"
:pageable="true"
:pagesize="1"
:autoheight="true"
/>
<JqxButton style="margin-right: 20px; margin-top: 20px" :width="100" @click="prevPage()"
>Previous Page</JqxButton
>
<JqxButton style="margin-top: 20px" :width="100" @click="nextPage()">Next Page</JqxButton>
</div>
</template>
<script setup>
import { ref } from 'vue';
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.vue';
import JqxButton from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxbuttons.vue';
const myGrid = 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 prevPage() {
myGrid.value.gotoprevpage();
}
function nextPage() {
myGrid.value.gotonextpage();
}
</script>
<style>
.jqx-button {
display: inline-block;
}
</style>
|
|
addrow
# |
rowIds, data, rowPosition
|
None
|
Adds a new row or multiple rows.
<template>
<JqxGrid ref="myGrid" :width="850" :source="source" :columns="columns" :autoheight="true" />
</template>
<script setup>
import { onMounted, ref } from 'vue';
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.vue';
const myGrid = 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(() => {
myGrid.value.addrow(1, {});
});
</script>
|
|
begincelledit
# |
rowBoundIndex, dataField
|
None
|
Shows the cell's editor.
<template>
<JqxGrid ref="myGrid" :width="850" :source="source" :columns="columns" :autoheight="true" />
</template>
<script setup>
import { onMounted, ref } from 'vue';
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.vue';
const myGrid = 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(() => {
myGrid.value.begincelledit(1, 'firstname');
});
</script>
|
|
beginrowedit
# |
rowBoundIndex
|
None
|
Shows the cell editors for an entire row.
<template>
<JqxGrid ref="myGrid" :width="850" :source="source" :columns="columns" :autoheight="true" />
</template>
<script setup>
import { onMounted, ref } from 'vue';
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.vue';
const myGrid = 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(() => {
myGrid.value.beginrowedit(1);
});
</script>
|
Closes a column's menu.
<template>
<JqxGrid ref="myGrid" :width="850" :source="source" :columns="columns" :autoheight="true" />
</template>
<script setup>
import { onMounted, ref } from 'vue';
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.vue';
const myGrid = 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(() => {
myGrid.value.closemenu();
});
</script>
|
|
deleterow
# |
rowIds
|
None
|
Deletes a row or multiple rows. Returns a boolean value.
<template>
<JqxGrid ref="myGrid" :width="850" :source="source" :columns="columns" :autoheight="true" />
</template>
<script setup>
import { onMounted, ref } from 'vue';
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.vue';
const myGrid = 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(() => {
myGrid.value.deleterow(1);
});
</script>
|
|
endcelledit
# |
rowBoundIndex, dataField, confirmChanges
|
None
|
Hides the edit cell's editor and saves or cancels the changes.
<template>
<JqxGrid ref="myGrid" :width="850" :source="source" :columns="columns" :autoheight="true" />
</template>
<script setup>
import { onMounted, ref } from 'vue';
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.vue';
const myGrid = 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(() => {
myGrid.value.endcelledit(1, 'firstname', true);
});
</script>
|
|
endrowedit
# |
rowBoundIndex, confirmChanges
|
None
|
Hides the edited row's editors and saves or cancels the changes.
<template>
<JqxGrid ref="myGrid" :width="850" :source="source" :columns="columns" :autoheight="true" />
</template>
<script setup>
import { onMounted, ref } from 'vue';
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.vue';
const myGrid = 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(() => {
myGrid.value.endrowedit(1, true);
});
</script>
|
|
getcell
# |
rowBoundIndex, datafield
|
Object
|
Gets a cell. Returns an object with the following fields:
- value - cell's value.
- row - cell's row number.
- column - column's datafield.
<template>
<JqxGrid ref="myGrid" :width="850" :source="source" :columns="columns" :autoheight="true" />
</template>
<script setup>
import { onMounted, ref } from 'vue';
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.vue';
const myGrid = 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 = myGrid.value.getcell(1, 'firstname');
});
</script>
|
|
getcellatposition
# |
left, top
|
Object
|
Gets a cell at specific position. Returns an object with the following fields:
- value - cell's value.
- row - cell's row number.
- column - column's datafield.
<template>
<JqxGrid ref="myGrid" :width="850" :source="source" :columns="columns" :autoheight="true" />
</template>
<script setup>
import { onMounted, ref } from 'vue';
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.vue';
const myGrid = 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 = myGrid.value.getcellatposition(10, 100);
});
</script>
|
|
getcelltext
# |
rowBoundIndex, dataField
|
String
|
Gets the text of a cell.
<template>
<JqxGrid ref="myGrid" :width="850" :source="source" :columns="columns" :autoheight="true" />
</template>
<script setup>
import { onMounted, ref } from 'vue';
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.vue';
const myGrid = 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 = myGrid.value.getcelltext(1, 'firstname');
});
</script>
|
|
getcelltextbyid
# |
rowID, dataField
|
String
|
Gets the text of a cell.
<template>
<JqxGrid ref="myGrid" :width="850" :source="source" :columns="columns" :autoheight="true" />
</template>
<script setup>
import { onMounted, ref } from 'vue';
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.vue';
const myGrid = 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 = myGrid.value.getcelltextbyid(1, 'firstname');
});
</script>
|
|
getcellvaluebyid
# |
rowID, dataField
|
Object
|
Gets the value of a cell.
<template>
<JqxGrid ref="myGrid" :width="850" :source="source" :columns="columns" :autoheight="true" />
</template>
<script setup>
import { onMounted, ref } from 'vue';
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.vue';
const myGrid = 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 = myGrid.value.getcellvaluebyid(1, 'firstname');
});
</script>
|
|
getcellvalue
# |
rowBoundIndex, dataField
|
Object
|
Gets the value of a cell.
<template>
<JqxGrid ref="myGrid" :width="850" :source="source" :columns="columns" :autoheight="true" />
</template>
<script setup>
import { onMounted, ref } from 'vue';
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.vue';
const myGrid = 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 = myGrid.value.getcellvalue(1, 'firstname');
});
</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>
<JqxGrid ref="myGrid" :width="850" :source="source" :columns="columns" :autoheight="true" />
</template>
<script setup>
import { onMounted, ref } from 'vue';
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.vue';
const myGrid = 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 = myGrid.value.isBindingCompleted();
});
</script>
|
Displays a column's menu.
<template>
<JqxGrid ref="myGrid" :width="850" :source="source" :columns="columns" :autoheight="true" />
</template>
<script setup>
import { onMounted, ref } from 'vue';
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.vue';
const myGrid = 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(() => {
myGrid.value.openmenu('firstname');
});
</script>
|
|
setcellvalue
# |
rowBoundIndex, dataField, value
|
None
|
Sets a new value to a cell.
<template>
<JqxGrid ref="myGrid" :width="850" :source="source" :columns="columns" :autoheight="true" />
</template>
<script setup>
import { onMounted, ref } from 'vue';
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.vue';
const myGrid = 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(() => {
myGrid.value.setcellvalue(1, 'firstname', 'New Name');
});
</script>
|
|
setcellvaluebyid
# |
rowID, dataField, value
|
None
|
Sets a new value to a cell.
<template>
<JqxGrid ref="myGrid" :width="850" :source="source" :columns="columns" :autoheight="true" />
</template>
<script setup>
import { onMounted, ref } from 'vue';
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.vue';
const myGrid = 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(() => {
myGrid.value.setcellvaluebyid(1, 'firstname', 'New Name');
});
</script>
|
Displays a validation popup below a Grid cell.
<template>
<JqxGrid ref="myGrid" :width="850" :source="source" :columns="columns" :autoheight="true" />
</template>
<script setup>
import { onMounted, ref } from 'vue';
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.vue';
const myGrid = 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(() => {
myGrid.value.showvalidationpopup(1, 'firstname', 'Error message');
});
</script>
|
|
updaterow
# |
rowIds, data
|
None
|
Updates a row or multiple rows.
<template>
<JqxGrid ref="myGrid" :width="850" :source="source" :columns="columns" :autoheight="true" />
</template>
<script setup>
import { onMounted, ref } from 'vue';
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.vue';
const myGrid = 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(() => {
myGrid.value.updaterow(1, { firstname: 'New Name' });
});
</script>
|
|
clearselection
# |
None
|
None
|
Clears the selection.
<template>
<JqxGrid ref="myGrid" :width="850" :source="source" :columns="columns" :autoheight="true" />
</template>
<script setup>
import { onMounted, ref } from 'vue';
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.vue';
const myGrid = 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(() => {
myGrid.value.clearselection();
});
</script>
|
|
getselectedrowindex
# |
None
|
Number
|
The expected selection mode is 'singlerow', 'multiplerows' or 'multiplerowsextended'
Gets the bound index of the selected row. Returns -1, if there's no selection.
<template>
<JqxGrid ref="myGrid" :width="850" :source="source" :columns="columns" :autoheight="true" />
</template>
<script setup>
import { onMounted, ref } from 'vue';
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.vue';
const myGrid = 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 = myGrid.value.getselectedrowindex();
});
</script>
|
|
getselectedrowindexes
# |
None
|
Array
|
The expected selection mode is 'singlerow', 'multiplerows' or 'multiplerowsextended'
Gets the indexes of the selected rows. Returns an array of the selected rows.
<template>
<JqxGrid ref="myGrid" :width="850" :source="source" :columns="columns" :autoheight="true" />
</template>
<script setup>
import { onMounted, ref } from 'vue';
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.vue';
const myGrid = 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 = myGrid.value.getselectedrowindexes();
});
</script>
|
|
getselectedcell
# |
None
|
Object
|
The expected selection mode is 'singlecell', 'multiplecells' or 'multiplecellsextended'
Gets the selected cell. The returned value is an object with two fields: 'rowindex' - the row's bound index and 'datafield' - the column's datafield.
<template>
<JqxGrid ref="myGrid" :width="850" :source="source" :columns="columns" :autoheight="true" />
</template>
<script setup>
import { onMounted, ref } from 'vue';
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.vue';
const myGrid = 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 = myGrid.value.getselectedcell();
});
</script>
|
|
getselectedcells
# |
None
|
Array
|
The expected selection mode is 'singlecell', 'multiplecells' or 'multiplecellsextended'
Gets all selected cells. Returns an array of all selected cells. Each cell in the array is an object with two fields: 'rowindex' - the row's bound index and 'datafield' - the column's datafield.
<template>
<JqxGrid ref="myGrid" :width="850" :source="source" :columns="columns" :autoheight="true" />
</template>
<script setup>
import { onMounted, ref } from 'vue';
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.vue';
const myGrid = 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 = myGrid.value.getselectedcells();
});
</script>
|
|
showSidePanel
# |
selector, width, callbackFn
|
None
|
Shows the Grid's side panel. Pass the element's id when you call the method.
<template>
<JqxGrid ref="myGrid"
:width="850" :source="dataAdapter" :columns="columns" :autoheight="true"
/>
</template>
<script setup>
import { onMounted, ref } from "vue";
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.vue';
const myGrid = ref(null);
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'
}]);
onMounted(() => {
myGrid.value.showSidePanel('Customer details');
});
</script>
|
|
closeSidePanel
# |
None
|
None
|
Closes the Grid's side panel.
<template>
<JqxGrid ref="myGrid"
:width="850" :source="dataAdapter" :columns="columns" :autoheight="true"
/>
</template>
<script setup>
import { onMounted, ref } from "vue";
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.vue';
const myGrid = ref(null);
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'
}]);
onMounted(() => {
myGrid.value.closeSidePanel();
});
</script>
|
|
selectcell
# |
rowBoundIndex, dataField
|
None
|
The expected selection mode is 'singlecell', 'multiplecells' or 'multiplecellsextended'
Selects a cell.
<template>
<JqxGrid ref="myGrid" :width="850" :source="source" :columns="columns" :autoheight="true" />
</template>
<script setup>
import { onMounted, ref } from 'vue';
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.vue';
const myGrid = 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(() => {
myGrid.value.selectcell(1, 'firstname');
});
</script>
|
|
selectallrows
# |
None
|
None
|
The selection mode should be set to: 'multiplerows' or 'multiplerowsextended'
Selects all Grid rows.
<template>
<JqxGrid ref="myGrid" :width="850" :source="source" :columns="columns" :autoheight="true" />
</template>
<script setup>
import { onMounted, ref } from 'vue';
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.vue';
const myGrid = 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(() => {
myGrid.value.selectallrows();
});
</script>
|
|
selectrow
# |
rowBoundIndex
|
None
|
The expected selection mode is 'singlerow', 'multiplerows' or 'multiplerowsextended'
Selects a row.
<template>
<JqxGrid ref="myGrid" :width="850" :source="source" :columns="columns" :autoheight="true" />
</template>
<script setup>
import { onMounted, ref } from 'vue';
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.vue';
const myGrid = 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(() => {
myGrid.value.selectrow(1);
});
</script>
|
|
unselectrow
# |
rowBoundIndex
|
None
|
The expected selection mode is 'singlerow', 'multiplerows' or 'multiplerowsextended'
Unselects a row.
<template>
<JqxGrid ref="myGrid" :width="850" :source="source" :columns="columns" :autoheight="true" />
</template>
<script setup>
import { onMounted, ref } from 'vue';
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.vue';
const myGrid = 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(() => {
myGrid.value.unselectrow(1);
});
</script>
|
|
unselectcell
# |
rowBoundIndex, dataField
|
None
|
The expected selection mode is 'singlecell', 'multiplecells' or 'multiplecellsextended'
Unselects a cell.
<template>
<JqxGrid ref="myGrid" :width="850" :source="source" :columns="columns" :autoheight="true" />
</template>
<script setup>
import { onMounted, ref } from 'vue';
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.vue';
const myGrid = 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(() => {
myGrid.value.unselectcell(1, 'firstname');
});
</script>
|
|
getcolumnaggregateddata
# |
dataField, aggregates
|
String
|
Gets the aggregated data of a Grid column. Returns a JSON object. Each field name is the aggregate's type('min', 'max', 'sum', etc.).
<template>
<JqxGrid ref="myGrid" :width="850" :source="source" :columns="columns" :autoheight="true" />
</template>
<script setup>
import { onMounted, ref } from 'vue';
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.vue';
const myGrid = 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 = myGrid.value.getcolumnaggregateddata();
});
</script>
|
|
refreshaggregates
# |
None
|
None
|
Refreshes the Aggregates in the Grid's status bar.
<template>
<JqxGrid ref="myGrid" :width="850" :source="source" :columns="columns" :autoheight="true" />
</template>
<script setup>
import { onMounted, ref } from 'vue';
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.vue';
const myGrid = 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(() => {
myGrid.value.refreshaggregates();
});
</script>
|
|
renderaggregates
# |
None
|
None
|
Renders the aggregates in the Grid's status bar.
<template>
<JqxGrid ref="myGrid" :width="850" :source="source" :columns="columns" :autoheight="true" />
</template>
<script setup>
import { onMounted, ref } from 'vue';
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.vue';
const myGrid = 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(() => {
myGrid.value.renderaggregates();
});
</script>
|
|
exportdata
# |
dataType, fileName, exportHeader, rows, exportHiddenColumns, serverURL, charSet
|
Any
|
Exports all rows loaded within the Grid to Excel, XML, CSV, TSV, HTML or JSON.
var data = $("#jqxgrid").jqxGrid('exportdata', 'json');
<template>
<JqxGrid ref="myGrid" :width="850" :source="source" :columns="columns" :autoheight="true" />
</template>
<script setup>
import { onMounted, ref } from 'vue';
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.vue';
const myGrid = 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 = myGrid.value.exportdata('xls', 'grid.xls');
});
</script>
|
|
exportview
# |
dataType, fileName
|
Any
|
Exports the view Grid to Excel, PDF, XML, CSV, TSV, HTML or JSON.
var data = $("#jqxgrid").jqxGrid('exportview', 'xlsx', 'grid');
<template>
<JqxGrid ref="myGrid"
:width="850" :source="dataAdapter" :columns="columns" :autoheight="true"
/>
</template>
<script setup>
import { onMounted, ref } from "vue";
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.vue';
const myGrid = ref(null);
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'
}]);
onMounted(() => {
const value = myGrid.value.exportview('xlsx', 'grid');
});
</script>
|
|
openColumnChooser
# |
columns, header
|
None
|
Opens the Grid's column chooser
<template>
<JqxGrid ref="myGrid"
:width="850" :source="dataAdapter" :columns="columns" :autoheight="true"
/>
</template>
<script setup>
import { onMounted, ref } from "vue";
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.vue';
const myGrid = ref(null);
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'
}]);
onMounted(() => {
myGrid.value.openColumnChooser();
});
</script>
|
|
getstate
# |
None
|
Object
|
Gets the Grid's state. the getstate method gets the following information: 'sort column, sort order, page number, page size, applied filters and filter row values, column widths and visibility, cells and rows selection and groups.
- width - the Grid's width.
- height - the Grid's height.
- pagenum - the Grid's page number.
- pagesize - the Grid's page size.
- pagesizeoptions - the Grid's page size options - an array of the available page sizes.
- sortcolumn - the Grid's sort column. The value is the column's datafield or null, if sorting is not applied.
- sortdirection - JSON object with two boolean fields: 'ascending' and 'descending'.
- filters - the applied filters. See the 'getfilterinformation' method.
- groups - the Grid's groups array which contains the grouped columns data fields.
- columns - an array of Columns. Each column in the array has the following fields:
- width - column's width.
- hidden - column's visible state.
- pinned - column's pinned state.
- groupable - column's groupable state.
- resizable - column's resizable state.
- draggable - column's draggable state.
- text - column's text.
- align - column's align.
- cellsalign - column's cells align.
<template>
<JqxGrid ref="myGrid" :width="850" :source="source" :columns="columns" :autoheight="true" />
</template>
<script setup>
import { onMounted, ref } from 'vue';
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.vue';
const myGrid = 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 = myGrid.value.getstate();
});
</script>
|
|
loadstate
# |
stateobject
|
None
|
Loads the Grid's state. the loadstate method loads the following information: 'sort column, sort order, page number, page size, applied filters and filter row values, column widths and visibility, cells and rows selection and groups.
<template>
<JqxGrid ref="myGrid" :width="850" :source="source" :columns="columns" :autoheight="true" />
</template>
<script setup>
import { onMounted, ref } from 'vue';
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.vue';
const myGrid = 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(() => {
myGrid.value.loadstate();
});
</script>
|
|
savestate
# |
None
|
Object
|
Saves the Grid's current state. the savestate method saves the following information: 'sort column, sort order, page number, page size, applied filters and filter row values, column widths and visibility, cells and rows selection and groups.
<template>
<JqxGrid ref="myGrid" :width="850" :source="source" :columns="columns" :autoheight="true" />
</template>
<script setup>
import { onMounted, ref } from 'vue';
import JqxGrid from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxgrid.vue';
const myGrid = 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 = myGrid.value.savestate();
});
</script>
|