对于
dataGrid.SetDataBinding(ds, "MainInfo");
我还是第一次看到.
提问:
怎样让dataGrid只显示要select的列啊!
我给它好几次命令,但是以前检索的还是留在dataGrid里
OleDbDataAdapter da = new OleDbDataAdapter(select,OleCon);
DataSet ds = new DataSet();
da.Fill(ds, "MainInfo");
select 我给的是 select id,name,%% from table
%%是随时更改的,通过一个下拉列表来更改
执行:
select id,name,sex from table
da.Fill(ds, "Users");
然后:
select id,name,country from table
da.Fill(ds, "Users");
这样dataGrid就还有sex这1列
怎样实现刷新啊?
浙公网安备 33010602011771号