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

[Solved] Event Firing

2 Answers 71 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.
Keith Stephens
Top achievements
Rank 1
Keith Stephens asked on 19 Nov 2010, 07:00 PM
For the Gridview what is the order of events that fire?

I have a gridview that if the user enters a value in my Cost field then they hit the tab key I call the celleditended event and I populate a Sell cost field, by taking the new value they entered and add to it a markup value.

This works fine if they tab through the columns but if they enter a value in the cost field then select another row, then it seems that the selectionChanged event gets called before the celleditended event,  also not the cost cell is still in edit mode, but wouldn't you still have the celleditended event get fired before the selected changed event?

The selectedChanged event also gets called before the roweditended.

How can I get around this?

Thanks,
KS.

2 Answers, 1 is accepted

Sort by
0
Maya
Telerik team
answered on 22 Nov 2010, 01:43 PM
Hi Keith Stephens,

Indeed the SelectionChanged event fires before CellEditEnded and RowEditEnded events. A possible approach in your case may be to follow the idea described in this blog post about calculating a value based on the values of other properties of that item. Furthermore, depending on your specific scenario, you may use the GridViewExpressionColumn. Another possibility may be to submit changes by CommitEdit() method during the SelectionChanging/ SelectionChanged events.
However, if none of those resolves your issue, I would need a bit more information about your scenario, so that I could provide you with more specific for you case solution.
     

All the best,
Maya
the Telerik team
Browse the videos here>> to help you get started with RadControls for Silverlight
0
dao hong ninh
Top achievements
Rank 1
answered on 30 Nov 2010, 10:45 AM
I want save calculate value of GridViewExpressionColumn to database. How to i have binding with that column to get value?
Tags
GridView
Asked by
Keith Stephens
Top achievements
Rank 1
Answers by
Maya
Telerik team
dao hong ninh
Top achievements
Rank 1
Share this question
or