Navigation

Friday, 30 November 2012

Filter in DataSet

string filter= "CostumerID = 1 AND OrderCount > 2";
string filter1= "OrderCount DESC";
private void DS_Filter(string filter,string filter1)
{
    DataTable dt1 = dt.Clone();
   
    foreach(DataRow dr in dt.Select(filter,filter1))
    {
        dt1.ImportRow(dr);
    }
        dataGridView1.DataSource = dt1;
    
}

No comments:

Post a Comment