title: How to check the header text of a DataGridView column of a selected cell in Visual Basic
body: <p>I have a datagridview in visual basic. I want to adjust a sub to accomplish the following task: When a user selects a cell in my DGV (Cell Click event) I want to check the column header text. And in my example, if the header text of the column is "MinEquation" then I want to execute some event. The reason I cannot use column indices is that I create these DGV's dynamically in a loop with different datatables. How can I do a comparison operator on the column header text of my selected cell. Thank you!</p>