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

Problem with ScrollViewer inside a cell

3 Answers 115 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Patrick
Top achievements
Rank 2
Iron
Iron
Iron
Patrick asked on 22 Oct 2019, 06:37 AM

Hello,

I have a case when the grid view must display plenty of data in a cell (in a log display). To avoid having very high rows, I have defined a template for the cell, as following:

<tk:GridViewDataColumn.CellTemplate>
  <DataTemplate>
    <ScrollViewer Background="Transparent"
              BorderThickness="0"
              Margin="0 1"
              MaxHeight="150">
  <TextBlock Text="{Binding Request}" />
    </ScrollViewer>
  </DataTemplate>
</tk:GridViewDataColumn.CellTemplate>

 

The problem is that, when I click on the cell, the row is not selected.

3 Answers, 1 is accepted

Sort by
0
Dinko | Tech Support Engineer
Telerik team
answered on 25 Oct 2019, 05:43 AM

Hi Patrick,

Thank you for the provided code snippet.

For displaying additional information I would suggest you use our Row Details feature of the RadGridView. I hope this feature will work for you. 

Regards,
Dinko
Progress Telerik

Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
0
Patrick
Top achievements
Rank 2
Iron
Iron
Iron
answered on 25 Oct 2019, 06:21 AM

Hi Dinko,

I know about the row details feature, but it is not usable in my case, as the content of this column must be always visible...

The use is to display a log of the requests that the application is sending to a web service, without the requests, the log is unusable.

0
Dinko | Tech Support Engineer
Telerik team
answered on 29 Oct 2019, 12:15 PM

Hello Patrick,

Thank you for your confirmation.

What you can do in this case is to set the Focusable property of the ScrollViewer to false.

<tk:GridViewDataColumn.CellTemplate>
    <DataTemplate>
        <ScrollViewer Background="Transparent"
                        BorderThickness="0"
                        Margin="0 1"
                        MaxHeight="150"
                        Focusable="False">      
            <TextBlock Text="{Binding Request}" />
        </ScrollViewer>
    </DataTemplate>
</tk:GridViewDataColumn.CellTemplate>

Regards,
Dinko
Progress Telerik

Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Tags
GridView
Asked by
Patrick
Top achievements
Rank 2
Iron
Iron
Iron
Answers by
Dinko | Tech Support Engineer
Telerik team
Patrick
Top achievements
Rank 2
Iron
Iron
Iron
Share this question
or