datagridview 中改变行的位置

xiaxy1 2009-01-07 01:14:05
datagridview 中改变行的位置
dataGridView3.Rows[i] = 0;后面没有属性DisplayIndex来设置
...全文
105 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
xiaxy1 2009-01-07
  • 打赏
  • 举报
回复
[Quote=引用 1 楼 h_w_king 的回复:]
DataGridViewRow r = this.dataGridView1.Rows[3];
this.dataGridView1.Rows.RemoveAt(3);
this.dataGridView1.Rows.Insert(0, r);
将第四行移到第一行.
[/Quote]
ok,搞定,结贴去
xiaxy1 2009-01-07
  • 打赏
  • 举报
回复

DataRow r = ds.Tables["glass"].rows[]

好像ds.Tables["glass"]后面打点出来rows不能制定具体的行数,请问怎么回事啊
xiaxy1 2009-01-07
  • 打赏
  • 举报
回复
[Quote=引用 1 楼 h_w_king 的回复:]
DataGridViewRow r = this.dataGridView1.Rows[3];
this.dataGridView1.Rows.RemoveAt(3);
this.dataGridView1.Rows.Insert(0, r);
将第四行移到第一行.
[/Quote]



我的是多行,而且行数不确定哦,好像有点麻烦吧
h_w_king 2009-01-07
  • 打赏
  • 举报
回复
DataGridViewRow r = this.dataGridView1.Rows[3];
this.dataGridView1.Rows.RemoveAt(3);
this.dataGridView1.Rows.Insert(0, r);
将第四行移到第一行.

110,538

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术 C#
社区管理员
  • C#
  • Web++
  • by_封爱
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

让您成为最强悍的C#开发者

试试用AI创作助手写篇文章吧