Hey Guys,
I have a little scenario I'd like some advice on. Some of our users have to quite often modify some text files which can be fairly cumbersome, so i thought I'd write a little program to make this easier for them.
The structure of the file is the following:
COLUMN1|COLUMN2.........
DATA1|DATA2.......
I thought it would be good if I could get the values of the data row into some kind of table so they could be easily viewed and modified. I thought the best way of doing this would be to loop through the lines of the file, add those rows to a datatable, and then bind the datatable to a datagridview. I managed to bind the column headings to the datatable but I'm struggling with the data rows.
Does this sound like the best way of doing this? If so, what is the best way of looping through the data lines in the file and creating the rows in the datatable?
I have a little scenario I'd like some advice on. Some of our users have to quite often modify some text files which can be fairly cumbersome, so i thought I'd write a little program to make this easier for them.
The structure of the file is the following:
COLUMN1|COLUMN2.........
DATA1|DATA2.......
I thought it would be good if I could get the values of the data row into some kind of table so they could be easily viewed and modified. I thought the best way of doing this would be to loop through the lines of the file, add those rows to a datatable, and then bind the datatable to a datagridview. I managed to bind the column headings to the datatable but I'm struggling with the data rows.
Does this sound like the best way of doing this? If so, what is the best way of looping through the data lines in the file and creating the rows in the datatable?