Hi,
I have a problem with adding a datarow to datatable that is bounded to
listbox.
Here is what I am trying to accomplish:
1) Connect to access database and select table into dataset (works
fine)
2) Create dataview of that table and bind it to listbox (works fine)
3) Add datarow to datatable containing information from some other
source and the added datarow should automatically be displayed in
listbox (having problem)
4) Update access table with new information...

Here is how I add datarow to my datatable.
drTo = dsStudents.Tables("ToStudents").NewRow()
drTo("SomeColumn") = ...
drTo("SomeColumn2") = ...
dsStudents.Tables("ToStudents").Rows.Add(drTo)

The thing is that datarow is actually gets added to the datatable but
in the listbox it is appears as "blank". Now, if I add a second row
after that, the first row now changes from "blank" to the one with
information (Student's Name). But, now the second row is displayed as
"blank". In other words the number of items that are in listbox are
n-1 (1 is blank so total is n) and the number in datatable is n. So
what do I need to do to get new added row to be displayed properly? I
found a solution, to use this line of code:
dsStudents.Tables("ToStudents").AcceptChanges()
Now this works fine, however, the RowState changes from added to
unmodified and calling Update method of DataAdapter would cause no
rows to be updated since all rows are marked as unmodified.
Is there another way I can get result that I want without using
AcceptChanges() I appreciate your help!