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

[Solved] How to set displayed text on scrollbar

1 Answer 178 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.
Hans Notelteirs
Top achievements
Rank 1
Hans Notelteirs asked on 28 Sep 2009, 01:27 PM
Hi,

I would like to know how to set the text that is displayed when you scroll. On the scrollbar some sort of tooltip is displayed to show which is the current item that you are scrolling to. This works fine for simple data columns, but I work with a data column that uses deeper binding.

var employeeColumn = new GridViewDataColumn 
            { 
                Header = "Employee"
                DataMemberBinding = new Binding("Employee.Name") { Mode = BindingMode.OneTime }, 
                DataType = typeof(string), 
                IsReadOnly = true
 
            }; 

But when I scroll I only get the type of the class displayed. I also overwrited the ToString() method of my Employee class, but this doesn't help. Is there another way to set this?

Thanks in advance

1 Answer, 1 is accepted

Sort by
0
Milan
Telerik team
answered on 01 Oct 2009, 02:03 PM
Hi Hans Notelteirs,

We have recently introduced a new property on RadGridView called ScrollPositionIndicatorTemplate that allows easy customization of the UI that you are refering to. With this property you can bind to nested properties with just a few lines of XAML code:

<telerik:RadGridView.ScrollPositionIndicatorTemplate> 
    <DataTemplate> 
        <TextBlock Text="{Binding Path=Club.Name}"/>  
    </DataTemplate> 
</telerik:RadGridView.ScrollPositionIndicatorTemplate> 

This property will be available with our Latest Internal Build this Friday.


Greetings,
Milan
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
GridView
Asked by
Hans Notelteirs
Top achievements
Rank 1
Answers by
Milan
Telerik team
Share this question
or