A common UX pattern when working with large tabular data is the so called frozen rows or pinned rows. This is very popular in the spreadsheet world and in some text editors as well.
I have tried to resemble this behavior with RadGridView for Silverlight. The user may pin a row thus preventing it from vertical scrolling. This way important items may be kept inside the viewport regardless the position of the vertical scrollbar. Pinned items remain on top for easy access.
Adding this behavior to RadGridView is simple and painless:
<telerik:RadGridView x:Name="RadGridView1" ><i:Interaction.Behaviors><local:FrozenRowsBehavior/></i:Interaction.Behaviors></telerik:RadGridView>
These lines should be all the XAML needed to enable it. The pin button is located in PinButton.xaml and PinButton.cs.The behavior itself can be found in FrozenRowsBehavior.cs
You will also need a reference to the System.Windows.Interactivity.dll.
The following demo application demonstrates this in action. To freeze/unfreeze a row just click on the pin icon on the right. When you have a few frozen rows you may play with the vertical scrollbar to test the behavior.
The whole demo application can be downloaded
Subscribe to be the first to get our expert-written articles and tutorials for developers!
All fields are required