0

I'm using the angular ui datagrid framework and I need to filter values with unique identifiers. I have the following code:

var column = 
{name: 'distrito', field: 'distrito.id', type: 'number', 
displayName: 'Distrito', enableCellEdit: true, width: '135', 
cellFilter:'listagemFacesFilter:editDropdownOptionsArray:editDropdownIdLabel:editDropdownValueLabel:row.entity.distrito.distrito', 
editableCellTemplate: 'ui-grid/dropdownEditor', 
editDropdownIdLabel: 'id', editDropdownValueLabel: 'distrito', editDropdownOptionsArray: $scope.listaDistritos, 
filter: {type: uiGridConstants.filter.SELECT, selectOptions: $scope.listaDistritosFiltro}
};

the $scope.listaDistritosFiltro is a arraylist with id (int) and value (function returns arraylist)

The selection, filter all id's with example: id= 1 and id =12 at the same time and i need only results with id=1 or id=12.

I think the selection filter is filtering with string type.

Someone can help me, please.

Thanks. Best Regards, SMDC

1
  • Can you try to format your code to make it easier to read Commented Jun 12, 2016 at 20:47

1 Answer 1

1

You are probably looking for this filter -

 type: uiGridConstants.filter.EXACT
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.