Finding max value in dataset

  • Thread starter Thread starter Dan
  • Start date Start date
D

Dan

I have a dataset with stock info Date, Open, Hi, Low, Close. How do I
determine the Max value of one column? How do I determine the max
value of all columns?

Thanks in advance - Dan
 
Dan,

To find the max value of one column, I would just create a dataview on
the datatable and then sort the datatable on the particular column in
descending order (set the Sort property). Once you have that, you can just
take the value from the first column in the first row and you will have your
max value.

To determine the max values of all columns, just do what is mentioned in
the previous paragraph across all columns.

Hope this helps.
 
Back
Top