GridViewComboBoxColumn custom DropDownWidth

2 posts, 0 answers
  1. h
    h avatar
    3 posts
    Member since:
    Nov 2016

    Posted 26 Oct 2017 Link to this post

    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.

  2. Hristo
    Admin
    Hristo avatar
    1510 posts

    Posted 30 Oct 2017 Link to this post

    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.
Back to Top