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

remove Drag a column header .. from Grid

6 Answers 2135 Views
GridView
This is a migrated thread and some comments may be shown as answers.
john
Top achievements
Rank 1
john asked on 28 Aug 2009, 04:17 PM
I am looking for an option to remove the "drag a column header and drop it here to group ..." from a child grid in a grid hierachy:

It is occupying unnecassary space as the user cannot move columns .I tried CanUserReorderColumns

 

="False"  but it still shows up

Thanks

 

6 Answers, 1 is accepted

Sort by
0
Ludovic Gerbault
Top achievements
Rank 1
answered on 28 Aug 2009, 04:38 PM
try setting the property ShowGroupPanel in the child grid, that should do it.
0
john
Top achievements
Rank 1
answered on 28 Aug 2009, 05:29 PM
I did as my XAML is:

<

 

telerikGridView:RadGridView x:Name="MyGrid" AutoGenerateColumns="false" ShowGroupPanel="False" CanUserReorderColumns="False" >

 

 

 

<telerikGridView:RadGridView.Columns >

 

 

 

<telerikGridView:GridViewDataColumn UniqueName="Name" Header="Name" />

 

 

 

</telerikGridView:RadGridView.Columns>

 

 

 

</telerikGridView:RadGridView>

 

0
Ludovic Gerbault
Top achievements
Rank 1
answered on 28 Aug 2009, 05:36 PM
do you have the same property in your childgrid definition in the grid hierarchy ?
0
john
Top achievements
Rank 1
answered on 28 Aug 2009, 05:52 PM
My xaml is as above and the code looks like:

 

GridViewTableDefinition detailDefinition = new GridViewTableDefinition();

 

 

detailDefinition.Relation =

new PropertyRelation("items");

 

 

this.MyGrid.TableDefinition.ChildTableDefinitions.Add(detailDefinition);

 

 

this.MyGrid.ItemsSource = rates;

So I am defining the child grid in code but how do I do it is xaml or what code do I need? all the examples show using the hierachy as I did

 

0
Vlad
Telerik team
answered on 31 Aug 2009, 06:23 AM
Hi john,

You can use HierarchyChildTemplate similar to our "First Look" demo.

Greetings,
Vlad
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
john
Top achievements
Rank 1
answered on 31 Aug 2009, 12:58 PM
Tags
GridView
Asked by
john
Top achievements
Rank 1
Answers by
Ludovic Gerbault
Top achievements
Rank 1
john
Top achievements
Rank 1
Vlad
Telerik team
Share this question
or