Pinning (frozen) of Columns/Rows
Component
<script setup lang="ts">
import { type Column, Filters, Formatters, OperatorType, SlickgridVue, SortDirection } from 'slickgrid-vue';
import { onBeforeMount, type Ref } from 'vue';
const gridOptions = ref<GridOption>();
const columnDefinitions: Ref<Column[]> = ref([]);
const dataset = ref<any[]>([]);
onBeforeMount(() => {
defineGrid();
});
function defineGrid() {
columnDefinitions.value = [];
gridOptions.value = {
alwaysShowVerticalScroll: false, // disable scroll since we don't want it to show on the left pinned columns
frozenColumn: 2, // number of pinned columns starting from the left
frozenRow: 3, // number of pinned columns starting from the top
}
}
</script>
<template>
<SlickgridVue gridId="grid1"
v-model:columns="columnDefinitions"
v-model:options="gridOptions"
v-model:data="dataset"
@onVueGridCreated="vueGridReady($event.detail)"
@onGridStateChanged="gridStateChanged($event.detail)"
/>
</template>Component
Component

Last updated