admin管理员组

文章数量:1125415

What is a better way to get the X position of the Nth column in a DataGridView?

I try:

int selectedColumnIndex = dataGridView1.Columns["Revision"].Index;
var columnRectangle = dataGridView1.GetColumnDisplayRectangle(selectedColumnIndex, false);

// Get the X position of the column
int columnXPosition = columnRectangle.X;

本文标签: cDataGridView Get the X position of the Nth columnStack Overflow