Remove border from nested grid

5 posts, 0 answers
  1. Prasad
    Prasad avatar
    4 posts
    Member since:
    Jan 2013

    Posted 03 Jun 2014 Link to this post

    I am using GridView control which displays data using nested grid [using child template etc]. I need to remove the border around the nested grid. Since nested grids can go up to n'th level, the border around it is really taking too much space on the screen. Is there any way to do it. Any help is really appreciated. Thanks.
  2. Stefan
    Admin
    Stefan avatar
    2908 posts

    Posted 04 Jun 2014 Link to this post

    Hi Prasad,

    Thank you for writing.

    To hide the desired borders you should use the ViewCellFormatting event of RadGridView and remove the GridViewDetailCellElement (the cell holding the child grid) Padding:
    void radGridView1_ViewCellFormatting(object sender, CellFormattingEventArgs e)
    {
        GridDetailViewCellElement detailCell = e.CellElement as GridDetailViewCellElement;
        if (detailCell != null)
        {
            detailCell.Padding = Padding.Empty;
        }
    }

    I hope this helps.

    Regards,
    Stefan
    Telerik
     
    Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
     
  3. Prasad
    Prasad avatar
    4 posts
    Member since:
    Jan 2013

    Posted 04 Jun 2014 in reply to Stefan Link to this post

    Perfect!

    Thanks for the quick response.
  4. Mithilesh
    Mithilesh avatar
    2 posts
    Member since:
    May 2015

    Posted 08 Aug 2017 in reply to Stefan Link to this post

    Hi Team, I am getting same issue. And I use web form. Could you please provide solution as it does not work in web form.

    Thanks,

    Mithilesh

  5. Dess | Tech Support Engineer, Sr.
    Admin
    Dess | Tech Support Engineer, Sr.  avatar
    3530 posts

    Posted 09 Aug 2017 Link to this post

    Hello Mithilesh, 

    Thank you for writing.  

    Note that this forum is related to the Telerik UI for WinForms product. However, your question doesn't seem to be related to this product. Feel free to post your question in the relevant forum: http://www.telerik.com/forums

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

    Regards,
    Dess
    Progress Telerik
    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.
Back to Top