Hello Infragistics Team,
I would like to use IgGrid in my Angular2 Project.
I would like to show some custom button or Checkbox or other HTML control in my column based on some data e.g. boolean value shown with checkbox.
I have not found any possible Column template option in the examples for IgGrid.
Do IgGrid Angular2 Component support Column templating? If yes then how can we do that.
Awaiting for your response.
Regards,
Jeetendra
Hello Jeetendra,
Thank you for posting into our community!
We have a sample, which demonstrates the usage of a column template into the grid. Unit Price column is using a template.
Please review it here. You can use the same approach to create the checkbox. Also keep in mind that the grid has checkbox format, which might be very useful for your scenario.
Hi Deyan,
I'm trying to add a button in a template column in an IgGrid component in an Angular2 application. I've examined the examples above but can't see how to bind a click event to the button. I've tried an inline template but the click event isn't binding.
columns: [ .......
{ key: "Delete", headerText: "", dataType: "string", width: "20%", template: "<button class='btn- btn-primary btn-sm' (click)='deleteRecord(${id})'>Delete</button>" } ]
I couldn't get it working with the JQuery template approach either. Can you recommend a solution?