Completed
Last Updated: 28 Jun 2016 10:18 by ADMIN
ADMIN
Dess | Tech Support Engineer, Sr.
Created on: 24 Jun 2016 13:17
Category: PageView
Type: Bug Report
1
FIX. RadPageView - disabled pages shouldn't be selected when navigating with arrow keys
To reproduce:

1. Add a RadPageView with several pages.
2. Disabled some of the pages.
3. When running the application, try to navigate through pages with the arrow keys. You will notice that the disabled pages are also selected.

Workaround: 

public class CustomPageView : RadPageView
{
    public override string ThemeClassName  
    { 
        get 
        { 
            return typeof(RadPageView).FullName;  
        }
    }

    protected override RadPageViewElement CreateUI()
    {
        if (this.ViewMode == PageViewMode.Strip)
        {
            return new CustomViewElement();
        }
        return base.CreateUI();
    }
}

public class CustomViewElement : RadPageViewStripElement
{
    protected override Type ThemeEffectiveType     
    { 
        get    
        { 
            return typeof(RadPageViewStripElement);     
        }
    }

    protected override bool CanSelectItem(RadPageViewItem item)
    {
        bool result= base.CanSelectItem(item);
        return result && item.Enabled;
    }
}
(Total attached files size should be smaller than 20mb. Allowed extensions: .zip, .rar, .jpg, .png, .gif)
0 comments