I have a Silverlight 5 Datagrid that has a checkbox in the first column. When the checkbox gets unchecked, I need to fire off an event that changes the value in another cell. The problem I am having is, the checkbox is actually still checked when the Unchecked event fires off so the value in the other cell doesn't change. Is there an event I can wire into that lets me know when the unchecked event is finished? Thanks in advance.
Answer: 1
You can try this:
First you 'll increment the unchecked event on code behind like this:
checkBox1.Unchecked +=new RoutedEventHandler(checkBox1_Unchecked2); So, on this event you can do this
private void checkBox1_Unchecked2(object sender, RoutedEventArgs e) { if ((bool)checkBox1.IsChecked) //Your code } The default unchecked event will be fired and then when it reaches the second the checkbox will be already marked as unchecked, then you can do wherever you want.
Hope it helps.
by : Viniciushttp://stackoverflow.com/users/1141477
No comments:
Post a Comment
Send us your comment related to the topic mentioned on the blog