之前写DataGrid1.DataSource=null;没有用! 顺便问一下 "select * from where '+DropListDown.text+'='TextBox1.text'" 此句有何错误.请指正
如果你想根据droplistdown的值控制datagrid的显示,首先你将droplistdown的autopostback属性设置为true,然后sql语句应为: "select * from tablename where columnname='"+droplistdown.selecteditem.text+"'"; 根据sql生成dataset,绑定。希望对你有所帮助!
"select * from where "+DropListDown.text+"='"+TextBox1.text+"'"; 试一下?
之前写DataGrid1.DataSource=null;
顺便问一下
"select * from where '+DropListDown.text+'='TextBox1.text'"
此句有何错误.请指正
"select * from tablename where columnname='"+droplistdown.selecteditem.text+"'";
根据sql生成dataset,绑定。希望对你有所帮助!
试一下?