【发布时间】:2016-12-02 08:41:51
【问题描述】:
我希望在只选择几个列时更改我的列的名称。
这是我的代码,用于选择列。
现在,我该如何更改他们的名字?
OleDbDataAdapter myadapt = new OleDbDataAdapter(mycommand);
myadapt.Fill(myset, "Properties");
DataTable tbSearchResult = myset.Tables["Properties"];
DataTable tbTemp = new DataTable();
tbTemp = tbSearchResult.DefaultView.ToTable(true, "DescriptionCities", "DescriptionSurface", "DescriptionBathroom", "DescriptionPrices", "DescriptionRooms", "DescriptionType");
GridView1.DataSource = tbSearchResult;
GridView1.DataBind();
【问题讨论】:
标签: c# sql asp.net datagridview