I have some code which sets the value of cells in a DataRow by column name i.e.
row[\"ColumnName\"] = someValue;
I want to also set the val
You can simply use DataColumnCollection.IndexOf
So that you can get the index of the required column by name then use it with your row:
row[dt.Columns.IndexOf("ColumnName")] = columnValue;