This is a migrated thread and some comments may be shown as answers.

CellValidating even fired twice

2 Answers 375 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Phi
Top achievements
Rank 1
Phi asked on 03 Nov 2010, 08:48 PM
Just want to report a bug that the CellValidating even is fired twice whenever I clicked a row in the grid.

Also, this event also fired whenever I clicked on any row, not just when in edit mode. Don't know if this is by-design or what!

Another thing, I found some events used e.Value versus e.NewValue (while e.OldValue is OK). You guys may want to get them to be named the same!

Phi

2 Answers, 1 is accepted

Sort by
0
Emanuel Varga
Top achievements
Rank 1
answered on 07 Nov 2010, 11:11 AM
Hello Phi,

Sorry for the very late answer on this one, I've missed it :(.

But this is not a bug (or i don't see it as a bug).
The CellValidating event occurs when cell is about to commit new content (can stop commit process of the cell).

But i have to agree it is very strange that this event fires even if the value is the same. But the contents of the cell are being changed when the cell is entering edit mode, so it is debatable.

Hope this helps, if you have any other questions or comments, please let me know,

Best Regards,
Emanuel Varga
0
Alexander
Telerik team
answered on 09 Nov 2010, 03:51 PM
Hello Phi,

The CellValidating event is fired for a particular cell when you leave it. It is raised no matter whether the value in the cell is changed or not. The Microsoft DataGridView control has the same behavior.

I am not able to reproduce the issue where this event is fired twice. Please give us more details concerning your scenario. It will help us to investigate its behavior.

Best regards,
Alexander
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
GridView
Asked by
Phi
Top achievements
Rank 1
Answers by
Emanuel Varga
Top achievements
Rank 1
Alexander
Telerik team
Share this question
or