Filling grid data
To fill data in the grid, you can specify rows in RealGridVue and fill in values, and you can apply JSON and Array format values. For data in JSON format, values are filled in fields that match the data key and the created field name, and for data in array format, values are filled in sequentially according to the order of field creation in the two-dimensional array format.
<template>
<div style="width: 1000px; height: 400px">
<RealGridVue
ref="gridRef"
:rows="[['컬럼1데이터','컬럼2데이터'],
['컬럼1데이터','컬럼2데이터']]"
:auto-generate-field="true">
<RGDataColumn field-name="field1" :width="100" key="field1"></RGDataColumn>
<RGDataColumn field-name="field2" :width="100" key="field2"></RGDataColumn>
</RealGridVue>
</div>
</template>
When using json format data, the value is bound to the field whose field name and data key value match.
<template>
<div style="width: 1000px; height: 400px">
<RealGridVue
ref="gridRef"
:rows="[
{ field1: '컬럼1데이터', field2: '컬럼2데이터' },
{ field1: '컬럼1데이터', field2: '컬럼2데이터' },
]"
:auto-generate-field="true">
<RGDataColumn field-name="field1" :width="100" key="field1"></RGDataColumn>
<RGDataColumn field-name="field2" :width="100" key="field2"></RGDataColumn>
</RealGridVue>
</div>
<template>
You can see that data has been added to each column as shown below.