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

Drop Down Height of GridViewComboBoxColumn

5 Answers 230 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Todd
Top achievements
Rank 1
Todd asked on 27 Oct 2010, 08:21 PM
How do I set the height (number of entries) displayed when a user drops down a GridViewComboBoxColumn?

5 Answers, 1 is accepted

Sort by
0
Emanuel Varga
Top achievements
Rank 1
answered on 27 Oct 2010, 09:32 PM
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
0
Todd
Top achievements
Rank 1
answered on 27 Oct 2010, 10:26 PM
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?
0
Accepted
Emanuel Varga
Top achievements
Rank 1
answered on 27 Oct 2010, 10:32 PM
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
0
panchooo
Top achievements
Rank 2
answered on 20 Nov 2010, 12:17 AM
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
0
Emanuel Varga
Top achievements
Rank 1
answered on 20 Nov 2010, 01:49 AM
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
Tags
GridView
Asked by
Todd
Top achievements
Rank 1
Answers by
Emanuel Varga
Top achievements
Rank 1
Todd
Top achievements
Rank 1
panchooo
Top achievements
Rank 2
Share this question
or