473,788 Members | 2,897 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Windows Form DataGrid validating changes question

Hi,

In my .Net C# Windows form Form1, there's a DataGrid DataGrid1 on Form1.
How do I validate if the values in DataGrid1 is modified or not?
Thanks for help.
Jason
Jun 27 '08 #1
2 1541
On Apr 30, 8:58*am, "Jason Huang" <JasonHuang8... @hotmail.comwro te:
Hi,

In my .Net C# Windows form Form1, there's a DataGrid DataGrid1 on Form1.
How do I validate if the values in DataGrid1 is modified or not?
Thanks for help.

Jason
I believe you are using DataGridView.
The CellStateChange d() event of DataGridView is the best place to do
some validations.
Check it out.
Jun 27 '08 #2
Thanks Marrif!
Get no DataGridView in the .Net 1.1 ...

<ma****@gmail.c om>
???????:08***** *************** **************@ 2g2000hsn.googl egroups.com...
On Apr 30, 8:58 am, "Jason Huang" <JasonHuang8... @hotmail.comwro te:
Hi,

In my .Net C# Windows form Form1, there's a DataGrid DataGrid1 on Form1.
How do I validate if the values in DataGrid1 is modified or not?
Thanks for help.

Jason
I believe you are using DataGridView.
The CellStateChange d() event of DataGridView is the best place to do
some validations.
Check it out.
Jun 27 '08 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
2439
by: PAUL EDWARDS | last post by:
I have a windows form that is bound to a datatable. In VB6 I could just update the field contents and it would be updated in the database, however if I update the text property of the control from code it is 50% chance that the update will make it back to the dataset. If I update the dataset instead of the form, it does not show on the form. Is there a method that should be used?
5
5765
by: Jason Huang | last post by:
Hi, Is it possible to bind DataReader to a DataGrid in C# windows form? And how? And can we update data in a DataSet by using the DataReader? Thanks for help. Jason
1
1754
by: philipl | last post by:
hi, i have a datagrid which display custom controls when user clicks edit, changing data. I am using customvalidator to validate this control. I can get validation of user input to work no problem when user clicks on update in datagrid. My problem is that when I try to get customvalidation to work when user changes the value in the control, as i want this to be checked as soon as user changes the control. The custom control offers an
6
1226
by: Joe | last post by:
Hi, I have a MS Access DB in which a record has just too many fields to be able to allow users to do inline editing in a datagrid. So I want to display as First Name: Text box where first name is displayed and can be edited. Last Name: Text box where last name is displayed and can be edited. At the end of this list, I want to have two buttons, update and cancel.
4
1301
by: KB | last post by:
I realised that if I use datagrid and datasource is a datatable, when I created a new row and while on that row I exit the datagrid (ie. without moving into the next row) and focus onto another control, that new row is not recorded (check it at the datagrid.validating event). However, if I use down arrow key to move to the next row (without keying any data) and exit, the new row is recorded in the datatable. can anyone please advise if I...
3
2160
by: Arsalan | last post by:
How do I validate inputs in DataGrid ? I want to check for constraint and change columns value dynamically, for e.g i've column named employee, annual salary and salary I want the columns annual salary to be dynamically changed when user changes salary in datagrid How do I do it?
19
3228
by: zacks | last post by:
I have a .NET 2.0 MDI application where the child form has a Tab Control. Each of the Tab in the Tab Control has a Validating event to handle what it should do when the user changes tabs. But these Validating Events are also fired when either the child form or the main (parent) form Close icon is clicked. And I need for these events to know if they are being invoked because the app (or child window) is being closed. I have set a boolean...
3
2215
by: mtczx232 | last post by:
I have TabControls that Hold Forms on his TabPges (this make me easy to give ability to Designing each form in his IDE window). When form x is in middle of Edit Data Mode, I going to prevent: Closing App or switch to other tabs until save done explicit by user. So I try use events like: deactivate,leave,lostfocus,formclosing,validating to prevent user leave before save. but no one work: the not fire at all when app closing or switch...
2
5884
by: SePp | last post by:
Hi all. I want to refresh a Datagrid from another form. For Example I have a Datagrid in that I want to edit data. The user has the ability to press a button to change these data. A new Form opens and the user changes the data. After that he saves the changes and the current form is closing and the old form with the datagrid gets the focus again.
0
9498
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10370
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10177
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
7519
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6750
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5402
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5538
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4074
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3677
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.