简体   繁体   中英

How to change the width of the index column/ left most coumn in datagridview

I want to change the width of the column indicated in the picture.(with question mark "?") What is the index or location of that column.

also, what is the name of that column?

I was able to change the width of other column by the below code.

dataGridView_A0.Columns[0].Width = 90;

在此处输入图像描述

You are looking for the grids RowHeadersWidth property... That particular column is referred to as the grids Row Headers Column.

dataGridView1.RowHeadersWidth = 90;

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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