By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
458,224 Members | 1,233 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 458,224 IT Pros & Developers. It's quick & easy.

Two data grids comparing values

P: n/a
I have a datagrid that contains a list of decimal values. I want to compare
the values of one datatable to the other datatable and update my data grid.
For example my first datatable has the following data

Sample Number Location Reading1 Reading2 Reading3
12345 1 22.3 21.2
31.5 28.3 54.2
12345 2 21.4 23.2
33.8 31.9 49.9

In my second table I have the following

Reading Min Max
1 20.3 24.1
2 20.8 21.1
3 30.1 32.2
4 14.1 16.8
X 49.1 55.2
What I would like to see in the data grid would be the readings and if the
reading is low, put the grid cell background in one color (yellow) and if it
is high, but the cell background in another color (red). The number of rows
in the first datatable will rarely be over 50 rows. The second table to
compare high low values will be around 20 rows. I have created a procedure
to go through every row, grab the value, look up the value in the second
table, and put the results in an array with the reading, followed by a 0,1,2
to indicate low, in range, high.

Sample 12345 Results

I then want to parse the array and populate a table with the results. Would
it be easier to put the first table into a Datagrid, then move through each
cell and compare values? Any help would be great.

Aug 2 '07 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.