sometimes I want to hide buttons in a DataGridViewButtonColumn

后端 未结 9 1112
清歌不尽
清歌不尽 2020-12-20 15:50

I have a DataGridView which was the subject of a previous question (link). But sometimes the Button is null. This is fine. But if it is null, is th

9条回答
  •  长情又很酷
    2020-12-20 16:08

    Put the button to the right and ready

    DataGridViewCellStyle  dataGridViewCellStyle2 = new DataGridViewCellStyle();
    dataGridViewCellStyle2.Padding = new Padding(0, 0, 1000, 0);
    row.Cells["name"].Style = dataGridViewCellStyle2;   
    

提交回复
热议问题