Hi guys, new to site - and fairly new to C#. So be gently.
I have an xml file containing the following:
<?xml version="1.0" encoding="utf-8" ?> <Arm> <Arm1> <Name> Flies </Name> <Weight> 18 </Weight> <Reps> 12 </Reps> </Arm1> </Arm>
The xml contains more that just the one Arm child. It contains Arm2, Arm3 - up to 10 with different attributes, ie weight reps and names.
On the application side, i have the user to decide how many arm exercises he wants (from 1-5). I then use random generator to pick a random number. I have a string value that adds "Arm" plus the random number. It then uses a while loop as per the number of arm exercies the user wants.
This will then grab the values from the xml based on the Datamember, ie.. Arm6
I can do this, but my two problems are so:
1. It loops fine, but the datagridview row is being overwritten, rather than it adding a new row. How do i keep the existing line and add a new row?
2. I have predefined headers for the datagridview with formatting and colurs and such. Is it possible to only bring through the inner text rather than it pull through the header values as well?
I can supply the sample C# code if needed. Or i can explain further. I have seen much reference to using DataTables but i cannot get a working example.