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

[Solved] e.NewValue is not new value for CellValidating event

1 Answer 162 Views
GridView
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Inquisitor Jax
Top achievements
Rank 1
Inquisitor Jax asked on 04 Sep 2009, 07:44 AM
When I catch the Cell_Validating event, the old and new values are the same.

The column is a custom column that is added to the grid at runtime as described here.
e.NewValue seems to work corrrectly if the column is a GridViewDataColumn.

Is there an override I'm missing in the custom column or something?


1 Answer, 1 is accepted

Sort by
0
Accepted
Nedyalko Nikolov
Telerik team
answered on 07 Sep 2009, 09:13 AM
Hello Inquisitor Jax,

Generally with the custom edit template you should use e.EditingElement which in your case is RadNumericUpDown, and from this element get the value you need.

In order this to work with e.NewValue you should ensure that GridViewDataColumn.DataMemberBinding is TwoWay binding. This can be done either with set DataMemberBinding explicitly or just do not set DataMemberBinding only GridViewDataColumn.UniqueName (there is a fix in latest build for that).

Best wishes,
Nedyalko Nikolov
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
GridView
Asked by
Inquisitor Jax
Top achievements
Rank 1
Answers by
Nedyalko Nikolov
Telerik team
Share this question
or