This is a migrated thread and some comments may be shown as answers.
RadDropDownListEditor Listelement???
1 Answer 7 Views
This is a migrated thread and some comments may be shown as answers.
Curtis
Top achievements
Rank 1
Curtis asked on 08 Feb 2018, 08:41 PM

I've been searching and searching lol - the nested properties are impressive!  Somewhere in side a RadDropDownListEditor there's a ListElement where I can change the back color and border color and size...but after several hours, this eludes me.

Can someone show me how to access the ListElement of a RadDropDownListEditor please :)  THANK YOU!!!

-C

 

1 Answer, 1 is accepted

Sort by
0
Accepted
Dimitar
Telerik team
answered on 09 Feb 2018, 12:37 PM
Hello Curtis,

The editor does not inherit RadElement and is not part of the control hierarchy. This class is used as a layer between the grid and the editor control. All editors have the EditorElement property which contains the actual element that is used. Here is how to access the ListElement: 
private void RadGridView1_CellEditorInitialized(object sender, Telerik.WinControls.UI.GridViewCellEventArgs e)
{
    var editor = e.ActiveEditor as RadDropDownListEditor;
    if (editor != null)
    {
        var element = editor.EditorElement as RadDropDownListEditorElement;
        element.ListElement.BackColor = Color.Red;
         
    }
}

Should you have any other questions do not hesitate to ask.

Regards,
Dimitar
Progress Telerik
Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Asked by
Curtis
Top achievements
Rank 1
Answers by
Dimitar
Telerik team
Share this question
or