DataView dv=new DatView(dt); //转成DataView
dv.RowFile=" [列名] = ‘值’ "; //过滤
DataTable dtsel=dv.ToTable(); //转成DataView
ColumnView View = (ColumnView)gridControl1.FocusedView;
if (!(View.PostEditor() && View.UpdateCurrentRow())) return; //防止漏选
DataView dvImport = new DataView(dt);
DataTable dtImport = dvImport.ToTable(true, new string[] { "ID", "NAME", "SEX"});
取dvImport中的ID、NAME、SEX列的distinct返回DataTable。