MultiColumnComboBox - Turn off grid lines

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

    Posted 21 Feb 2014 Link to this post

    How can I turn off the grid lines in a MultiColumnComboBox?

    Thanks,

    David
  2. Answer
    Stefan
    Admin
    Stefan avatar
    2891 posts

    Posted 24 Feb 2014 Link to this post

    Hello Paul,

    Thank you for writing. 

    To do that you can use the ViewCellFormatting event of the inner grid:
    radMultiColumnComboBox1.EditorControl.ViewCellFormatting += EditorControl_ViewCellFormatting;
     
    void EditorControl_ViewCellFormatting(object sender, CellFormattingEventArgs e)
            {
                e.CellElement.DrawBorder = false;
            }

    I hope this helps. 

    Regards,
    Stefan
    Telerik
  3. UI for WinForms is Visual Studio 2017 Ready
  4. Paul
    Paul avatar
    11 posts
    Member since:
    May 2013

    Posted 24 Feb 2014 in reply to Stefan Link to this post

    Thanks Stefan, that did the trick!
  5. Paul
    Paul avatar
    11 posts
    Member since:
    May 2013

    Posted 06 Mar 2014 in reply to Stefan Link to this post

    How about if I'd like to only show the vertical lines?
  6. Stefan
    Admin
    Stefan avatar
    2891 posts

    Posted 07 Mar 2014 Link to this post

    Hello Paul,

    Here you are:
    void EditorControl_ViewCellFormatting(object sender, CellFormattingEventArgs e)
    {
        e.CellElement.BorderTopWidth = 0;
        e.CellElement.BorderBottomWidth = 0;
    }

    I hope this helps.

    Regards,
    Stefan
    Telerik

    DevCraft Q1'14 is here! Watch the online conference to see how this release solves your top-5 .NET challenges. Watch on demand now.

  7. Paul
    Paul avatar
    11 posts
    Member since:
    May 2013

    Posted 07 Mar 2014 in reply to Stefan Link to this post

    Stefan,

    Using that code, my dropdown still has horizontal lines.  Sample attached.
  8. Paul
    Paul avatar
    11 posts
    Member since:
    May 2013

    Posted 07 Mar 2014 in reply to Stefan Link to this post

    Sample
  9. Paul
    Paul avatar
    11 posts
    Member since:
    May 2013

    Posted 07 Mar 2014 in reply to Stefan Link to this post

    Let's try this attachment again.
  10. Paul
    Paul avatar
    11 posts
    Member since:
    May 2013

    Posted 07 Mar 2014 in reply to Stefan Link to this post

    Well, just like Telerik's products, their website refuses to work properly.  Here's a link to the sample.

    http://rxcmpd.com/downloads/Clipboard01.jpg
  11. Stefan
    Admin
    Stefan avatar
    2891 posts

    Posted 07 Mar 2014 Link to this post

    Hi Paul,

    Different themes have different styling for the borders. My previous reply was based on the default theme for the suite. I did not know that you were using the TelerikMetroBlue theme. The latter is using a single border for the cells, rather than four borders, hence the previous snippet did not work for it. Please give the following approach a try:
    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;
     }

    In addition, may I please ask you what are the difficulties you had experienced with the site. What file (extension) you were trying to attach? How big was it?

    I am looking forward to your reply. 

    Regards,
    Stefan
    Telerik

    DevCraft Q1'14 is here! Watch the online conference to see how this release solves your top-5 .NET challenges. Watch on demand now.

  12. Paul
    Paul avatar
    11 posts
    Member since:
    May 2013

    Posted 07 Mar 2014 in reply to Stefan Link to this post

    Thanks Stefan, that works great.  I am using a custom theme, not the default.

    I tried to upload a 7kb png file and a 7kb jpg file.  I received an error when posting, but the message did post, but without the attachment.
  13. Stefan
    Admin
    Stefan avatar
    2891 posts

    Posted 10 Mar 2014 Link to this post

    Hi Paul,

    I am glad everything is OK with this case on your end now. 

    In regards to the attachment issue, I have informed the responsible division and they will look into this case. If needed, they will contact you for additional information.

    Regards,
    Stefan
    Telerik

    DevCraft Q1'14 is here! Watch the online conference to see how this release solves your top-5 .NET challenges. Watch on demand now.

  14. Iva
    Admin
    Iva avatar
    32 posts

    Posted 14 Mar 2014 Link to this post

    Hello Paul,

    We apologize for the caused inconveniece! Unfortunately, we were not able to reproduce the problem with attaching a .jpg file to the forum post. Could you please provide us some additional information about the problem, for example the file you`ve tried to attach, the browser you used. Thank you for the cooperation!
     
    Regards,
    Iva
    Telerik
     

    DevCraft Q1'14 is here! Watch the online conference to see how this release solves your top-5 .NET challenges. Watch on demand now.

     
Back to Top
UI for WinForms is Visual Studio 2017 Ready