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

GridView Row Details with show details only.

2 Answers 85 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Dale
Top achievements
Rank 1
Dale asked on 12 Oct 2016, 04:09 PM

We would like to click a row and show only the DETAILS row, not the "original" row.  Please see attached files for clarity.

The main idea here is "Less is More". I don't want essentially 2 rows of information when I select a particular row.

If the user exits the DETAILS row (either by clicking another row or activates another window) then the row returns back to its normal state.

Thanks in advance!!!

2 Answers, 1 is accepted

Sort by
0
Dale
Top achievements
Rank 1
answered on 14 Oct 2016, 03:46 PM
Basically, we'd like to know if we can do (or make it look like) the radgridview_OnRowClick_after.png image.
0
Stefan Nenchev
Telerik team
answered on 17 Oct 2016, 12:37 PM
Hello Dale,

Thank you for the pictures provided.

In order to achieve the desired behavior, you need to alter the ControlTemplate of the GridViewRow element up to your needs. Generally, the RowDetails are contained within the DetailsPresenter labeled  "PART_DetailsPresenter". What I did in a sample project at my end is set a negative margin that equals the height of the row. This way, the Details will hide the row and the behavior will be achieved. The standard height of the row is 25, so you can apply the following change:

<grid:DetailsPresenter x:Name="PART_DetailsPresenter"
                       grid:SelectiveScrollingGrid.SelectiveScrollingClip="True"
                       Margin="0 -25 0 0"                                          
                       Grid.Column="2"
                       Grid.ColumnSpan="2"
                       Grid.Row="1"
                       DetailsProvider="{TemplateBinding DetailsProvider}"/>

I have attached the sample application for your reference. Please try selecting an item once you start it. Of course, as I am not sure of your specific setup, you might need to further customize the template so that it fits your exact requirement.

Please update me whether the approach suits your needs.

Regards,
Stefan Nenchev
Telerik by Progress
Do you need help with upgrading your AJAX, WPF or WinForms project? Check the Telerik API Analyzer and share your thoughts.
Tags
General Discussions
Asked by
Dale
Top achievements
Rank 1
Answers by
Dale
Top achievements
Rank 1
Stefan Nenchev
Telerik team
Share this question
or