I'm hoping someone here can help me. I am very new to C# and programming in general and am stuck on the following after researching and trying different solutions for the past 2 weeks!
I'm trying to read from an XML file into datagridview. I also want to add extra data that a user inputs into 3 textboxes (an 'add data' button should update datagridview) I'd also like to be able to delete rows from datagridview. On exit, all data is saved into XML file. (I've attached the 'form' design)
The xml file is as follows:
<?xml version="1.0" encoding="utf-8"?>
<Orders_Table>
<share_order>
<sharename>bhp</sharename>
<buyprice>$21.00</buyprice>
<stopprice>$20.21</stopprice>
<totalshares>95</totalshares>
<totalprice>$1995.00</totalprice>
</share_order>
<share_order>
<sharename>ABC</sharename>
<buyprice>$23.45</buyprice>
<stopprice>$19.12</stopprice>
<totalshares>15</totalshares>
<totalprice>$351.75</totalprice>
</share_order>
</Orders_Table>
I've tried so many different ways to do this that my code is a complete mess, and what I did have working is now broken :icon_cry:
From what I understand, I need to read the XML file into a dataset and then display that dataset in datagridview. I'm not sure where to go from there though.
Can anyone point me in the right direction here? Any tutorials that I can look at?
Thanks in advance