keyongtech


  keyongtech > dotnet.languages.* > dotnet.languages.vb > 06/2005

 #1  
06-22-05, 12:22 PM
Tony Papadimitriou
Hi,

Here's a short description of a problem that took me a couple of days
to bypass (not solve):

I update a table thru a dataview (or dataset, no difference in
behavior for this problem) and all but one column (a middle column,
if that matters) get updated when I do .acceptchanges

All columns are bound to textboxes with the textbox.bindings.add
("Text",dv.table,"column_name") method. I change the value in the
textbox and press Update which after some verification attempts to do
a dv.acceptchanges

Solution so far is to set the grid.currentrowindex to itself, then
do .acceptchanges like so:

grid.currentrowindex = grid.currentrowindex
dv.acceptchanges

But WHY is that needed? And why does it update the rest of the
columns but not all of them, without it?

Any ideas or explanations?

A second problem is that I can't get the dataview .sort property to work. I
set the column name but the view remains the same. Is there something more
one needs to do to force to sort to occur?

TIA
 #2  
06-22-05, 12:34 PM
Cor Ligthert
Tony,

Can you show how you made that dataview, there is no dataview.acceptchanges.

I hop this helps,

Cor
Similar Threads
Update Sub Form Dataview on Keyup?

I have a form with a couple of unbound fields that I want to use to filter a subform/dataview on it by the value you type in the fields. The query on the dataview uses...

DataGrid / DataView Problems

hi, i have a DataGrid with a DataView as source. the data is read correctly from the db and shown on screen. the problem appears, when i want to add some rows to the...

DataSet vs. DataView - How to update?

I have a WinForms app that builds a DataSet from an XML file. The DataSet is wrapped in a DataView and bound to various controls through which users will make changes to the...

Problems with DataView.RowFilter

I have a DataView set up as following: DataView dv = new DataView(); dv.Table = twsDS1.twsContractHdr; dv.RowFilter = "AgencyID = '" + agency + "' AND NeedsStatus =...

dataView & dataAdapter.update

If i delete e record through the dataView ,the record is deleted in the underlying dataset, but when calling the dataadapter.udate method the database is not...


All times are GMT. The time now is 09:08 PM. | Privacy Policy