范型集合用dataGridView现实时顺序与表的顺序不一致,
dataGridView1显示的是一种 再用dataGridView2显示又出现另一种顺序,
这是为什么呢?与什么有关啊?
dataGridView1显示的是一种 再用dataGridView2显示又出现另一种顺序,
这是为什么呢?与什么有关啊?
解决方案 »
- SQLite.NET 找不到表, Google 了好久了都不行.
- 水晶报表可以预览,一打印到打印机就报错
- xml替换节点
- 漏了,漏了.....
- 高分求:提取网页中的特定地址,且地址不能重复
- C# invoke 能向主线程反馈消息吗?
- 请问如何在<iframe>中动态加入链接
- 从流中获取数据构成图片时(Imange.fromSteam(stream s))发生GDI+一般性错误,请高手解决
- 求助:编写服务器socket侦听时,在发送完响应消息时,服务器一直处于忙碌(界面鼠标沙斗状)但还能处理客户请求
- 大家进来纠正一下错误,谢谢
- C# WinForm中 ReadProcessMemory读取中文问题
- winform gridview 单元格的值
while (dr.Read())
{
StudentBean sb = new StudentBean();
sb.StudentId = int.Parse(dr["studentId"].ToString());
sb.StudentNo = dr["studentNo"].ToString();
sb.StudentName = dr["studentName"].ToString();
sb.Gender = int.Parse(dr["gender"].ToString());
sb.Birthday = dr["birthday"].ToString();
sb.ClassID = int.Parse(dr["classId"].ToString());
sb.Status = int.Parse(dr["status"].ToString());
sb.Re = dr["re"].ToString();
stuList.Add(sb);
}
return stuList;
还可以这么做:
DataGridView1.Columns[5].DisplayIndex=0;//设置第五列的显示顺序为0,即首行