I am building my filterconditions in code. I am getting some unexpected records in my results.
Code is like this:
Dim filter_terr As Integer
Dim colfilter As ColumnFilter
Dim column As UltraGridColumn
band.ColumnFilters.ClearAllFilters()
filter_terr = Trim(uc_territory.SelectedRow.Cells("_TRCODE").Value)
colfilter = band.ColumnFilters("PTRTRY")
column = band.Columns("PTRTRY")
colfilter.FilterConditions.Add(New Comm_FilterCondition(column, FilterComparisionOperator.Match, filter_terr))
PTRTRY is the column in the grid (grid is attached to a datasource). The PTRTRY column comes in as datatype.Decimal.
_TRCODE is a 2 digit code (1 to 99).
_TRCODE is a column in a dropdown box. It is defined as datatype.Decimal.
When I pick "1" from the dropdown, the code sets the new filter and gives me 1's , 11's and 21's.
When I pick "2" , I get 2's and 21's.
When I pick "9" , I get 9's and 99's.
I thought the "Match" operator would look for and exact match. If the column data and the comparison value are both Decimal, how can it be picking an exact match and give me these results. It acts like it is using the "Like" operator or the "Contains" operator.
I am using 2008.1 version.
Anyone have any ideas of what I am missing?
Got it!!
the class was overriding the match with contains.
didn't see that.