473,387 Members | 1,535 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Master-detail datagridviews :cannot prevent user from leaving invalid detail cell

in my WinForms app. i have master-detail DatagridViews.
i have a RowValidating and CellValidating event handlers on detail grid.

if detail cell/row validation fails, i set e.Cancel to TRUE.
this prevents user from leaving cell/row in details grid, EXCEPT in one case :

when user inserts invalid data in details cell and directly moves focus to master grid to a record in which is not its parent, then user is not prevented from leaving that invalid cell !

further more, when i return back to THAT invalid cell, i discover that invalid value wasn't accepted, and cell has its old value.

another case: if i delete cell's value instead of inserting an invalid value, e.Cancel is also set to TRUE because that value is required. i repeat the previous scenario and when i get back to that cell, i find it EMPTY, not even having its old value...

can anyway tell me how to prevent user from leaving invalid detail cell (i.e. cancel invalid cell leaving) ?
Oct 12 '14 #1
0 1125

Sign in to post your reply or Sign up for a free account.

Similar topics

30
by: Kong Bhat | last post by:
With XML becoming the de facto data description standard, I am extremely surprised that there is no movement towards standardizing an xml library API for use with C and C++. Personally I have been...
27
by: Daniel Vallstrom | last post by:
I'm having problems with inconsistent floating point behavior resulting in e.g. assert( x > 0.0 && putchar('\n') && x == 0.0 ); holding. (Actually, my problem is the dual one where I get...
1
by: Engineerik | last post by:
dfjhsqd asked this earlier in the week and I have the same question. How can I apply a filter to the Master table when using two datagrids in a MasterDetail relationship?
1
by: Chuck Bearden | last post by:
I am building from a freshly downloaded tar.gz of 7.4.3. The machine is a 4CPU Dell with an unsupported RH 9 install. (FWIW, I didn't set it up, and to do anything requiring root access I have to...
8
by: VB Programmer | last post by:
I would appreciate your assistance on this ASP.NET 2.0 site.... This is the wierd problem: While accessing the built in .NET functions for 'profiling' or 'membership' an error is generated (see...
2
by: jpenn44 | last post by:
I have multiple datagridviews on one form. I am allowing editing in the grid, and am performing error checking. I am validating the data, if it isn't valid, I am cancelling any other events...
0
by: Leon_Amirreza | last post by:
Its seems very logical that when a user changes a value in a cell first CellValidating and then CellParsing would get called. But can I cache the value Parsed in CellValidating (To Actually...
0
by: =?Utf-8?B?aW1yYW4uYQ==?= | last post by:
Hi all, I am having a problem with inserting rows in to my datagridview control. The datagridview is bound to a bindingsource with a filter set. If i try and add a row to the datagridview while...
4
by: David | last post by:
Hi I'm using this code to import data from an excel spreadsheet: DoCmd.TransferSpreadsheet , acSpreadsheetTypeExcel9, "tblStudents", _ "\\Egusersrv\Staff - Shared Work\PE Teach &...
0
by: Alan Mailer | last post by:
After a user edits a Cell in one of my DataGridViews, I want to make sure what the user has typed in is 'valid'. If it's not, I want to Cancel the Edit. Ok, you say, use the CellValidating...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
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...
0
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,...
0
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...

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.