Hi Team,
Have command columns been removed from Grid Native?
Previously I have used them with the wrapper component. In the native I tried the below:
return {
editingId: false,
columns: [
{field:'item_name'},
{field:'price'},
{field:'stock'},
{
editable: false,
command:[
{name:"destroy","text": "destroy", click: this.destroyItem}
]
}
]
};
I would expect a column to be rendered with a button for destroy and the click handler called on click. In the native component the grid is just showing an empty column with no buttons.
Thanks,
Eric.
I have been able to get this to work now using a cell property in the column definition and rendering a custom view component. Is this the proper approach?
EF.
Hi Eric.
Yes, this is the proper approach. Using the cell property and defining a custom column template is the way you can add commands to the Native Grid component.
For reference, here is a demo project from our documentation.
You are welcome!
Our Native Grid Documentation has a lot of different examples you can find useful.