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

SelectionChanging event is fired before RowEditEnded

2 Answers 115 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Asish
Top achievements
Rank 1
Asish asked on 21 Dec 2010, 11:27 AM
Hi,
  I am facing a problem with the events in grid view
  I am using SelectionChanging to validate the selected row before changing,but the changes are not reflected as  RowEditEnded isnot beging called before selection changing.

Please suggest me how to handle this.
Thanks,
Asish

2 Answers, 1 is accepted

Sort by
0
Maya
Telerik team
answered on 21 Dec 2010, 12:12 PM
Hello Asish,

By design the order of the events is: SelectionChanged -> RowEditEnded when editing an item and clicking on another one and vice versus when navigating with the keys. So, depending on your custom requirements, you may use the validating event instead - CellValidating, CellValidated, RowValidating and RowValidated. You may take a look at our online documentation for more information.
Still, if none of those meet your requirements, I would need more details about the scenario you want to achieve.
 

Best wishes,
Maya
the Telerik team
Browse the videos here>> to help you get started with RadControls for WPF
0
Hunter Kingsley
Top achievements
Rank 1
answered on 10 Mar 2011, 11:49 PM
My C# solution to the issue was a change in my code behind of the RowEditEnded.

 

 

private void RequirementDataGrid_RowEditEnded(object sender, GridViewRowEditEndedEventArgs e)

 


Instead of using sender.selectedItem, I use e.Row.Item, which is the row that was updated.
Tags
GridView
Asked by
Asish
Top achievements
Rank 1
Answers by
Maya
Telerik team
Hunter Kingsley
Top achievements
Rank 1
Share this question
or