PC Review
Forums
Newsgroups
Microsoft DotNet
Microsoft Dot NET Framework Forms
DataGridView Dirty Pen
Forums
Newsgroups
Microsoft DotNet
Microsoft Dot NET Framework Forms
DataGridView Dirty Pen
![]() |
DataGridView Dirty Pen |
|
|
Thread Tools | Rate Thread |
|
|
#1 |
|
Guest
Posts: n/a
|
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 |
|
|
|
#2 |
|
Guest
Posts: n/a
|
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. |
|
|
|
#3 |
|
Guest
Posts: n/a
|
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. |
|
![]() |
|
| Thread Tools | |
| Rate This Thread | |
|
|

Main Page 

