473,326 Members | 2,125 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,326 software developers and data experts.

datagrid verification issue

I am trying to verify a datagrid in which there must be an entry in both
columns of any new row, and those values must be greater than the
corresponding values in the previous row. It is pretty simple to verify the
cell the user starts in by invoking a verifying event for the underlying
textbox in that cell, but what I would like to do is to change the focus to
the other column in the new row if it has not been filled in. If in
handling the verifying event for the first column I include e.cancel = true
I will come back to that column in the new row, but if before or after doing
that I change the currentcell to the other column, I don't come back. If I
don't include e.cancel, of course, the focus goes whereever the user went in
triggering the verifying event. Any ideas re how in verifying one cell I
can get the user back to another cell in the datagrid? Many thanks.
Jul 21 '05 #1
14 2008
Hi Jack,

Currently I am looking for somebody who could help you on it. We will reply
here with more information as soon as possible.
If you have any more concerns on it, please feel free to post here.
Thanks for your understanding!

Best regards,

Gary Chang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------

Jul 21 '05 #2
Hi Jack,

Currently I am looking for somebody who could help you on it. We will reply
here with more information as soon as possible.
If you have any more concerns on it, please feel free to post here.
Thanks for your understanding!

Best regards,

Gary Chang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------

Jul 21 '05 #3
Hello,

Thanks for your post. As I understand, the problem you are facing is that
you cannot set current cell to other when calling e.cancel = true in the
Validating event of your DataGrid control. Please correct me if there is
any misunderstanding.

1. I tested the following code in my WinForm application, however, I am not
able to reproduce the problem. That is, it can go to another cell in the
datagrid.

private void dataGrid1_Validating(object sender,
System.ComponentModel.CancelEventArgs e)
{
e.Cancel= true;
dataGrid1.CurrentCell = new DataGridCell(3,3);
}

2. I think more information is needed before moving forward:
What's the type of your application, WinFor or WebForm?
Are you able to reproduce the problem in a simple project?
Could you post some code snippet or tell me the detailed steps to reproduce
the problem?

I look forward to hearing from you.

Regards,

HuangTM
Microsoft Online Partner Support
MCSE/MCSD

Get Secure! -- www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

Jul 21 '05 #4
Hello,

Thanks for your post. As I understand, the problem you are facing is that
you cannot set current cell to other when calling e.cancel = true in the
Validating event of your DataGrid control. Please correct me if there is
any misunderstanding.

1. I tested the following code in my WinForm application, however, I am not
able to reproduce the problem. That is, it can go to another cell in the
datagrid.

private void dataGrid1_Validating(object sender,
System.ComponentModel.CancelEventArgs e)
{
e.Cancel= true;
dataGrid1.CurrentCell = new DataGridCell(3,3);
}

2. I think more information is needed before moving forward:
What's the type of your application, WinFor or WebForm?
Are you able to reproduce the problem in a simple project?
Could you post some code snippet or tell me the detailed steps to reproduce
the problem?

I look forward to hearing from you.

Regards,

HuangTM
Microsoft Online Partner Support
MCSE/MCSD

Get Secure! -- www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

