Skip to main content

api.getColumn(id)

Description

Gets an object with the column configuration

Usage

api.getColumn(id): object;

Parameters

  • id - the id of a column

Returns

The method returns an object with the column parameters:

Example

The example below shows how to output the "city" column configuration to the console:

<script>
import { getData } from "./common/data";
import { Grid } from "@svar-ui/svelte-grid";

const { data, columns } = getData();

function init(api){
const column = api.getColumn("city");
console.log("Column:", column);
}
</script>

<Grid {data} {columns} {init} />

Related articles: