angularjs - ng-grid filter cell template column -
i created grid column defs , showfilter. 1 column use celltemplate manipulate output, based on value of field.
when try filter data, notice filter ignores column.
how filter columns grid, including column refers celltemplate?
this grid:
$scope.gridstatusoptions = { data: 'status', showfilter: true, columndefs: [{ field: 'name', displayname: 'name', cellfilter: '', celltemplate: '' }, { field: 'value', displayname: 'value', cellfilter: '', celltemplate: "<div class='ngcelltext' ng-class='col.colindex()'><span>{{formatstate(row.entity)}}</span></div>"}] }; regards
filters in ng-grid work on underlying data , not rendered dom of browser.
this has so, because if data coming server has prefiltered, paginated , sorted on server side.
if don't have (to filtered) fields in right format, transform on data , add preformated fields.
look @ answer here gave few days ago.
btw: if want format code in question select , hit ctrl-k. makes more readable.
Comments
Post a Comment