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

ValueChanging behavior

2 Answers 157 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Louis
Top achievements
Rank 1
Louis asked on 12 Sep 2007, 10:42 PM
I'm trying to catch the new value inserted in a cell before it gets pushed in the databounditem. 

void grdSearchResults_ValueChanging(object sender, ValueChangingEventArgs e)

{

GridCellBoundColumnElement cell = sender as GridCellBoundColumnElement;

MyObj obj = cell.RowInfo.DataBoundItem as MyObj;


...
}

With the ValueChanging event everything seems to work fine when user naviguate by pressing the tab key. I can get the column unique name and my underlying DataBoundItem so i can do checkup and blabla...

The problem arise when the user click in a cell instead of pressing tab. I then get the value entered in the last cell and the column of the clicked cell ??

Is this a normal behavior? And if so what event can i catch to get this right?

Thanks

2 Answers, 1 is accepted

Sort by
0
Louis
Top achievements
Rank 1
answered on 13 Sep 2007, 10:30 PM

Will this be fixed in the release du on next week?
0
Georgi
Telerik team
answered on 14 Sep 2007, 01:24 PM
Hello Louis ,

Yes, this behavior currently is subject to change and we hope it will be finalized for the upcoming release. The ValueChanging event should fire on every change of the value when there is an open editor. Also it should not fire when the editor is closing and the value is applied in the grid (then Validating event is fired). You should consider whether this event is more appropriate in your scenario.

 
Kind regards,
Georgi
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
Tags
GridView
Asked by
Louis
Top achievements
Rank 1
Answers by
Louis
Top achievements
Rank 1
Georgi
Telerik team
Share this question
or