Telerik blogs

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.

frozen rows


Adding this behavior to RadGridView is simple and painless:

 <telerik:RadGridView x:Name="RadGridView1" > 


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

About the Author

Pavel Pavlov

Pavel has been part of the Progress Telerik team for five years. He has a background in various XAML technologies, including WPF, Silverlight, WinRT and UWP. He is now part of the Telerik UI for Xamarin team at Progress.


Comments are disabled in preview mode.