I feel like I must not be doing something right here. I have a DataTable and it's currently able to take my arguments using the DataTable.Rows.Add method, but when I use DataTable.Rows.InsertAt it throws an error
What I'm currently doing with no issues:
dt.Rows.Add(new object[] { txtCompID.Text, scan(TrimStart('0'), txtEtaNum.Text, txtBinLocation.Text });
What I want to do (so the insert happens at the top), which is throwing "Argument 1: Cannot convert from 'object[]' to 'System.Data.DataRow'"
dt.Rows.InsertAt(new object[] { txtCompID.Text, scan.TrimStart('0'), txtEtaNum.Text, txtBinLocation.Text }, 0);
InsertAtrequires a data row to be passed to it.