Padding

4 posts, 0 answers
  1. Stephen
    Stephen avatar
    38 posts
    Member since:
    Mar 2008

    Posted 12 Jun 2009 Link to this post

    I'm trying to get a little space around the items in the grid, some right-justified numbers are running right up against the grid line. I tried setting the Padding attribute of the RadGridView but it does not seem to have any noticeable effect. Can you advise if this should do what I expect?

    Stephen
  2. Jack
    Admin
    Jack avatar
    2335 posts

    Posted 15 Jun 2009 Link to this post

    Hello Stephen,

    You can handle CellFormatting event and set the Padding property of the cell. Here is sample code:

    void radGridView1_CellFormatting(object sender, CellFormattingEventArgs e) 
    {             
        e.CellElement.Padding = new Padding(0, 0, 5, 0); 

    If you need further assistance, I will be glad to help.

    Kind regards,
    Jack
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  3. UI for WinForms is Visual Studio 2017 Ready
  4. Jeremy Murtishaw
    Jeremy Murtishaw avatar
    86 posts
    Member since:
    Apr 2009

    Posted 09 Jul 2009 Link to this post

    Hello,

    I am having this trouble as well, but using this workaround isn't compatible with BestFit, since it widens the contents of the column by the padding, causing some cells to be forced to contain elipses... because the content no longer fits. Is there a way to implement padding while still having a proper bestfit?

    Thanks!
    Jeremy
  5. Jack
    Admin
    Jack avatar
    2335 posts

    Posted 10 Jul 2009 Link to this post

    Hi Jeremy Murtishaw,

    We addressed this issue in our latest release - Q2 2009. I recommend that you try it. We will also appreciate any feedback from you. If you have further questions, please write us back.

    Kind regards,
    Jack
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
Back to Top