All right... so it's been a while since I've worked with a DataGridView so bear with me. I had to google how you got data out of a TableAdapter, but it seems like it's straightforward.
According to the
MSDN article I found, TableAdapter.GetData gets you a DataTable for your DataGridView... and that's good enough for me.
So now you're looking for matches on the "quantity" column and want to do something to the clmImg column. No problem, first you need to search the table for a match. There's likely a few ways to do this...
1. Look up how to run an SQL query on a DataTable... I believe you can do this, try googling.
2. Use the DataTable.Select command
3. Manually search through the DataTable to find what you want...
I'll go through the 3rd option with you. I'm willing to bet it's not optimal, but when you play around with these objects like this, you get a better idea of how to use them, which is always a plus.
Basically, just go through the DataTable's rows and look for what you want, then assign the column you want. So basically...
- DataTable dt = new DataTable();
-
foreach (DataRow dr in dt.Rows)
-
{
-
if (dr["quality"] <condition>)
-
{
-
dr["clmImg"] = <whatever>;
-
}
-
}
Hopefully I got that right... and hopefully it helps. Good luck!