DataView Multiple Change

  • Thread starter Thread starter Marc R.
  • Start date Start date
M

Marc R.

Hi all,



I edit records using a form that have multiple control bind on Dataview, But
I don't want to update right always to database, I would like to delay until
all Changes (add all new record using a form or edit various existing
records)

This way I could minimize transaction on server..

Any hint ?

VS 2003

Marc R.
Thanks for your help guys !
 
Marc,

It is up to you when you update a datatable to a database, so can you
explain your question a little bit more?

Cor
 
well I use a grid bound to a dataview,
went I click on a row, All textboxes on the form updates accordingly.
if I edit the textboxes, I absolutely need to do an update to not loose
information.
if I change to a different row, then back to the previously edited row my
edited information aren't into textboxes anymore. I see the original data.

I would like to be able to edit, as much as many row I like or even add some
new rows then update database.

Let hope that is better explained.
thks
 
Marc

You have a way in telling a problem what says in my opinion absolute nothing
to the ones who tries to help you.

By instance this.
well I use a grid bound to a dataview,

Version 2005?
WindowsForm Grid or Webform Grid or a grid build by yourself?
if I edit the textboxes.........?
And then do you click an update button or whatever or do you do nothing

Cor
 
well I use a grid bound to a dataview,
went I click on a row, All textboxes on the form updates accordingly.
if I edit the textboxes, I absolutely need to do an update to not loose
information.
if I change to a different row, then back to the previously edited row my
edited information aren't into textboxes anymore. I see the original data.

I would like to be able to edit, as much as many row I like or even add some
new rows then update database.

Let hope that is better explained.
thks


Dunno what happen here, my 1st response didn't made it to the news group.
 
Sorry,

I got a treeview that contains Service nodes

here how I works with each record,

me.dvserviceoperation.rowfilter = "ser_id=" & ctype e.node,service).id

so now data view as 1 record.

all bound control on form bounds to that specific record.

At this point If I don't save the change right away (let say I click on a
other Node(service)) All Change made are lost.
 
I changed My way Around, I Use My nodes to "gather the new information" then
went user click Save, I take All info from Nodes and put it back to the
Dataview then Update the dataview. longer step but I have full control of
everything

the only question I got now : is there a way to Bind A textbox control to a
Tree as in :

me.textbox.data.text = ctype(me.treeview.selectedNodes,service).Description

I thing I just got the perfect Ideal,

To my service Nodes I will implement each a Dataview, that dataview will me
affected to the databinding of the text control at runtime (click even of
node) on the form's save button, I simply to run the tree view to update
each service if has change.

Do I make any sense ?
 
Marc,

Do you really think that you have to hide things not showing it. This
newsgroups are build of given information and get it back. I get the idea
that you think you build something special that you should not show.

However, if you use version 1.1 than you need probably the
bindingmanagerbase.endcurrentedit.
That pushes the data without a rowchange into the datasource.

http://msdn2.microsoft.com/en-us/library/system.windows.forms.bindingmanagerbase.endcurrentedit.aspx

I hope this helps,

Cor
 
Sorry Cor, That wasn't the intent,

I use all Automatic code that comes with the Bindings,
the only code I may give you (because it is the only existing code it is
then treeview.click event handler)
that is me.DataView.rowfilter = "Ser_id = " &
ctype(me.treeView.selectednodes,service).ID

of course all controls on the form (3 textboxes ,1 Combobox, 2 checkbox) are
bonded on The Dataview that get changed.

the problem is : went I click a 2nd nodes all previous change are lost If I
don't do an update.

an other good reason why I don't Copy the code : my first language is
French, so is my variable name.
but there is nothing else the code
 
Marc,
of course all controls on the form (3 textboxes ,1 Combobox, 2 checkbox)
are bonded on The Dataview that get changed.

the problem is : went I click a 2nd nodes all previous change are lost If
I don't do an update.
And did you implement in that click event that "endcurrentedit" instead of
that?

\\\
DirectCast(BindingContext(dv), CurrencyManager).EndCurrentEdit
///

I hope this helps,

Cor
 
Back
Top