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 Telerik team for three years. He has background in various XAML technologies, including WPF, Silverlight and WinRT. He is now part of the UI for Xamarin team at Telerik.

Related Posts


Comments are disabled in preview mode.