Completed
Last Updated: 23 Apr 2014 12:56 by ADMIN
ADMIN
Plamen
Created on: 20 Feb 2013 07:06
Category:
Type: Bug Report
0
FIX. RadDropDownList - Cannot add images to a RadDropDownListEditableAreaElement
Workaround:

        this.radDropDownList1.DropDownStyle = Telerik.WinControls.RadDropDownStyle.DropDownList;

        this.radDropDownList1.SelectedIndexChanged += new Telerik.WinControls.UI.Data.PositionChangedEventHandler(radDropDownList1_SelectedIndexChanged);

        void radDropDownList1_SelectedIndexChanged(object sender, Telerik.WinControls.UI.Data.PositionChangedEventArgs e)
        {        
            this.radDropDownList1.DropDownListElement.EditableElement.TextImageRelation = TextImageRelation.ImageBeforeText;

            if (this.radDropDownList1.SelectedIndex != -1)
            {
                this.radDropDownList1.DropDownListElement.EditableElement.Image = this.radDropDownList1.SelectedItem.Image;
            }
            else
            {
                this.radDropDownList1.DropDownListElement.EditableElement.Image = null;
            }
        }
0 comments