GridViewMultiComboBoxColumn - Hide horizontal grid lines

3 posts, 0 answers
  1. Paul
    Paul avatar
    11 posts
    Member since:
    May 2013

    Posted 21 Mar 2014 Link to this post

    How can I hide the horizontal grid lines in the GridViewMultiComboBoxColumn?

    Thanks!
  2. Stefan
    Admin
    Stefan avatar
    2891 posts

    Posted 26 Mar 2014 Link to this post

    Hi Paul,

    Please refer to the other forum thread where you have asked the same question. You will find our answer there: http://www.telerik.com/forums/multicolumncombobox---turn-off-grid-lines#VXM7EVBGZkqBTBrooZ0Gzw.

    I hope this helps.

    Regards,
    Stefan
    Telerik
     

    Build cross-platform mobile apps using Visual Studio and .NET. Register for the online webinar on 03/27/2014, 11:00AM US ET.. Seats are limited.

     
  3. UI for WinForms is Visual Studio 2017 Ready
  4. Stefan
    Admin
    Stefan avatar
    2891 posts

    Posted 26 Mar 2014 Link to this post

    I should have added information how to access the editor in order to subscribe to the ViewCellFormatting event. Here is a small sample:
    void radGridView1_CellEditorInitialized(object sender, GridViewCellEventArgs e)
    {
        RadMultiColumnComboBoxElement mccb = e.ActiveEditor as RadMultiColumnComboBoxElement;
        if (mccb != null)
        {
            mccb.EditorControl.ViewCellFormatting -= EditorControl_ViewCellFormatting;
            mccb.EditorControl.ViewCellFormatting += EditorControl_ViewCellFormatting;
        }
    }
     
    void EditorControl_ViewCellFormatting(object sender, CellFormattingEventArgs e)
    {
        e.CellElement.BorderBoxStyle = BorderBoxStyle.FourBorders;
     
        e.CellElement.BorderTopWidth = 0;
        e.CellElement.BorderBottomWidth = 0;
     
        e.CellElement.BorderLeftColor = e.CellElement.BorderColor;
        e.CellElement.BorderRightColor = e.CellElement.BorderColor;
    }

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

    Let me know how this works for you. 

    Regards,
    Stefan
    Telerik
     

    Build cross-platform mobile apps using Visual Studio and .NET. Register for the online webinar on 03/27/2014, 11:00AM US ET.. Seats are limited.

     
Back to Top