PC Review


Reply
Thread Tools Rate Thread

DataGridView Dirty Pen

 
 
John Rivers
Guest
Posts: n/a
 
      5th Jan 2007
Hello

Cancelling a CellValidating event handler works OK

but

Cancelling a RowValidating event handler causes the "Dirty Pen" to
disappear even though uncommitted proposed value is still in the cell -
hitting ESC will revert the value to the original
so it all works except for the "Dirty Pen"

is it my fault?
is this a bug?
is there a workaround?

Best wishes

John Rivers

 
Reply With Quote
 
 
 
 
ClayB
Guest
Posts: n/a
 
      5th Jan 2007
You may be able to work around this behavior by explicitly calling
CancelEdit in your RowValidating handler when you set e.Cancel = true;

void dataGridView1_RowValidating(object sender,
DataGridViewCellCancelEventArgs e)
{
//......whatever????
e.Cancel = true;
((DataGridView)sender).CancelEdit();
}

===================
Clay Burch
Syncfusion, Inc.

 
Reply With Quote
 
John Rivers
Guest
Posts: n/a
 
      5th Jan 2007


And how will solve the broken Dirty Pen problem?




On Jan 5, 2:07 am, "ClayB" <c...@syncfusion.com> wrote:
> You may be able to work around this behavior by explicitly calling
> CancelEdit in your RowValidating handler when you set e.Cancel = true;
>
> void dataGridView1_RowValidating(object sender,
> DataGridViewCellCancelEventArgs e)
> {
> //......whatever????
> e.Cancel = true;
> ((DataGridView)sender).CancelEdit();
> }
>
> ===================
> Clay Burch
> Syncfusion, Inc.


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Dirty, dirty ********* the X-rated picture guide Abarbarian General Discussion 0 25th Mar 2010 10:17 PM
excel sheet dirty read and dirty write? DAXU Microsoft Excel Programming 6 21st Feb 2008 12:03 PM
DataGridView, getting the dirty value of a cell when editing news.microsoft.com Microsoft C# .NET 2 31st Oct 2006 03:53 PM
DataGridView Dirty Data Question =?Utf-8?B?TWFyYw==?= Microsoft VB .NET 0 28th Apr 2006 08:36 PM
Dirty value of datagridview cell Morten Snedker Microsoft VB .NET 1 23rd Mar 2006 10:31 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 02:47 AM.