且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何在Gridview中单击行索引列

更新时间:2023-01-29 16:37:40

hi

查看此链接是否可以提供帮助



http://msdn.microsoft.com/en-us/library/system.windows.forms.datagridviewcelleventargs.columnindex.aspx





e.ColumnIndex也适用于此。
hi
check this link may it will help

http://msdn.microsoft.com/en-us/library/system.windows.forms.datagridviewcelleventargs.columnindex.aspx


e.ColumnIndex will also work for this.


访问此链接:

http://forums.asp.net/t/1537390.aspx



希望它有用..



谢谢
visit this link:
http://forums.asp.net/t/1537390.aspx

Hope its helpful..

Thanks


嗨Ravi,



Hi Ravi,

Please don't forget to add the DataKeyName="PrimaryKeyField" property in the grid view like

<asp:gridview id="Gridview1" run="server" datakeynames="CustID" >







int uid = (int)gvDeleteUser.DataKeys[gvDeleteUser.Rows.RowIndex].Value;









如有任何疑问,请检查并告知我们。



请制作如果它结算就解决了。



谢谢和问候

Suman Zalodiya





Please check it and let me know in case of any concerns.

And please make it as resolved if it resolves.

Thanks and Regards
Suman Zalodiya