Jul 21 '05 #5
Thanks for your reply. I'm not sure what all my problems are, but I've
found the following 3 phenomena in a WinForm project: in a two column data
grid, whenever the verifying routine (which as I mentioned is tied to the
column's underlying textbox, not to the datagrid itself) returns
e.Cancel=true, then (1) if verifying was triggered by clicking on a new cell
in the same column, the verifying routine is called once, but if it is
triggered by clicking on any cell in the other column, the verifying routine
is called twice. Here's some simple code to show what I mean:

[class- wide variables]
int test = 0;
.. . . .
private void datagrid_Validating(object sender,
System.ComponentModel.CancelEventArgs e)
{
test += 1;
label1.Text = test.ToString();
e.Cancel = true;
}

When this code is running, assuming verifying is first called from column 0,
whenever a cell in column 1 is clicked, the label shows "test" incrementing
by 2, but if any cell in column 0 is clicked, the label only increments
once.

(2) 2nd phenomenon: in the same example, when a cell in the same column is
clicked, the current cell will move to the new row, even though e.Cancel was
set to true. Is this because what is being verified is the textbox
associated with the column, and it moves up and down with whatever cell is
clicked? (It does not matter if code is added as in your sample code to the
above routine setting currentcell to what is at that point the current cell
anyway, the one that was highlighted when verifying was triggered by
clicking on another cell in the same column. This could probably be
prevented by doing something in a currentcellchanged event, but I'm just
trying to figure out what's going on.)

(3) 3rd phenomenon: also in the same example, when a cell in the opposite
column is clicked, in addition to the verifying routine being called twice,
no cell is highlighted, and trying to enter data results in no change in
either column, but the little pencil in the row header of the row in which
the user clicked appears, suggesting that "startedediting" is now set.

I'm probably missing something very simple, but I'd be very grateful for
whatever help and advice you can give me on the above issues.

Regards,
Jack Kaufmann

"Tian Min Huang" <ti******@online.microsoft.com> wrote in message
news:7p**************@cpmsftngxa06.phx.gbl...
Hello,

Thanks for your post. As I understand, the problem you are facing is that
you cannot set current cell to other when calling e.cancel = true in the
Validating event of your DataGrid control. Please correct me if there is
any misunderstanding.

1. I tested the following code in my WinForm application, however, I am not able to reproduce the problem. That is, it can go to another cell in the
datagrid.

private void dataGrid1_Validating(object sender,
System.ComponentModel.CancelEventArgs e)
{
e.Cancel= true;
dataGrid1.CurrentCell = new DataGridCell(3,3);
}

2. I think more information is needed before moving forward:
What's the type of your application, WinFor or WebForm?
Are you able to reproduce the problem in a simple project?
Could you post some code snippet or tell me the detailed steps to reproduce the problem?

I look forward to hearing from you.

Regards,

HuangTM
Microsoft Online Partner Support
MCSE/MCSD

Get Secure! -- www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

Jul 21 '05 #6
Thanks for your reply. I'm not sure what all my problems are, but I've
found the following 3 phenomena in a WinForm project: in a two column data
grid, whenever the verifying routine (which as I mentioned is tied to the
column's underlying textbox, not to the datagrid itself) returns
e.Cancel=true, then (1) if verifying was triggered by clicking on a new cell
in the same column, the verifying routine is called once, but if it is
triggered by clicking on any cell in the other column, the verifying routine
is called twice. Here's some simple code to show what I mean:

[class- wide variables]
int test = 0;
.. . . .
private void datagrid_Validating(object sender,
System.ComponentModel.CancelEventArgs e)
{
test += 1;
label1.Text = test.ToString();
e.Cancel = true;
}

When this code is running, assuming verifying is first called from column 0,
whenever a cell in column 1 is clicked, the label shows "test" incrementing
by 2, but if any cell in column 0 is clicked, the label only increments
once.

(2) 2nd phenomenon: in the same example, when a cell in the same column is
clicked, the current cell will move to the new row, even though e.Cancel was
set to true. Is this because what is being verified is the textbox
associated with the column, and it moves up and down with whatever cell is
clicked? (It does not matter if code is added as in your sample code to the
above routine setting currentcell to what is at that point the current cell
anyway, the one that was highlighted when verifying was triggered by
clicking on another cell in the same column. This could probably be
prevented by doing something in a currentcellchanged event, but I'm just
trying to figure out what's going on.)

(3) 3rd phenomenon: also in the same example, when a cell in the opposite
column is clicked, in addition to the verifying routine being called twice,
no cell is highlighted, and trying to enter data results in no change in
either column, but the little pencil in the row header of the row in which
the user clicked appears, suggesting that "startedediting" is now set.

I'm probably missing something very simple, but I'd be very grateful for
whatever help and advice you can give me on the above issues.

Regards,
Jack Kaufmann

"Tian Min Huang" <ti******@online.microsoft.com> wrote in message
news:7p**************@cpmsftngxa06.phx.gbl...
Hello,

Thanks for your post. As I understand, the problem you are facing is that
you cannot set current cell to other when calling e.cancel = true in the
Validating event of your DataGrid control. Please correct me if there is
any misunderstanding.

1. I tested the following code in my WinForm application, however, I am not able to reproduce the problem. That is, it can go to another cell in the
datagrid.

private void dataGrid1_Validating(object sender,
System.ComponentModel.CancelEventArgs e)
{
e.Cancel= true;
dataGrid1.CurrentCell = new DataGridCell(3,3);
}

2. I think more information is needed before moving forward:
What's the type of your application, WinFor or WebForm?
Are you able to reproduce the problem in a simple project?
Could you post some code snippet or tell me the detailed steps to reproduce the problem?

I look forward to hearing from you.

Regards,

HuangTM
Microsoft Online Partner Support
MCSE/MCSD

Get Secure! -- www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

Jul 21 '05 #7
Hello Jack,

Thanks for your update. I reviewed your description carefully, and I think
more information is needed before moving forward:

Could you post a simple project which is able to reproduce the problem? I
believe that will be most helpful for me to pinpoint the problem and
resolution.

I look forward to your response.

Have a nice day!

Regards,

HuangTM
Microsoft Online Partner Support
MCSE/MCSD

Get Secure! -- www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

Jul 21 '05 #8
Hello Jack,

Thanks for your update. I reviewed your description carefully, and I think
more information is needed before moving forward:

Could you post a simple project which is able to reproduce the problem? I
believe that will be most helpful for me to pinpoint the problem and
resolution.

I look forward to your response.

Have a nice day!

Regards,

HuangTM
Microsoft Online Partner Support
MCSE/MCSD

Get Secure! -- www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

Jul 21 '05 #9
Sure. Following (I couldn't send it as an attachment, for some reason) is a
simple Form1.cs file which demonstrates the stuff in my last post. (Let me
know if you need more files than that.) Thanks for your help.

using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;

namespace DatagridVerification
{
/// <summary>
/// Summary description for Form1.
/// </summary>
public class Form1 : System.Windows.Forms.Form
{
private System.Windows.Forms.DataGrid dataGrid1;
private System.Windows.Forms.Label label1;
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.Container components = null;

public Form1()
{
//
// Required for Windows Form Designer support
//
InitializeComponent();

//
// TODO: Add any constructor code after InitializeComponent call
//
}

/// <summary>
/// Clean up any resources being used.
/// </summary>
protected override void Dispose( bool disposing )
{
if( disposing )
{
if (components != null)
{
components.Dispose();
}
}
base.Dispose( disposing );
}

#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.dataGrid1 = new System.Windows.Forms.DataGrid();
this.label1 = new System.Windows.Forms.Label();
((System.ComponentModel.ISupportInitialize)(this.d ataGrid1)).BeginInit();
this.SuspendLayout();
//
// dataGrid1
//
this.dataGrid1.Anchor =
((System.Windows.Forms.AnchorStyles)((((System.Win dows.Forms.AnchorStyles.To
p | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.dataGrid1.DataMember = "";
this.dataGrid1.HeaderForeColor = System.Drawing.SystemColors.ControlText;
this.dataGrid1.Location = new System.Drawing.Point(40, 24);
this.dataGrid1.Name = "dataGrid1";
this.dataGrid1.Size = new System.Drawing.Size(360, 224);
this.dataGrid1.TabIndex = 0;
//
// label1
//
this.label1.Anchor =
((System.Windows.Forms.AnchorStyles)(((System.Wind ows.Forms.AnchorStyles.Bot
tom | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.label1.Location = new System.Drawing.Point(192, 256);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(56, 23);
this.label1.TabIndex = 1;
this.label1.Text = "label1";
//
// Form1
//
this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
this.ClientSize = new System.Drawing.Size(440, 294);
this.Controls.Add(this.label1);
this.Controls.Add(this.dataGrid1);
this.Name = "Form1";
this.Text = "Form1";
this.Closing += new
System.ComponentModel.CancelEventHandler(this.Form 1_Closing);
this.Load += new System.EventHandler(this.Form1_Load);
((System.ComponentModel.ISupportInitialize)(this.d ataGrid1)).EndInit();
this.ResumeLayout(false);

}
#endregion

/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main()
{
Application.Run(new Form1());
}

private void Form1_Load(object sender, System.EventArgs e)
{
DataGridTableStyle dgts = new DataGridTableStyle();
dgts.MappingName = "MyTable";
dataGrid1.TableStyles.Add(dgts);

DataTable dt = GetTheTable();
dataGrid1.DataSource = dt;

for (int i = 0; i < dt.Columns.Count; ++i)
{
DataGridTextBoxColumn dgtbc = dgts.GridColumnStyles[i] as
DataGridTextBoxColumn;
if (dgtbc != null)
{
dgtbc.TextBox.Validating += new System.ComponentModel.
CancelEventHandler(dataGrid_Validating);
}
}
}
int test = 0;

private void dataGrid_Validating(object sender, CancelEventArgs e)
{
test += 1;
label1.Text = test.ToString();
e.Cancel = true;
}

private DataTable GetTheTable()
{
DataTable dt = new DataTable("MyTable");

int nCols = 4;
int nRows = 10;

for(int i = 0; i < nCols; i++)
dt.Columns.Add(new DataColumn(string.Format("Col{0}", i)));

for(int i = 0; i < nRows; ++i)
{
DataRow dr = dt.NewRow();
for(int j = 0; j < nCols; j++)
dr[j] = string.Format("row{0} col{1}", i, j);
dt.Rows.Add(dr);
}
return dt;
}

private void Form1_Closing(object sender,
System.ComponentModel.CancelEventArgs e)
{
e.Cancel = false;
}
}
}
"Tian Min Huang" <ti******@online.microsoft.com> wrote in message
news:1b**************@cpmsftngxa06.phx.gbl...
Hello Jack,

Thanks for your update. I reviewed your description carefully, and I think
more information is needed before moving forward:

Could you post a simple project which is able to reproduce the problem? I
believe that will be most helpful for me to pinpoint the problem and
resolution.

I look forward to your response.

Have a nice day!

Regards,

HuangTM
Microsoft Online Partner Support
MCSE/MCSD

Get Secure! -- www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

Jul 21 '05 #10
Sure. Following (I couldn't send it as an attachment, for some reason) is a
simple Form1.cs file which demonstrates the stuff in my last post. (Let me
know if you need more files than that.) Thanks for your help.

using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;

namespace DatagridVerification
{
/// <summary>
/// Summary description for Form1.
/// </summary>
public class Form1 : System.Windows.Forms.Form
{
private System.Windows.Forms.DataGrid dataGrid1;
private System.Windows.Forms.Label label1;
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.Container components = null;

public Form1()
{
//
// Required for Windows Form Designer support
//
InitializeComponent();

//
// TODO: Add any constructor code after InitializeComponent call
//
}

/// <summary>
/// Clean up any resources being used.
/// </summary>
protected override void Dispose( bool disposing )
{
if( disposing )
{
if (components != null)
{
components.Dispose();
}
}
base.Dispose( disposing );
}

#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.dataGrid1 = new System.Windows.Forms.DataGrid();
this.label1 = new System.Windows.Forms.Label();
((System.ComponentModel.ISupportInitialize)(this.d ataGrid1)).BeginInit();
this.SuspendLayout();
//
// dataGrid1
//
this.dataGrid1.Anchor =
((System.Windows.Forms.AnchorStyles)((((System.Win dows.Forms.AnchorStyles.To
p | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.dataGrid1.DataMember = "";
this.dataGrid1.HeaderForeColor = System.Drawing.SystemColors.ControlText;
this.dataGrid1.Location = new System.Drawing.Point(40, 24);
this.dataGrid1.Name = "dataGrid1";
this.dataGrid1.Size = new System.Drawing.Size(360, 224);
this.dataGrid1.TabIndex = 0;
//
// label1
//
this.label1.Anchor =
((System.Windows.Forms.AnchorStyles)(((System.Wind ows.Forms.AnchorStyles.Bot
tom | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.label1.Location = new System.Drawing.Point(192, 256);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(56, 23);
this.label1.TabIndex = 1;
this.label1.Text = "label1";
//
// Form1
//
this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
this.ClientSize = new System.Drawing.Size(440, 294);
this.Controls.Add(this.label1);
this.Controls.Add(this.dataGrid1);
this.Name = "Form1";
this.Text = "Form1";
this.Closing += new
System.ComponentModel.CancelEventHandler(this.Form 1_Closing);
this.Load += new System.EventHandler(this.Form1_Load);
((System.ComponentModel.ISupportInitialize)(this.d ataGrid1)).EndInit();
this.ResumeLayout(false);

}
#endregion

/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main()
{
Application.Run(new Form1());
}

private void Form1_Load(object sender, System.EventArgs e)
{
DataGridTableStyle dgts = new DataGridTableStyle();
dgts.MappingName = "MyTable";
dataGrid1.TableStyles.Add(dgts);

DataTable dt = GetTheTable();
dataGrid1.DataSource = dt;

for (int i = 0; i < dt.Columns.Count; ++i)
{
DataGridTextBoxColumn dgtbc = dgts.GridColumnStyles[i] as
DataGridTextBoxColumn;
if (dgtbc != null)
{
dgtbc.TextBox.Validating += new System.ComponentModel.
CancelEventHandler(dataGrid_Validating);
}
}
}
int test = 0;

private void dataGrid_Validating(object sender, CancelEventArgs e)
{
test += 1;
label1.Text = test.ToString();
e.Cancel = true;
}

private DataTable GetTheTable()
{
DataTable dt = new DataTable("MyTable");

int nCols = 4;
int nRows = 10;

for(int i = 0; i < nCols; i++)
dt.Columns.Add(new DataColumn(string.Format("Col{0}", i)));

for(int i = 0; i < nRows; ++i)
{
DataRow dr = dt.NewRow();
for(int j = 0; j < nCols; j++)
dr[j] = string.Format("row{0} col{1}", i, j);
dt.Rows.Add(dr);
}
return dt;
}

private void Form1_Closing(object sender,
System.ComponentModel.CancelEventArgs e)
{
e.Cancel = false;
}
}
}
"Tian Min Huang" <ti******@online.microsoft.com> wrote in message
news:1b**************@cpmsftngxa06.phx.gbl...
Hello Jack,

Thanks for your update. I reviewed your description carefully, and I think
more information is needed before moving forward:

Could you post a simple project which is able to reproduce the problem? I
believe that will be most helpful for me to pinpoint the problem and
resolution.

I look forward to your response.

Have a nice day!

Regards,

HuangTM
Microsoft Online Partner Support
MCSE/MCSD

Get Secure! -- www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

Jul 21 '05 #11
Hi, Jack

May attempted to send you the following in email, but what she had is
apparently invalid. You can reach her as >mayji< for her email and
microsoft.com< as her domain. Since the SPAM bots will get it if I put

the pieces together, I leave it to you to put them together and respond.

Thanks,

John Eikanger
Microsoft Developer Support
<><><><><><><><><><><><><><><><><><><><><><><><><> <><><><><><><><><><><>

Hi Jack,

This is May Ji from Microsoft Developer Support. Our newsgroup team has
created a grace support incident to track the progress of your issue
regarding the DataGrid. I currently own the case and will be very glad to
work with you to provide you the solution. Could you please send me a
sample to demonstrate what you are trying to do, and what’s not working?

I look forward to hearing back from you soon.

Thanks,
May Ji
Tech Lead
Microsoft Developer Support

Jul 21 '05 #12
Hi, Jack

May attempted to send you the following in email, but what she had is
apparently invalid. You can reach her as >mayji< for her email and
microsoft.com< as her domain. Since the SPAM bots will get it if I put

the pieces together, I leave it to you to put them together and respond.

Thanks,

John Eikanger
Microsoft Developer Support
<><><><><><><><><><><><><><><><><><><><><><><><><> <><><><><><><><><><><>

Hi Jack,

This is May Ji from Microsoft Developer Support. Our newsgroup team has
created a grace support incident to track the progress of your issue
regarding the DataGrid. I currently own the case and will be very glad to
work with you to provide you the solution. Could you please send me a
sample to demonstrate what you are trying to do, and what’s not working?

I look forward to hearing back from you soon.

Thanks,
May Ji
Tech Lead
Microsoft Developer Support

Jul 21 '05 #13
More from May:

From: May Ji
Sent: Tuesday, April 20, 2004 5:05 PM
To: 'Jack Kaufmann'
Subject: RE: Case SRX040415603350

Jack,

I did some testing with your sample. Using your sample, I did notice some
problems with the DataGrid’s Validating event such as the Validating event
firing multiple times, etc. By reading your email and also looking at the
code in your sample, I think your end goal is trying to implement
cell-by-cell validation. Is this thinking correct?

There are problems implementing cell-by-cell validation using the
DataGrid's Validating Event architecture. The problem is that the grid is
not the object handling the data. Instead, a TextBox or some other control
is the control managing the changing of the cell contents. One way to
implement the validation at the grid level is to handle the
CurrentCellChanged event, and if the previous cell's value is not proper,
then return to that cell. You can download a sample from Syncfusion's FAQ
page (http://www.syncfusion.com/FAQ/WinFor...c44c.asp#q773q
<http://www.syncfusion.com/FAQ/WinForms/FAQ_c44c.asp>) that implements this
process. The sample only handles the validation from cell to cell movement.
If you want to handle the validation when the user clicks on the form’s
Close button, then you would have to add a special event handler for this
and do one last validation at this point.

If I have completely misunderstood what you are trying to do, please let me
know. If it helps, you can call me at (425)7042136 to discuss this issue
(or let me know how to reach you via Phone).

Thanks!
May

Jul 21 '05 #14
More from May:

From: May Ji
Sent: Tuesday, April 20, 2004 5:05 PM
To: 'Jack Kaufmann'
Subject: RE: Case SRX040415603350

Jack,

I did some testing with your sample. Using your sample, I did notice some
problems with the DataGrid’s Validating event such as the Validating event
firing multiple times, etc. By reading your email and also looking at the
code in your sample, I think your end goal is trying to implement
cell-by-cell validation. Is this thinking correct?

There are problems implementing cell-by-cell validation using the
DataGrid's Validating Event architecture. The problem is that the grid is
not the object handling the data. Instead, a TextBox or some other control
is the control managing the changing of the cell contents. One way to
implement the validation at the grid level is to handle the
CurrentCellChanged event, and if the previous cell's value is not proper,
then return to that cell. You can download a sample from Syncfusion's FAQ
page (http://www.syncfusion.com/FAQ/WinFor...c44c.asp#q773q
<http://www.syncfusion.com/FAQ/WinForms/FAQ_c44c.asp>) that implements this
process. The sample only handles the validation from cell to cell movement.
If you want to handle the validation when the user clicks on the form’s
Close button, then you would have to add a special event handler for this
and do one last validation at this point.

If I have completely misunderstood what you are trying to do, please let me
know. If it helps, you can call me at (425)7042136 to discuss this issue
(or let me know how to reach you via Phone).

Thanks!
May

Jul 21 '05 #15

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

Similar topics

9
by: Lina | last post by:
Hi, Can anyone tell me if it is possible to add link buttons to a datagrid that has its source set to a datatable that i have created? i.e i want the user to be able to select a room from...
3
by: Rxd | last post by:
I have a Datagrid that should have a couple of hidden columns. I used a DataGridTableStyle to hide the columns and it was working fine except I needed to prevent the DataGrid from allowing new rows...
1
by: mike | last post by:
I posted before and got the reply below, which really doesn't help me at all. I really didn't understand what the responder was talking about I'd like someone who is a microsoft expert to help...
7
by: Dave | last post by:
Are there any add-on products or samples available that can do the following in an vb.net datagrid I want to compare 2 rows in a datagrid - one row from one database and another row for another...
7
by: Earl | last post by:
Any known fixes for the wacky right-alignment bug in the WinForms datagrid (VS2003)? I've tried Ken's workaround...
14
by: Jack Kaufmann | last post by:
I am trying to verify a datagrid in which there must be an entry in both columns of any new row, and those values must be greater than the corresponding values in the previous row. It is pretty...
0
by: pwilliams | last post by:
NCOALink Change of Address Verification Each year over 40 million Americans change their mailing addresses. This change is equivalent to every person in California deciding to change addresses...
13
by: Kal | last post by:
I have a small console app that started out in dotnet 1.1 in VS 2003. That version can be copied to a W2K3 server where it runs fine. I set up a new project in VS 2005 and copied the code files...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.