Drop Down Height of GridViewComboBoxColumn

6 posts, 1 answers
  1. Todd
    Todd avatar
    3 posts
    Member since:
    Aug 2010

    Posted 27 Oct 2010 Link to this post

    How do I set the height (number of entries) displayed when a user drops down a GridViewComboBoxColumn?
  2. Emanuel Varga
    Emanuel Varga avatar
    1336 posts
    Member since:
    May 2010

    Posted 27 Oct 2010 Link to this post

    Hello,

    One very easy way to do that would be handling the CellBeginEdit event set the minimum displayed items in the dropdown there, like so:
    void radGridView1_CellBeginEdit(object sender, GridViewCellCancelEventArgs e)
    {
        var dropDownEditor = radGridView1.ActiveEditor as RadDropDownListEditor;
        if (dropDownEditor != null)
        {
            var dropDownEditorElement = dropDownEditor.EditorElement as RadDropDownListEditorElement;
            dropDownEditorElement.DefaultItemsCountInDropDown = 3;
        }
    }

    Hope this helps, if you have any other questions or comments, please let me know,

    Best Regards,
    Emanuel Varga
  3. UI for WinForms is Visual Studio 2017 Ready
  4. Todd
    Todd avatar
    3 posts
    Member since:
    Aug 2010

    Posted 27 Oct 2010 Link to this post

    Hi Emanuel,

    Thanks for replying to my question.  I set the DefaultItemsCountInDropDown = 10.  But, only seven entries display in the ddl.  Is seven the maximun number entries you can display in a GridViewComboBoxColumn?
  5. Answer
    Emanuel Varga
    Emanuel Varga avatar
    1336 posts
    Member since:
    May 2010

    Posted 27 Oct 2010 Link to this post

    Hello Todd,

    Try changing the DefaultItemsCountInDropDown with
    dropDownEditorElement.MaxDropDownItems = 10;

    This should show 10 items in the dropdown.

    Hope this helps, if you have any other questions or comments, please let me know,

    Best Regards,
    Emanuel Varga
  6. panchooo
    panchooo avatar
    13 posts
    Member since:
    Jun 2009

    Posted 19 Nov 2010 Link to this post

    Hi guys i also need to change de height of gridviewcomboboxcolumn, but the height of the rows of the drop down items.

    Im using gridview in a touch screen and the default size is to small.

    Thanks
  7. Emanuel Varga
    Emanuel Varga avatar
    1336 posts
    Member since:
    May 2010

    Posted 19 Nov 2010 Link to this post

    Hello panchooo,

    This question has a different solution, i would like to ask you to create a new Thread with this question because others might be interested in this answer also.

    Best Regards,
    Emanuel Varga
    Telerik WinForms MVP
Back to Top
UI for WinForms is Visual Studio 2017 Ready