|
 |
ado_dotnet thread: Row State not being handled correctly?
Message #1 by "David Garner" <dgarner@g...> on Tue, 15 Oct 2002 19:34:41
|
|
I have a typed dataset. A column from this dataset is databound to the
Text property of a textbox. When the dataset changes, the textbox text
value is automatically changed, when the textbox Text value is changed on
the form, the value in the dataset is automatically updated. However, the
row state remains "unchanged".
How do I detect which rows to push back to the database without the
rowstate? Am I doing something wrong?
Message #2 by "Brian Smith" <bsmith@l...> on Wed, 16 Oct 2002 09:01:49 +0100
|
|
You need to make a call to the BindingContext to tell it that current
edits have finished (this only happens automatically when/if you move on
to another record). I have a standard procedure called by every form
before it closes, or when the Save button is clicked. This includes the
line:
this.BindingContext[<DataSet>, <tableName>].EndCurrentEdit();
if (<Dataset>.HasChanges() == false)
return true;
// submit changes to database
brian
-----Original Message-----
From: David Garner [mailto:dgarner@g...]
Sent: Tue, 15 Oct 2002 19:35
To: ADO.NET
Subject: [ado_dotnet] Row State not being handled correctly?
I have a typed dataset. A column from this dataset is databound to the
Text property of a textbox. When the dataset changes, the textbox text
value is automatically changed, when the textbox Text value is changed
on
the form, the value in the dataset is automatically updated. However,
the
row state remains "unchanged".
How do I detect which rows to push back to the database without the
rowstate? Am I doing something wrong?
---
ASP.NET Distributed Data Applications
This book will inspire you with a range of ideas on how data
can be used to drive Web applications, and how that data can
be most effectively utilized at each level of the design.
Inefficient data use leads to the sort of slow, unresponsive
Web applications that nobody enjoys using. By making good use
of both server and client-side code, we can solve these
problems. This book will arm you with the techniques you need
to build Web applications that fly.
http://www.wrox.com/ACON11.asp?ISBN=1861004923
|
|
 |