如何在DataGridView中获取SelectedRow的索引 [英] How can i get the index of the SelectedRow in a DataGridView

查看:72
本文介绍了如何在DataGridView中获取SelectedRow的索引的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好


一个小而且可能是一个简单的问题。


我如何获得DataGridView1.SelectedRow的索引?



Lars

解决方案

DataGridView.SelectedIndex .ToString();


Convert.ToInt32(DataGridView.SelectedIndex.ToString());


祝你好运。


Hi all

One small and probably a simple question.

How can i get the index of the DataGridView1.SelectedRow?

 

Lars

解决方案

DataGridView.SelectedIndex.ToString();

Convert.ToInt32(DataGridView.SelectedIndex.ToString());

Best of luck to you. 


这篇关于如何在DataGridView中获取SelectedRow的索引的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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