Reputation: 89
I should only take some items. Take groups that do not contain Z4TC in the Model tag
The excel file schema is as follows
<ConfigRegolatori>
<Id>6</Id>
<Address>92</Address>
<Category>90</Category>
<Mode>TC_K</Mode>
<Model>Z4TC</Model>
<Name>KT6</Name>
<Port>COM1</Port>
<Channel>2</Channel>
<LowerEndScale>0</LowerEndScale>
<UpperEndScale>400</UpperEndScale>
<NegativeGradient>10</NegativeGradient>
<PositiveGradient>10</PositiveGradient>
<PercX10>false</PercX10>
<ConfigRegolatori>
<Id>7</Id>
<Address>7</Address>
<Category>100</Category>
<Mode>TC_K</Mode>
<Model>M9_Servo</Model>
<Name>KT7</Name>
<Port>COM1</Port>
<Channel />
<LowerEndScale>0</LowerEndScale>
<UpperEndScale>400</UpperEndScale>
<NegativeGradient>10</NegativeGradient>
<PositiveGradient>10</PositiveGradient>
<PercX10>false</PercX10>
The code part is the following
dtConfReg = new DataTable();
dtConfReg.ReadXml(Principale.strPathConfig + "\\ConfigRegulators.xml");
dtConfReg.TableName = "ConfigReg";
bsouReg = new BindingSource();
bsouReg.DataSource = dtConfReg;
dgvwConfigReg.DataSource = bsouReg;
Thanks
Upvotes: 2
Views: 51