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

[Solved] Custom row Style with Row details

3 Answers 82 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.
Kamal Mostofi
Top achievements
Rank 1
Kamal Mostofi asked on 09 Jul 2011, 01:13 AM
Hi,
I have custom row style and I'd like to display Row Details. How can I do that? Do you have an example?

Thanks,
Kamal

3 Answers, 1 is accepted

Sort by
0
Vanya Pavlova
Telerik team
answered on 09 Jul 2011, 10:03 AM
Hello Kamal,

 
You may take a look at the following forum thread "Custom row style + row details"  for further info. 


Best wishes,
Vanya Pavlova
the Telerik team

Register for the Q2 2011 What's New Webinar Week. Mark your calendar for the week starting July 18th and book your seat for a walk through of all the exciting stuff we will ship with the new release!

0
Kamal Mostofi
Top achievements
Rank 1
answered on 09 Jul 2011, 12:12 PM
Hello Vanya,

I read the thread before but I couldn't make it work :-( I followed the example from the demo control on your site and tried to add the Rowdetails.

Thanks,
Kamal
0
Vanya Pavlova
Telerik team
answered on 09 Jul 2011, 12:45 PM
Hello Kamal,

 
You may use the snippet below that demonstrates the proposed solution:

<ControlTemplate TargetType="telerik:GridViewRow">
                    <Border BorderBrush="#FF848484" BorderThickness="0,1">
                    <Grid>
                        <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                            </Grid.RowDefinitions>
                            <StackPanel Orientation="Horizontal">
                                <TextBlock Text="{Binding Property1}" Padding="5"/>
                                    <TextBlock Text="{Binding Property2}" Padding="5"/>
                                        <TextBlock Text="{Binding Property3}" Padding="5"/>
                                    <telerik:RadButton Content="RadButton" Click="RadButton_Click"/>
                                </StackPanel>
                                <telerik:DetailsPresenter Style="{StaticResource DetailsPresenterStyle1}" Grid.Row="1"  Visibility="Collapsed" DetailsProvider="{TemplateBinding DetailsProvider}"/>
                        </Grid>
                        </Border>
                    </ControlTemplate>
                       
                </Setter.Value>



Feel free to change it in the way you need. 

Best wishes,
Vanya Pavlova
the Telerik team

Register for the Q2 2011 What's New Webinar Week. Mark your calendar for the week starting July 18th and book your seat for a walk through of all the exciting stuff we will ship with the new release!

Tags
GridView
Asked by
Kamal Mostofi
Top achievements
Rank 1
Answers by
Vanya Pavlova
Telerik team
Kamal Mostofi
Top achievements
Rank 1
Share this question
or