This question is locked. New answers and comments are not allowed.
I am using a RadGridView, and want to set the selected item in the list programatically. I am doing this,
SelectedItem = blah;
ScrollIntoView();
And that works except that it doesn't move the focus to that item. There is still a small border around the original selected item. If I hit the up or down key on my keyboard it jumps to the item above or below the item I had selected originally.
I saw another forum post suggesting I do this,
ScrollIntoViewAsync(SelectedItem, r =>
{
var row = r as GridViewRow;
if (row != null)
{
row.IsCurrent = true;
row.Focus();
}
});
But that made no difference.
I have attached a screenshot showing the small remaining focus rectangle I mention. It is around TANUNDA DRIVE.
SelectedItem = blah;
ScrollIntoView();
And that works except that it doesn't move the focus to that item. There is still a small border around the original selected item. If I hit the up or down key on my keyboard it jumps to the item above or below the item I had selected originally.
I saw another forum post suggesting I do this,
ScrollIntoViewAsync(SelectedItem, r =>
{
var row = r as GridViewRow;
if (row != null)
{
row.IsCurrent = true;
row.Focus();
}
});
But that made no difference.
I have attached a screenshot showing the small remaining focus rectangle I mention. It is around TANUNDA DRIVE.