这是我的代码:
query = "SELECT DISTINCT TO_CHAR(date,'DD-Mon-YYYY')date, idNum, name FROM customer ORDER BY date, idNum, name";
dset = dbCon.ExecuteDataSet(query);
grdSat.DataSource = query;
grdSat.DataBind();
我在这里遇到错误:
grdSat.DataBind();
当我调试编码时,这就是我得到的:
NotSupportedException未由用户代码
处理答案 0 :(得分:1)
我认为您应该将dataset
分配给网格。像这样:
grdSat.DataSource = dset;
grdSat.DataBind();