Home All Groups Group Topic Archive Search About
Author
29 Jun 2005 10:21 AM
Slawek Piotrowski
Hello,


As soon as user starts edit in datagrid the pencil icon is shown on left
side of the datagrid. If user clicks on the pencil it is hidden again.

Is it possible to save modified data back to the database when user clicks
on the pencil? How to do that?

I'm using .NET Framework 1.1 and Visual Studio .NET 2003

Thanks for any help.


--
Sławomir Piotrowski / Telsat GP
Rejestracja Czasu Pracy i Kontrola Dostępu
http://www.ewidencja-czasu-pracy.pl

Author
30 Jun 2005 11:25 AM
nieurig
Hi Sławomir

> Is it possible to save modified data back to the database when user clicks
> on the pencil? How to do that?
Yes i think so.
You can get the old data comming from database from your datasource
"under" your Grid. Each datarow stores them. toghter with the new data.

try to changed the state of a datarow to unchanged to avoid writing
neu data to the database. Perhaps you get the old  data by this way.
Otherwise you have to copy them from the old version of the row.

Good luck.
Niels
Are all your drivers up to date? click for free checkup

Author
30 Jun 2005 11:32 AM
Slawek Piotrowski
"nieurig" wrote:

> > Is it possible to save modified data back to the database when user clicks
> > on the pencil? How to do that?
> Yes i think so.
> You can get the old data comming from database from your datasource
> "under" your Grid. Each datarow stores them. toghter with the new data.
>
> try to changed the state of a datarow to unchanged to avoid writing
> neu data to the database. Perhaps you get the old  data by this way.
> Otherwise you have to copy them from the old version of the row.

Thanks for the reply, nieurig.

Well, yes, I know how to write data to the database.

My problem is how to make my code execute when user clicks on this pencil.

--
Sławomir Piotrowski / Telsat GP
Rejestracja Czasu Pracy i Kontrola Dostępu
http://www.ewidencja-czasu-pracy.pl

Bookmark and Share