在datagridview中选择frist行 [英] select the frist row in datagridview

查看:68
本文介绍了在datagridview中选择frist行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我写这段代码时

GridViewPays.CurrentCell = GridViewPays.Rows [1] .Cells [0];

它选择第二行

但当我将indexrow更改为0

GridViewPays.CurrentCell = GridViewPays.Rows [0] .Cells [0];

它不起作用

什么'问题?我在相同的datagridview中有数字序列列

when I write this code
GridViewPays.CurrentCell = GridViewPays.Rows[1].Cells[0];
it selects the second row
but when I change indexrow to 0
GridViewPays.CurrentCell = GridViewPays.Rows[0].Cells[0];
it doesn't work
what' the problem? I have number sequence column in same datagridview

推荐答案

尝试

try
GridViewPays.Rows[0].Selected = true;





在此处查找更多内容 [ ^ ]


这篇关于在datagridview中选择frist行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