silverlight - Changeing values in RowEditEnding -


Changing the values ​​in a DataGrid's Editing Event

I have a datagroup in which a check box Is the column. Only one row can check the check box. If the user checks a new box, all other boxes will be automatically unchecked, similar to a radio button. I have tried to apply that behavior to Row Adiding Event, but if I am modifying the values ​​of the items in this event, the editing is being canceled? That is, the check boxes are left unchanged. If the check box is unchecked, check boxes are updated and editing is usually the code I am using here:

  Private Zero Grd Q & A Answers_RowEditEnded (Object Sender, System.Windows .Controls.DataGridRowEditEndedEventArgs e) {If (DataGridEditAction.Commit == e.EditAction) {Reply Answer = (Answer) E.R.D. Datacentex; If (Answer is true == true) {foreach (other answer answers in grd Q & A Answers.ItemsSource) {If (other answer! = Answer) {answer.Correct = false; }}}}}  

I'm a slob so that if there is a better way of doing this then I have all the ears.

As far as I can tell the "roededet ending" incident, there is no purpose. When it is removed, the values ​​in that row have not been changed yet and you can not see how they will be changed.

"RoediteNDed" might be what you want - I have WPF in this problem and found that WPF is not "RowEditEnded" in DataGrid since I was bound to a DataTable, so I just used DataTable Rook was associated with a chunked event.

In addition to -

  answer.Correct = false;  

should be

  other Answers.Correct = false;  

Comments

Popular posts from this blog

c# - How to capture HTTP packet with SharpPcap -

jquery - SimpleModal Confirm fails to submit form -

php - Multiple Select with Explode: only returns the word "Array" -