DataGrid Cells Focus?

Dec 26, 2008 at 5:02 PM

Hi

I have implemented a custom CollectionView in which I'm able to group and sort hierachically, the only problem now is the focus in this damn datagrid xD

Following: 
I've implemented the Groups with a custom ControlTemplate for the row, but when i now move the cursor up and down it get's stuck on every CollectionViewGroup
so i've overridden the OnKeyDown event in the DataGrid and handled all necessary keys. When now the key get's pressed i check if the next item in the list is a DataItem and
then assign it to the SelectedItem Property of the Datagrid. So far so good. 

but now the problem: the Cell focus doesn't shift like it should do, when i press the down key 2 or 3 times the focus (dotted line around a control) starts again at the top, the right row is still Selected!!

If've already tried to set the FocusedElement with Keyboard.Focus, directly with .Focus onto the Cell and the Row and I just don't know what I should do now.

Anyone has a suggestion were and how I could get that thing to work? (I suspect the DataGridCell to be the Problem, because I work with FullRowSelect)

regards
Thomas