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

[Solved] Simple Hierarchy?

1 Answer 125 Views
GridView
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Ross Wozniak
Top achievements
Rank 1
Ross Wozniak asked on 25 Jun 2009, 08:11 PM
Is there a simple way to have expandable rows in a GridView. For example, I want to display 2 of 3 properties of an object in the grid, but want the 3rd one to appear when the user clicks the row...or clicks a plus sign on the left (either way)?

With the Silverlight Toolkit grid it is incredibly easy:

            <datagrid:DataGrid x:Name="dataGrid" ItemsSource="{Binding}">
                <datagrid:DataGrid.RowDetailsTemplate>
                    <DataTemplate>                        
                                <TextBlock Text="{Binding MyThirdProperty}" />
                    </DataTemplate>
                </datagrid:DataGrid.RowDetailsTemplate>
            </datagrid:DataGrid>

I've simplified this code a bit (I would actually have to define the first two columns manually), and I know they are not using animations to make it slide down smoothly, but this is something that should be really simple for a developer to achieve. I've been looking at some of the code in your samples and it is incredibly complex. Tons of lines of code to set up a row style and a bunch of supporting methods in the code-behind...including some really, really ugly code like this:

FrameworkElement mainGrid =

(FrameworkElement)((FrameworkElement)((FrameworkElement)((FrameworkElement)frameworkElement.Parent).Parent).Parent).Parent;

RunAnimation(mainGrid, "hideDetails", GetHeightsSynchronizer(mainGrid));



I'd just go ahead and use the Silverlight Toolkit DataGrid, except that I need the filtering capability that you guys offer.

Thanks,
Ross

1 Answer, 1 is accepted

Sort by
0
Milan
Telerik team
answered on 03 Jul 2009, 06:31 AM
Hello Ross Wozniak,

Our upcoming release (Q2 2009), which is due next week, introduces row details to RadGridView. You will be able to define row details the same way as you do when using Microsoft's DataGrid control.

Greetings,
Milan
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.
Tags
GridView
Asked by
Ross Wozniak
Top achievements
Rank 1
Answers by
Milan
Telerik team
Share this question
or