how to access properties of ComboBox in the RadGridView

2 posts, 0 answers
  1. Manohar
    Manohar avatar
    3 posts
    Member since:
    Sep 2012

    Posted 19 Oct 2012 Link to this post

    Hi Team,

    I have an issue in  RadDataGrid.

    I need to set  cmbbox.DroppedDown =true for a windows combobox on it's foucs but I coudn't. 

    I can achieve it when the combobox is out of the RadGrid.

    Please help me out with a technique. Thanks in advance.
    --
    Regards,
    Manohar
  2. Stefan
    Admin
    Stefan avatar
    2891 posts

    Posted 23 Oct 2012 Link to this post

    Hello Manohar,

    Thank you for writing.

    If I understand correctly, you want to show the popup of a cell in GridViewComboBoxColumn in RadGridView. If so, you need to first call the BeginEdit method of the desired cell, and then handle the CellEditorInitialized event, where you can open the popup:
    void radGridView1_CellEditorInitialized(object sender, GridViewCellEventArgs e)
    {
        RadDropDownListEditor editor = e.ActiveEditor as RadDropDownListEditor;
        if (editor != null)
        {
            ((RadDropDownListEditorElement)editor.EditorElement).ShowPopup();
        }
    }
     
     
    void radButton1_Click(object sender, EventArgs e)
    {
        radGridView1.Rows[2].Cells["combo"].BeginEdit();
    }

    More information about the editors in the grid is available here: http://www.telerik.com/help/winforms/gridview-editors.html.

    I hope this helps. 
     
    All the best,
    Stefan
    the Telerik team
    You’ve been asking for it and now it’s time for us to deliver. RadControls for WinForms Q3 2012 release is just around the corner. Sign up for a free webinar to see first all the latest enhancements.
  3. UI for WinForms is Visual Studio 2017 Ready
Back to Top