DataSet ds = new DataSet();
DataTable dt = new DataTable("cdqbiao");
dt.Columns.Add(new DataColumn("zim", typeof(string))); //定义列:字母
dt.Columns.Add(new DataColumn("xuhao", typeof(string))); //定义列:序号
myViews = new DataView(dt, "", "xuhao ASC", DataViewRowState.CurrentRows);
DataRowView viRow;
viRow = myViews.AddNew();
viRow["zim"] = "a";
viRow["xuhao"] = "10";
viRow = myViews.AddNew();
viRow["zim"] = "b";
viRow["xuhao"] = "11";
viRow = myViews.AddNew();
viRow["zim"] = "c";
viRow["xuhao"] = "12";
viRow = myViews.AddNew();
viRow["zim"] = "d";
viRow["xuhao"] = "13";
viRow = myViews.AddNew();
viRow["zim"] = "e";
viRow["xuhao"] = "14";
viRow = myViews.AddNew();
viRow["zim"] = "f";
viRow["xuhao"] = "15";
viRow = myViews.AddNew();
viRow["zim"] = "g";
|