all groups > dotnet windows forms > june 2005 >
You're in the

dotnet windows forms

group:

Pencil icon in the datagrid


Pencil icon in the datagrid Slawek Piotrowski
6/29/2005 3:21:02 AM
dotnet windows forms:
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
RE: Pencil icon in the datagrid nieurig
6/30/2005 4:25:03 AM
Hi Sławomir

[quoted text, click to view]
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
RE: Pencil icon in the datagrid Slawek Piotrowski
6/30/2005 4:32:03 AM
[quoted text, click to view]

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
AddThis Social Bookmark Button