This is my constructor,
new VisConfig(
string.Empty,
string.Empty,
new List<SensorConfig>()
{
new SensorConfig(
string.Empty, //DGV COl0
string.Empty, //DGV COl1
new List<CoveredTrafficLane>()
{
new CoveredLane(string.Empty) //DGV COl 2,3,4,5
},
new RseDevicePosition(
new ValueWithUnit<int>(0, "mm"), //DGV COl6
new ValueWithUnit<int>(0, "mm"), //DGV COl7
new ValueWithUnit<int>(0, "mm"), //DGV COl8
new ValueWithUnit<int>(0, "tenthOfDegree"), //DGV COl9
new ValueWithUnit<int>(0, "tenthOfDegree"), //DGV COl10
new ValueWithUnit<int>(0, "tenthOfDegree")), //DGV COl11
0, //DGV COl12
0) //DGV COl13
},
I’m trying to get the data from the DGV(winform) to this constructor.
Plase help me, how can i get the datagridvalue and fill it to the constructor.
If I understand right your question -> your constructor of DtuSensorConfig take data from one row of DataGridView.
So create List outside of VisConfig constructor and then pass this list there.