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

GridViewRowDetailsEventArgs not fired

3 Answers 31 Views
GridView
This is a migrated thread and some comments may be shown as answers.
loic
Top achievements
Rank 1
loic asked on 21 Feb 2011, 12:10 PM
Hello,

I am trying to populate a child RadGridView in a parent RadGridView, only when a parent row is expended (Because of too much data)
I tried to use the RowDetailsVisibilityChanged event, but It never fired. So tried the LoadingRowDetails event with the same ressult.
This two events work with GridViewRowDetailsEventArgs, So, I guess I have something wrong in my code which generates a compatibility issue, but I really don't know what and why.

This is my Xaml code

 

 

<telerikGrid:RadGridView x:Name="dgMetaRess" VerticalAlignment="Stretch" AutoGenerateColumns="False" UseAlternateRowStyle="True"

 

 

Margin="10,10,10,0" Visibility="Visible" CanUserSortColumns="True" ShowGroupPanel="False"

 

 

 

Style="{StaticResource RadGridViewStyle}" RowDetailsVisibilityChanged="dgMetaRess_RowDetailsVisibilityChanged"

 

 

RowDetailsVisibilityMode="Collapsed" LoadingRowDetails="dgMetaRess_LoadingRowDetails"

 

 

 

IsReadOnly="True" DataLoaded="MakeDataGridViewTransparent_DataLoaded">

 

 

 

    <telerikGrid:RadGridView.ChildTableDefinitions>

 

 

 

         <telerikGrid:GridViewTableDefinition />

 

 

 

    </telerikGrid:RadGridView.ChildTableDefinitions>

 

 

 

<telerikGrid:RadGridView.Columns>

 

 

 

    <telerikGrid:GridViewDataColumn HeaderCellStyle="{StaticResource HeaderStyle}" Header="Domain" DataMemberBinding="{Binding Domain}" Width="Auto"/>

 

 

 

    <telerikGrid:GridViewDataColumn HeaderCellStyle="{StaticResource HeaderStyle}" Header="Label" DataMemberBinding="{Binding Label}" Width="Auto"/>

 

 

 

    <telerikGrid:GridViewDataColumn HeaderCellStyle="{StaticResource HeaderStyle}" Header="Global Time Zone" DataMemberBinding="{Binding GlobalTZ}" Width="Auto"/>

 

 

 

    <telerikGrid:GridViewDataColumn HeaderCellStyle="{StaticResource HeaderStyle}" Header="User" DataMemberBinding="{Binding User}" Width="Auto"/>

 

 

 

    <telerikGrid:GridViewDataColumn HeaderCellStyle="{StaticResource HeaderStyle}" Header="Online" DataMemberBinding="{Binding Online}" Width="Auto"/>

 

 

 

    <telerikGrid:GridViewDataColumn HeaderCellStyle="{StaticResource HeaderStyle}" Header="Archived" DataMemberBinding="{Binding Archived}" Width="Auto"/>

 

 

 

    <telerikGrid:GridViewDataColumn HeaderCellStyle="{StaticResource HeaderStyle}" Header="Use Date" DataMemberBinding="{Binding UseDate}" Width="Auto"/>

 

 

 

    <telerikGrid:GridViewDataColumn HeaderCellStyle="{StaticResource HeaderStyle}" Header="Creation Date" DataMemberBinding="{Binding CreationDate}" Width="Auto"/>

 

 

 

    <telerikGrid:GridViewDataColumn HeaderCellStyle="{StaticResource HeaderStyle}" Header="Discipline" DataMemberBinding="{Binding Discipline}" Width="Auto"/>
</telerikGrid:RadGridView.Columns>

 

 

 

<telerikGrid:RadGridView.HierarchyChildTemplate>

 

 

 

    <DataTemplate>

 

 

 

        <Grid x:Name="grdDataChild" Width="918" Margin="10,0,10,10" HorizontalAlignment="Left" VerticalAlignment="Top" >

 

 

 

            <Grid.RowDefinitions>

 

 

 

                <RowDefinition Height="*"/>

 

 

 

                    <RowDefinition Height="Auto"/>

 

 

 

            </Grid.RowDefinitions>

 

 

 

            <telerikGrid:RadGridView Grid.Row="0" x:Name="dgMetaRessDetail" HorizontalAlignment="Left"

 

 

