Hi guys,
I'm new the this forum where I'm hoping to get some friendly advice for a bit-of-a-newbie C# programmer. I've been through 2 differnt beginners courses on the code so now i'm ready to get my hands in the code!
I'm currently having a problem with loading all data from Columns into a list view I made. The SQL Database was being read fine and eahc line was being pulled into 3 seperate text boxes but I decided I wanted it all in a list view.
However, I'm not to sure how to alter my code to show this. Below I have attached my working code:
private void NavigateRecords()
{
DataRow dRow = ds1.Tables["Workers"].Rows[inc];
ListViewItem item = new ListViewItem(dRow.ItemArray.GetValue(1).ToString());
item.SubItems.Add(dRow.ItemArray.GetValue(2).ToString());
item.SubItems.Add(dRow.ItemArray.GetValue(3).ToString());
listView1.Items.Add(item);
As you can see I know that the 'Get Value' is only pointing to 1 line in the table. Is there an easy was to modifying this code to pull through all the data from the 3 columns at once? Sorry its a real n00b question but I really want to crack this one.
Thanks for any help you can offer!
regards
Mark.