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

Only view rows in datagrid that meet a certain condition

$
0
0

One of the columns in my datagrid (dataGridView1) is called DatePaid and on button click i.e:

private void viewOverdue_Click(object sender, EventArgs e)
{
   // details here
}

I want it to show all rows in the datagrid that are 2 weeks or older in the DatePaid column (using the variable cRentStart as a starting point - which is a date in itself in the dd/mm/yyy format). All dates have to be in the format dd/mm/yyyy.



Viewing all articles
Browse latest Browse all 2535

Trending Articles



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