Advanced Forum Search Results
-
private void SetCaretInCurrentCell()
{dg.Dispatcher.BeginInvoke(new Action(setCaretInCurrentCell));
}private void setCaretInCurrentCell()
{
dg.BeginEdit();
dg.Focus();
}
-
I had this problem too. After some struggling I found that you cannot set the SelectedIndex/SelectedItem in the SelectionChanged-event or any subsequent calls from that event handler.
However you can put the task of setting the selection on the Dispatcher, then it ...
-
Hi Allen Chen
I also use dynamic eventhandler assignment, like this:
public class EventWatcher
{
private List<object> senders = new List<object>();
public object userState = ...