如何在Windows应用程序中访问ID表单datagridview [英] how to access id form datagridview in windows application

查看:59
本文介绍了如何在Windows应用程序中访问ID表单datagridview的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Windows应用程序中开发应用程序,我使用datagrid来访问我使用以下代码的datagrid中的id;


I develop application in windows application I use datagrid to access id form the datagrid I use folowing code;


// Retrieve the first column from the selected row.
  int Id = int.Parse ( grdAddress[grdAddress.CurrentRowIndex, 0].ToString()



此代码有效.

但是问题是我在IDE中使用vs2010 DataGridView ,并且此代码在datagridview控件plz帮助中不起作用.



this code is work.

But Problem is I used vs2010 in the IDE DataGridView is there and this code is not working in datagridview control plz help.

推荐答案

solution

solution

int Id = grdAddress.currentrow.cells(0).value;



祝您编码愉快!
:)



Happy Coding!
:)


这篇关于如何在Windows应用程序中访问ID表单datagridview的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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