Hey there,
This feature seems incomplete. I don't have the tools available in the API to get the filtering results I need. When specifying this feature, a column setting property should include a template. This template should return the value that the filtering feature should compare the filter against. For instance:
I have a grid with three columns: - Customer Id - Customer Name - Customer Total
Configuration: - Customer Id is a hidden column. - Customer Name has a template "${CustomerId} - ${CustomerName}". - Filtering is enabled for all visible columns. - Filtering on Customer Name will only filter against Customer Name, excluding the ID which is also visible to the user.
It would be optimal to provide a column setting template where I can specify the filtering template "${CustomerId} - ${CustomerName}" so it can filter accordingly. I do understand that I can provide a property in my data model to include a combined value of these two properties but the problem lies in complex custom data templates. Perhaps I want to render HTML in my template. The filtering doesn't know to exclude it. But providing a template for filtering would provide the engine a means of understanding how to filter my results. For instance:
$(".selector").igGrid({ columns: [ { key: "AccountId", dataType: "number", headerText: "Account Id" }, { key: "Customer", dataType: "string", headerText: "Customer", template: "<input type="checkbox" value="${Customer}" data-value="${AccountId}" /> ${Customer}" } ], features: [{ name: "Filtering", columnSettings: [ { columnKey: "AccountId", allowFiltering: false }, { columnKey: "Customer", allowFiltering: true, template: "${Customer}" } ] }]});
As it stands, filtering would include the HTML of the checkbox when it shouldn't but there isn't a means to tell it otherwise. Please provide us with a means. Even if it that is an event with the current record along with its column key and index. That would go a long ways than the current implementation.
Doooooo eeeeeet!Thanks!
Posted this idea on http://ideas.infragistics.com. Do vote for it if it helps you.
http://ideas.infragistics.com/forums/211535-ignite-ui/suggestions/5448684-iggridfiltering-customer-filter-template