且构网

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

Windows应用程序中的超链接数据网格视图

更新时间:2022-05-26 03:46:35

您***的选择是单击单元格时,检查代码中的列以仅在单击超链接时做出响应.

您的错误在于演员吗?尝试在Value.ToString上使用int.TryParse,它将完全转换.另外,请尝试使用调试器来查看所获得的价值以及为什么它无法按现状进行转换.强制转换不会转换,只会强制转换.
Your best bet is when the cell is clicked, check the column in your code to respond only if the hyperlink was clicked.

Your error is in the cast ? Try using int.TryParse on Value.ToString, that will convert it if at all posslble. Also, try using your debugger to see what value you''re getting and why it won''t cast as it stands. A cast does not convert, it only casts.