UseAlternateRowStyle="True" Style="{StaticResource RadGridViewStyle}"

 

 

 

CanUserFreezeColumns="False" AutoGenerateColumns="False"

 

 

 

ItemsSource="{Binding ParametersDetails}"

 

 

 

SelectionChanged="dgMetaRessDetail_SelectionChanged"

 

 

 

ShowGroupPanel="False" IsReadOnly="True"

 

 

DataLoaded="MakeDataGridViewTransparent_DataLoaded" >

 

 

 

                <telerikGrid:RadGridView.Columns >

 

 

 

                    <telerikGrid:GridViewDataColumn Header="Name" HeaderCellStyle="{StaticResource HeaderStyle}" DataMemberBinding="{Binding Name}" Width="*" />

 

 

 

                    <telerikGrid:GridViewDataColumn Header="Identifier" HeaderCellStyle="{StaticResource HeaderStyle}" DataMemberBinding="{Binding Identifier}" Width="*" />

 

 

 

                    <telerikGrid:GridViewDataColumn Header="Definition" HeaderCellStyle="{StaticResource HeaderStyle}" DataMemberBinding="{Binding Definition}" Width="*" />

 

 

 

                </telerikGrid:RadGridView.Columns>

 

 

 

            </telerikGrid:RadGridView>

 

 

 

<!--Pagination Begin-->

 

 

 

<Grid Grid.Row="1" Margin="10" VerticalAlignment="Top" HorizontalAlignment="Stretch">

 

 

 

    <Grid.ColumnDefinitions >

 

 

 

        <ColumnDefinition Width="*"></ColumnDefinition>

 

 

 

        <ColumnDefinition Width="*"></ColumnDefinition>

 

 

 

    </Grid.ColumnDefinitions>

 

 

 

        <data:DataPager x:Name="dataPager" Source="{Binding ParametersDetails}" Grid.Column="0" PageSize="16" DisplayMode="FirstLastPreviousNext" HorizontalAlignment="Left"/>

 

 

 

        <Button x:Name="btnExport" Content="Export" Grid.Column="1" Style="{StaticResource Button}" HorizontalAlignment="Right" VerticalAlignment="Center" />

 

 

 

    </Grid>

 

 

 

<!--Pagination End-->

 

 

 

</Grid>

 

 

 

</DataTemplate>

 

 

 

</telerikGrid:RadGridView.HierarchyChildTemplate>

 

 

 

</telerikGrid:RadGridView>

 



Thanks
<Loïc>


3 Answers, 1 is accepted

Sort by
0
Rossen Hristov
Telerik team
answered on 21 Feb 2011, 12:24 PM
Hi loic,

You are confusing the Hierarchy feature with the Row Details feature. They are completely different.

Best wishes,
Ross
the Telerik team
0
Ray
Top achievements
Rank 1
answered on 12 Sep 2013, 09:56 PM
Does that mean there is no way to access methods on the nested tables with the Hierarchical GridView?  Only with RowDetails (LoadingRowDetails, RowLoaded, RowUnloaded, etc)?
0
Dimitrina
Telerik team
answered on 13 Sep 2013, 09:11 AM
Hello,

You can always subscribe for RowLoaded and RowUnloaded events of RadGridView. If you use hierarchy (and not RowDetails), then you can subscribe for the 
RowIsExpandedChanged/RowIsExpandedChanging events to get notified when the user expands the hierarchy items.



Regards,
Didie
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for SILVERLIGHT.
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
Tags
GridView
Asked by
loic
Top achievements
Rank 1
Answers by
Rossen Hristov
Telerik team
Ray
Top achievements
Rank 1
Dimitrina
Telerik team
Share this question
or