This is a migrated thread and some comments may be shown as answers.

Remove border from nested grid

4 Answers 162 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Prasad
Top achievements
Rank 1
Prasad asked on 03 Jun 2014, 08:41 PM
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.

4 Answers, 1 is accepted

Sort by
0
Stefan
Telerik team
answered on 04 Jun 2014, 08:10 AM
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.
 
0
Prasad
Top achievements
Rank 1
answered on 04 Jun 2014, 01:22 PM
Perfect!

Thanks for the quick response.
0
Mithilesh
Top achievements
Rank 1
answered on 08 Aug 2017, 11:05 PM

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

0
Dess | Tech Support Engineer, Principal
Telerik team
answered on 09 Aug 2017, 06:55 AM
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.
Tags
GridView
Asked by
Prasad
Top achievements
Rank 1
Answers by
Stefan
Telerik team
Prasad
Top achievements
Rank 1
Mithilesh
Top achievements
Rank 1
Dess | Tech Support Engineer, Principal
Telerik team
Share this question
or