Quantcast
Channel: Windows Presentation Foundation (WPF) forum
Viewing all articles
Browse latest Browse all 18858

Is there a method to handle a DataGrid new row?

$
0
0

Hi everyone! I'm trying to focus on a particular cell after adding a new row. I've tried first focusing on the new row at least, setting manuallySelectedIndex and SelectedItem properties, but the row only got visual focus. The keyboard remained focused on the previous cell.
Then i tried in the code-behind (It's a visual thing, so I think I'm not breaking MVVM pattern), with the "LoadingRow" method and theVisualTreeHelper. I can get the row, but i can't get the cells.VisualTreeHelper.GetChildrenCount returns null and VisualTreeHelper.GetChildalso returns null on any index.

Suggestions? Ideas? Corrections?



Viewing all articles
Browse latest Browse all 18858

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>