I am trying to display a textfield in a column of ng2-smart-table component.
Referred ng2-smart-table documentation but still textfield is not showing. Could you please help to solve this issue.
In component.ts file:
setting = {
multimode:true,
hideSubHeader:true,
actions: false,
columns: {
NAME:
{
title: 'Name'
},
VALUE: {
title: 'Value',
type:'text',
editor:{
type:'text'
}
}
},
attr:
{
class: 'table table-bordered'
}
}
In component.html file:
<ng2-smart-table [settings]="setting" [source]="ConfigureSource" ></ng2-smart-table>
In ConfigureSource.ts file:
export const ConfigureData: Array<any> = [
{
"Name": "John",
"Value": ""
},
{
"Name": "Sam",
"Value": ""
}
];
try to set the actions:
actions: { edit: true, position: 'right' }
and the column editable to true