This is a migrated thread and some comments may be shown as answers.

GridViewComboBoxColumn custom DropDownWidth

1 Answer 217 Views
GridView
This is a migrated thread and some comments may be shown as answers.
h
Top achievements
Rank 1
h asked on 26 Oct 2017, 05:13 PM

I have GridViewComboBixColum in a RadGridview, is there the posibility to change the width of the items that are displayed?, because the column is too short to allow see all the items that are contained in the DropDown.
Thanks in advance.

1 Answer, 1 is accepted

Sort by
0
Hristo
Telerik team
answered on 30 Oct 2017, 02:22 PM
Hi,

Thank you for writing.

You can handle the CellEditorInitialized event of the grid and then set the DropDownWidth property of the element holding the drop-down list: 
private void radGridView1_CellEditorInitialized(object sender, GridViewCellEventArgs e)
{
    RadDropDownListEditor editor = e.ActiveEditor as RadDropDownListEditor;
    if (editor != null)
    {
        RadDropDownListEditorElement element = (RadDropDownListEditorElement)editor.EditorElement;
        element.DropDownWidth = 200;
    }
}

I hope this helps. Should you have further questions please do not hesitate to write back.

Regards,
Hristo
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.
Tags
GridView
Asked by
h
Top achievements
Rank 1
Answers by
Hristo
Telerik team
Share this question
or