一个DataGridView有3列private void gvList_CellFormatting(object sender, DataGridViewCellFormattingEventArgs e)
{
if (e.ColumnIndex == 0)
            {}
}第一列的visible为false,在if (e.ColumnIndex == 0)设为断点时,显示的ColumnIndex 的值并没出现为0,而是直接为1,也就无法进入里面的判断语句了。
是否
CellFormatting的ColumnIndex 只针对visible为true的单元格