I have a form with a DataGridView
widget and I need to get the index of the column with the selected name.
For example, let's say that I have a table with 2 columns: Name, Surname. I need a way to get index of the column name. The problem is that it changes all the time depending on the DataSource
but that column always has the same name "Name".
Does anyone know how to solve the problem?