简体   繁体   English

C# WinForm DataGridView 标题

[英]C# WinForm DataGridView Header

I need to find in the header of DataGridView the column number by column name.我需要DataGridView的标题中按列名查找列号。 For example: Write "Address" and get 3 (in the attached example picture) DataGridView例如:写“地址”并得到3(在所附的示例图片中) DataGridView

var urColumnPosition =  Datagridview.Columns["Address"].Index + 1

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM