How can I check if a DataGridView contains column \"x\" and column \"x\" is visible?
DataGridView
All I have so far is below.
if (Dgv.Columns.Contain
Firstly verify if the column exists and then you verify its visibility.
Calling the column's property for a column that does not exist will crash.
if (dgv.Columns.Contains("Address") { if ( dgv.Columns["Address"].Visible ) { } }