Answer the question
In order to leave comments, you need to log in
How to pass data to Revo Grid table component?
Good day.
I was looking for various solutions for displaying tables in an application on vue.
I came across a very good Revo Grid plugin
https://revolist.github.io/revogrid/guide/framewor...
Who is familiar with this plugin, please share your experience.
I need to display a component inside the cell and pass data received from the server via API to it.
The documentation makes it clear how to display the component in the column cells, but I still did not understand how to pass data to the component of each cell.
Here is the code
<template>
<div class="my-table">
<v-grid
:source="table.rows"
:columns="table.columns"
resize="true"
row-size="70"
></v-grid>
</div>
</template>
export default {
name: 'MyTable',
data() {
return {
table: {
columns: [
{
prop: 'name',
name: 'Название,
size: 320,
pin: 'colPinStart',
cellTemplate: VGridVueTemplate(CellNameAndComment),
},
{
prop: 'contractors',
name: 'Контрагенты',
size: 280,
},
],
rows: [
{
name: 'Название в колонке 1',
contractors: 'ООО "Ромашка 1"',
},
{
name: Название в колонке 2',
contractors: 'Ромашка 2',
},
],
},
}
}
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question