Completed
Last Updated: 26 Jul 2018 08:52 by Dimitar
ADMIN
Dess | Tech Support Engineer, Sr.
Created on: 19 Jul 2018 10:52
Category:
Type: Bug Report
4
FIX. RadDropDownList - ArgumentOutOfRangeException on MouseWheel in an empty drop down
To reproduce: please refer to the attached sample project and try to mouse wheel when no items exist in the drop down.

Workaround:         
public class CustomDropDownList : RadDropDownList
        {
            protected override RadDropDownListElement CreateDropDownListElement()
            {
                return new CustomRadDropDownListElement();
            }

            public override string ThemeClassName  
            { 
                get 
                { 
                    return typeof(RadDropDownList).FullName;  
                }
            }
        }

        public class CustomRadDropDownListElement : RadDropDownListElement
        {
            protected override void HandleSelectNextOrPrev(bool next, bool startFromBeginningIfEndReached)
            {
                if (this.Items.Count == 0)
                {
                    return;
                }
                base.HandleSelectNextOrPrev(next, startFromBeginningIfEndReached);
            }

            protected override Type ThemeEffectiveType     
            { 
                get    
                { 
                    return typeof(RadDropDownListElement);     
                }
            }
        }
(Total attached files size should be smaller than 20mb. Allowed extensions: .zip, .rar, .jpg, .png, .gif)
0 comments