Is there a difference between DataTable.Clear and DataTable.Rows.Clear?

后端 未结 7 1573
天涯浪人
天涯浪人 2021-01-18 06:51

I recall there is a difference between some methods/properties called directly on the DataTable class, and the identically named methods/properties on the DataTable.Rows pro

7条回答
  •  余生分开走
    2021-01-18 07:35

    Do Below and Its working absolutely fine....

    DataRow[] d_row = dt_result.Select("isfor_report='True'");
    DataTable dt = dt_result.Clone();                
    foreach (DataRow dr in d_row)
    {
         dt.ImportRow(dr);
    }
    gv_view_result.DataSource = dt;
    gv_view_result.DataBind();
    

提交回复
热议问题