如何把List<T>转换为DataGridView的一列 List<string> listTxt =new List<string>()如果listTxt的数据是 1,2,3,4,5我想把这些listTxt直接转换为DataGridView的某一列的数据,请问各位前辈如何实现呢?谢谢! 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 直接用循环有点慢。int i=0;foreach(string s in allTagText){ if(!listTxt.Contains(s)){ listTxt.Add(s); dgView.Rows.Add(); dgView.Rows[i++].Cells[1].Value=s; }} 我觉得用FOR EACH语句应该是很好的方法了 走着瞧着哦!一年中最值得关注的事莫非于此 inputPanel1.CurrentInputMethod = inputPanel1.InputMethods[0]; 麻烦兄弟们看看,这个功能怎么实现!~ 无刷新技术 SharpZipLib壓縮問題高手進 发的帖子找了半天也没找到 关于判断按钮上面显示的图片问题!! 这到底是一个什么样的问题,大家都来看看 datagrid问题:中文字段名 Index(索引符)如何用,谁给我一个例子? Winform ComBox的问题 DevExpress.XtraCharts.ChartControl 如何控制纵向和横向打印?
int i=0;
foreach(string s in allTagText){
if(!listTxt.Contains(s)){
listTxt.Add(s);
dgView.Rows.Add();
dgView.Rows[i++].Cells[1].Value=s;
}
}