t×tecexpressby TeKOcloud
DEv0.7.1
Data & views / VUE

TxColumn.

Interactive preview

DataGrid column configuration; it has no standalone UI.

PropTypeDefaultMeaning
dataFieldstringrequiredField name; must be unique within a grid.
captionstring | undefinedundefinedVisible field/column caption.
widthstring | number | undefinedundefinedWidth; Vue numbers use pixels, Flutter uses logical pixels.
allowSortingboolean | undefinedtrueAllows sorting this column.
allowFilteringboolean | undefinedtrueAllows filtering this column.
cellTemplatestring | undefinedundefinedVue slot name for custom cells.
visibleboolean | undefinedtrueControls visibility.
alignment"center" | "left" | "right" | undefinedundefinedContent alignment.
vue
<script setup lang="ts">
import { TxColumn, TxDataGrid } from '@tekocloud.de/tecexpress'
import '@tekocloud.de/tecexpress/themes/index.css'
const rows = [{ id: 1, name: 'Alex' }]
</script>

<template>
  <TxDataGrid :data-source="rows" key-expr="id">
    <TxColumn data-field="name" caption="Name" cell-template="nameCell" />
    <template #nameCell="{ value }"><strong>{{ value }}</strong></template>
  </TxDataGrid>
</template>