Completed
Last Updated: 29 Oct 2013 06:22 by ADMIN
ADMIN
Dess | Tech Support Engineer, Principal
Created on: 29 Oct 2013 06:22
Category:
Type: Bug Report
1
FIX. - RadListView in IconsView and Horizontal ViewElement.Orientation does not navigate its items correctly using arrow keys
To reproduce:
-add RadListView and populate it with several items;
-use the following code:
radListView1.ViewType = Telerik.WinControls.UI.ListViewType.IconsView; radListView1.ListViewElement.ViewElement.Orientation = Orientation.Horizontal; 

When you are navigating through items using the arrow keys, Left/Right moves Up/Down, and Up/Down moves Left/Right.

Workaround:use custom list view

public class MyListView : RadListView
{
    protected override RadListViewElement CreateListViewElement()
    {
        return new MyBaseListViewElement();
    }
}

public class MyBaseListViewElement : RadListViewElement
{
    protected override BaseListViewElement CreateViewElement()
    {
        return new MyIconListViewElement(this);
    }
}

public class MyIconListViewElement : IconListViewElement
{
    public MyIconListViewElement(RadListViewElement owner) : base(owner)
    {
    }

    protected override void HandleDownKey(KeyEventArgs e)
    {
        base.HandleRightKey(e);
    }

    protected override void HandleUpKey(KeyEventArgs e)
    {
        base.HandleLeftKey(e);
    }

    protected override void HandleLeftKey(KeyEventArgs e)
    {
        base.HandleUpKey(e);
    }

    protected override void HandleRightKey(KeyEventArgs e)
    {
        base.HandleDownKey(e);                
    }
}
0 comments