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

How to remove the gray space wrap around child talbe?

0 Answers 40 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Timothy Liu
Top achievements
Rank 1
Timothy Liu asked on 02 Aug 2010, 01:09 AM
Dear Sir,

I'm trying to merge child table to its parent table, make them look like in a single grid view. The problem is - what's the container of a child table? I want to give it a style to remove the gray space around the child table. Please see attachment.

Thanks and Regards,
Tim

Solution
Ah, I've work it out! There are 2 method to do this.

1. Use VisualTreeHelp remove the gray space dynamicaly. You should add handler to child table's Loaded event. Use VisualTreeHelp find the parent of your child table, you'll get a ContentPresenter; use VisualTreeHelp to find the parent of the ContentPresenter, you'll get a Border - THAT IS! Set the Padding property of this Border to new Thickness(0), better, set the BorderThickness to 0.

2. Use GridViewRow sytle to do this staticaly. You should darg a GridViewRow control into you Blend stage, Edit a copy of its style. Mmm... find that Border whos Padding equals to 6, set it to 0. Don't foget BorderThickness. Finally, set the RadGridView's RowStyle to this style.

Suggestion

To Telerik, I suggest that this border should be customizable. And, the ChildTableTemplate's function overlaps with this border.

Thanks and Regards

No answers yet. Maybe you can help?

Tags
GridView
Asked by
Timothy Liu
Top achievements
Rank 1
Share this question
or