I'm trying to focus a specific row. I've searched this forum and for every question on how to do this, there is a different answer on how to do it; and I have yet to find one that works.
I've tried grid.GetRowForItem() which takes a parameter of object called item. I've tried passing in both the grid.CurrentItem and grid.SelectedItem, but this method always returns null. What am I supposed to pass in as the parameter? If I were to get a row back, I think I could call row.Focus().
I am also setting grid.CurrentItem and grid.SelectedItem to my new object and then calling grid.ScrollIntoView(item). The scrolling into view is working.
There seems to be two different indicators for a focused row. There is one where the record is gray, and one where the record is yellow. I believe grid.SelectedItem is working and setting the correct row to the grayish color. However, I have to click into the row in order for it to actually be selected.
I have also tried setting grid.IsSynchronizedWithCurrentItem = true, but this has no effect.
How do I do this?
I've tried grid.GetRowForItem() which takes a parameter of object called item. I've tried passing in both the grid.CurrentItem and grid.SelectedItem, but this method always returns null. What am I supposed to pass in as the parameter? If I were to get a row back, I think I could call row.Focus().
I am also setting grid.CurrentItem and grid.SelectedItem to my new object and then calling grid.ScrollIntoView(item). The scrolling into view is working.
There seems to be two different indicators for a focused row. There is one where the record is gray, and one where the record is yellow. I believe grid.SelectedItem is working and setting the correct row to the grayish color. However, I have to click into the row in order for it to actually be selected.
I have also tried setting grid.IsSynchronizedWithCurrentItem = true, but this has no effect.
How do I do this?