Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
115
Needed an example to set a template column on a IGnite UI grid with knockout binding
posted

Hi,

 

I m looking for an example to set up a template column ( button with click event handling)  on an Ignite UI grid which is already bound to a kncout model.

The primary problem i am facing is in setting the template with appropriate quotation marks for the unbound column . If we look at the History column in the code below you would be able to understand my problem.

 data-bind="igGrid: {
dataSource: vmDetails.actions,
autoGenerateColumns: false,
autoCommit: false,
primaryKey: 'Id',
columns: [
{ headerText: 'ActionID', key: 'Id', dataType: 'number'},
{ headerText: 'Action Description', key: 'ActionDescription', dataType: 'string'},
{ headerText: 'Target Action Date', key: 'TargetActionDate', dataType: 'date',format: 'dd-MMM-yyyy'},
{ headerText: 'Action Owner', key: 'ActionOwner',dataType: 'string'}, 
{ headerText: 'Completed Date', key: 'CompletedDate', dataType: 'date', format: 'dd-MMM-yyyy' },
{ headerText: 'Status', key: 'Status', dataType: 'number' },
{ headerText: 'History', key: 'Delete', unbound: true, template : '<button onclick='deleteRow(${ProductID})'>History</button>'},
{ headerText: 'Action Category', key: 'ActionCategory' , dataType: 'string' }
],

Regards,

Nilav Ghosh