views:

25

answers:

1

I have a datatable that contains rows of transaction data for multiple users. Each row includes UserID and UserTransactionID columns. What would I use for as a RowFilter in the tables DefaultView to only show the row for each user that has the highest UserTransactionID value?

sample data and results

UserID  UserTransactionID PassesFilter
1       1                 False
1       2                 False
1       3                 True
2       1                 True
3       1                 False
3       2                 True

My data is orginating in a non-SQL source, the DataTable is being created to be bound to a DataGridView so I can't make changes to a query being used to get the data initially.

+1  A: 

Create a derive table (with a LINQ query). Filtering won't work here.

Henk Holterman
OK. It was easier for me to just change the method creating the DataTable to make the selection there...
Dan Neely