This works
<kendo-grid :data-source="localDataSource" :columns="columnsTest[1]"></kendo-grid>
Vue:
columnsTest: [
[{
'field': id
'title: 'ID'
}],
[{
'field': id
'title: 'ID'
}]
]
This does not work
<kendo-grid :data-source="localDataSource" :columns="columns"></kendo-grid>
Vue:
columns: [
{
'field': id
'title: 'ID'
},
{
'field': product
'title: 'Product'
}
]
I just check if the object has a title and copy the objects from the array to a new array, columns.
but the title is not shown, just the table name as if a never used on the grid.
Any tips? The reason for this is to only show columns that have a title from the backend.
5 Answers, 1 is accepted
On the following StackBlitz example you can find a simple Grid implementation, where the column configuration is defined through the :columns prop as shown in the provided code snippet. With it, the respective columns are being correctly rendered when the Grid component is initialized.
Also, could you please confirm if you are able to reproduce the issue with the above example? If this is the case, please elaborate a bit more on what is the expected result and modify the linked example if needed.
In addition to the above, I would also suggest to take a look at the newly added Grid Column demos, where different configuration scenarios are being demonstrated:
Regards,
Dimitar
Progress Telerik
Thank Dimitar
The code example helped, not sure what was wrong, but rewrote it and it worked.
Hello Kuku,
Could you elaborate further on what is the exact issue that you are facing? Also, it would be of great help if you could provide a StackBlitz example where the Grid configuration used can be examined.
Regards,
Dimitar
Progress Telerik