DataTable

排序 

DataTable dtlDOHFLI = (DataTable)_pkgBusiData.OutData["FDWDOHLIST"];
        if (dtlDOHFLI.Rows.Count > 0)
        {
            DataView dv = dtlDOHFLI.DefaultView;
            dv.Sort = "DOHID Desc";
            DataTable dt = dv.ToTable();
            gvDohList.ExtRecordCount = dt.Rows.Count;
            gvDohList.ExtDataBind(dt);
        }

//筛选

DataTable dtlFLILsit = (DataTable)_pkgBusiData.OutData["FDWFLILIST"];
        if (dtlFLILsit.Rows.Count > 0)
        {
            DataTable dtNew = dtlFLILsit.Clone(); //复制数据源的表结构
            DataRow drs = dtlFLILsit.Rows[0];
            dtNew.ImportRow(drs);
            gvFliList.ExtRecordCount = dtNew.Rows.Count;
            gvFliList.ExtDataBind(dtNew);
        }

 

posted on 2014-07-31 16:39  Haustbule  阅读(134)  评论(0编辑  收藏  举报