GridViewComboBoxColumn

3 posts, 0 answers
  1. Matthias
    Matthias avatar
    5 posts
    Member since:
    Oct 2013

    Posted 16 Dec 2016 Link to this post

    Hello

    I have two questions about the GridViewComboBoxColumn:

     

    1. When I start editing a cell form a GridViewComboBoxColumn it always clears the currently displayed value. How can I disable that?

    2. How can I change the item height of the drop down list? Is there something like the ItemHeight property of the ListElement of a RadDropDownList?

     

    Best regards

    Matthias Reiseder

  2. Dess | Tech Support Engineer, Sr.
    Admin
    Dess | Tech Support Engineer, Sr.  avatar
    4086 posts

    Posted 16 Dec 2016 Link to this post

    Hello Matthias,

    Thank you for writing.  

    Please refer to the following help article demonstrating how to setup the GridViewComboBoxColumn:  http://docs.telerik.com/devtools/winforms/gridview/columns/column-types/gridviewcomboboxcolumn

    It is necessary to specify the DisplayMember and ValueMember properties. The cells values must be valid according to the applied ValueMember and the available records in the DataSource. Thus, the editor will be initialized with the cell's value.

    As to the second question, in order to increase the item height in the popup, handle the CellEditorInitialized as below:
    private void radGridView1_CellEditorInitialized(object sender, GridViewCellEventArgs e)
    {
        RadDropDownListEditor ddl = e.ActiveEditor as RadDropDownListEditor;
        if (ddl!=null)
        {
            RadDropDownListEditorElement el = ddl.EditorElement as RadDropDownListEditorElement;
            el.ItemHeight = 40;
        }
    }

    I hope this information helps. Should you have further questions I would be glad to help.

    Regards,
    Dess
    Telerik by Progress
    Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
  3. Matthias
    Matthias avatar
    5 posts
    Member since:
    Oct 2013

    Posted 19 Dec 2016 in reply to Dess | Tech Support Engineer, Sr. Link to this post

    Hello Dess,

    that answered my questions and I got it to work. Thank you.

    Best regards
    Matthias Reiseder

Back to Top