日期:2014-05-18  浏览次数:20871 次

绑定到dataGridview多出现了两列额
SQL code

select singer_id,singertype_name,singer_name,singer_gender,singer_description  from singer_info,singer_type where singer_name='bobo' and singertype_name=(select singertype_name from singer_type where singertype_id='1')


这样写的查询 但是 用list 绑定到datagridview 就多显示了2列
这怎么事

------解决方案--------------------
是不是自动生成列没关啊?
dataGridView1.AutoGenerateColumns = false;
------解决方案--------------------
探讨

C# code

public List<Singer_info> Select(string name, string id)
{

List<Singer_info> infoList = new List<Singer_info>();
StringBuilder sb = new StringBuil……