Good day, I have copied your examples that use the RowDetailsTemplate. Attached is an image showing that I load another user control into the RowDetailsTemplate. This is set in the XAML below with X:key = "SiteClassificationUc" etc, as per your examples. So when I click the GridViewToggleRowDetails button, I can see the User Control. So far so good. My questions are;
1 I would like to set the user control into the RowDetailsTemplate using C#, so depending on the ActivityType (as shown in the image), I would like to add a different user control. A possible solution to this is using your example..
this.radGridView.RowDetailsTemplate = (DataTemplate)this.LayoutRoot.Resources["EmployeeInfoRowDetailsTemplate"];
However, I would need to know how I could get access to the instance of the EmployeeInfoRowDetailsTemplate at runtime. so I prefer to create the instance of the user control at runtime.
2 I would like to fire an event when I click the GridViewToggleRowDetails button, so that I can get the Activity Type and populate the different user controls in the RowDetailsTemplate with data.
Any examples or help much appreciated.
<Grid x:Name="LayoutRoot">
1 I would like to set the user control into the RowDetailsTemplate using C#, so depending on the ActivityType (as shown in the image), I would like to add a different user control. A possible solution to this is using your example..
this.radGridView.RowDetailsTemplate = (DataTemplate)this.LayoutRoot.Resources["EmployeeInfoRowDetailsTemplate"];
However, I would need to know how I could get access to the instance of the EmployeeInfoRowDetailsTemplate at runtime. so I prefer to create the instance of the user control at runtime.
2 I would like to fire an event when I click the GridViewToggleRowDetails button, so that I can get the Activity Type and populate the different user controls in the RowDetailsTemplate with data.
Any examples or help much appreciated.
<Grid x:Name="LayoutRoot">
<Grid.Resources>
<DataTemplate x:Key="SiteClassificationUc">
<local:SiteClassificationUc />
</DataTemplate>
</Grid.Resources>
<tg:RadGridView x:Name="gxThingActivity" AutoGenerateColumns="False" Margin="0" CanUserFreezeColumns="False"
RowDetailsVisibilityMode="VisibleWhenSelected" RowDetailsTemplate="{StaticResource SiteClassificationUc}"
ScrollMode="RealTime"
HorizontalAlignment="Left"
RowIndicatorVisibility="Collapsed">