After i filter the DataGridView
to a specific value on button click using the code below:
private void btnFilter_Click(object sender, EventArgs e)
{
string StartDate = Convert.ToDateTime(dtp_StartDate.Value).ToString("HH:mm:ss.ff");
string EndDate = Convert.ToDateTime(dtp_EndDate.Value).ToString("HH:mm:ss.ff");
MyBindingSource.Filter = string.Format("([{0}] >= #{1}# AND [{0}] <= #{2}#)", "Time", StartDate, EndDate);
}
Now i need to write some code to handle the event when the user decides to clear all filters, thus allowing all data grid view rows to be displayed again:
private void btnFilter_Click(object sender, EventArgs e)
{
// I need to Remove All filters (including the one set in the previous event) Here.
}
This should be done in C#, Any Ideas?