Quantcast
Channel: Windows Forms Data Controls and Databinding forum
Viewing all articles
Browse latest Browse all 2535

datatable.select doesn't always work

$
0
0

I have a datatable that has a checkbox column which corresponds to a checkbox in a datagridview I would like to be able to do 

foreach(datarow row in dt.select("Checked = 'true'")

{

}

but it gives all the checked rows minus the first one why is that?

In general I find that the .select doesn't always pick up on everything right away or ever, while the 

foreach(datarow row in dt.rows)
{
if(Convert.toboolean(row["Checked"]) == true)
}

catches everything. 


Debra has a question


Viewing all articles
Browse latest Browse all 2535

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>