Appending data to a datagrid
I am currently working on an application where I will need to progressively build a data grid. I have a text file that looks like this:
1006, 32.56, .1348, .0466 1007, 33.12, .1234, .9876 I am going to need to read each line one at a time. One the first time around 1006 needs to go into "its text box" and so on. From there I need to query based on line 1's data and print to datagrid. Then I need to read line two and clear 1006 from the text box and put in 1007 and so on and then query for this set of data and append it to the data grid at the end of the data from the first line. Can anybody help me as to how this would be done? |
appending data to a data grid VB.net
I am working on an application in which I am going to need to append data to a data grid. Basically, I am going to have a loop that will read a text box, query for info in text box, print to data grid, change info in text box, query and print again and so on. I will need the first set of data displayed, then the next set appended to the previous set at the end, etc, etc. Can anyone help me with how to do this?
|
Don't know that this has anything to do with linux dev but....
If you are using a dataset... Create a dataview on the dataset. Bind the dataview ( not the dataset ) to the grid. Then when you want to add data to the grid... Grab the dataview back from the grid's datasource. Add the data to the dataview. Re-bind the dataview to the grid. If you are using a custom object ( i.e. collection )... Bind the collection to the grid Then when you want to add data to the grid.... Grab the collection back from the grid's datasource Add the new item to the collection. Re-bind the colleciton to the grid. |
would you be able to give me some coding examples of how to do this. I have never dealt with a data view before nor heard of it. Some source code would be a great help.
|
I am coding in vb.net not a linux language
|
There are tons of examples on datagrids, datasets, and dataviews in MSDN and on the web.
Doing a google search for any/all of those things will bring you more hits than you can read. |
I tried something like this and got an Ora - 01722: Invalid Name the second time through the loop on the bolded line.
Code:
Private Sub butReadFromtextfile_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles butReadFromtextfile.Click |
All times are GMT -5. The time now is 11:01 PM. |