Skip to main content

selectedRows

Description

Optional. Marks rows as selected

Usage

selectedRows?: (string | number)[];

Parameters

An array of the IDs of the selected rows.

Example

The example below shows how to select rows at the initialization.

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

const { data, columns } = getData();

</script>

<template>
<Grid
:data="data"
:columns="columns"
:selectedRows="[11,12]" />
</template>

Related articles: select-row