Compare Rows in a DataGridView

DekaFlash

Well-known member
Joined
Feb 14, 2006
Messages
117
Programming Experience
1-3
Hi,

I have batches of 3 rows, what is the easiest way to compare these 3 rows to determine which row has the highest value in a specific column within these 3 rows please?

Thanks,

Best Regards,
BMM
 
The rows arent in the datagridview; thats just an optical illusion. Now, onto your query, I suggest instead that you make another column on the datatable, and set its .Expression property to:

MAX([column_you_want_to_find_the_max_of])


Ahh! Now every row has, in this column, the max value:

Val, Expr1
1, 4
2, 4
4, 4
3, 4


Very handy for databinding!
 

Latest posts

Back
Top