Tag Archive: telerik’s radcontrols for silverlight


In my last blog on Telerik’s Gridview Control, I just discussed couple of issues, I was encountered while using Telerik’s GridView.

Telerik’s Grid View control usually comes without any hierarchy by default like in the following image……..

Click the image for full view……

In my this blog post I will explain that how we can extend Telerik’s Grid View control for multiple hierarchy.

It’s required when you need to achive multiple hierarchy in Grid View like following image……..

Click the image for full view……

So first of all I will show that how can this Grid View control can be extende using simle XAML code and then I will move to c# code for Grid View extention.

XAML code to extend GridView control for multiple hierarchy using GridView Table Definition : (It creates another grid view inside one grid view)

This simple XAML code creates the one Grid View inside the another just shown as in image above……
But what if My need is to create say 10 hierarchycal Grid Views… And here the code behind comes to make the solution easy.

C# code for extending GridView control for multiple hierarchy: (with this code you can create 10 grid views – one inside another but off course you can create like infinite grid views by increasing the value from 10)

This code can create the Grid View as shown in the figure below……..

Click the image for full view……

So you have seen that it’s just so easy to extend Telerik’s GridView control for multiple hierarchy.

In my next blog on Telerik’s Grid View, I will show you that how we can dynamically add the design elements(Controls) in the ‘RowDetailsTemplate’ of Telerik’s Grid View Control and make it more useful.

For more information on Telerik’s Silverlight RadGridView control please browse to, http://www.telerik.com/products/silverlight/gridview.aspx

Currently I am working with Telerik’s Silverlight GridView control and while working, I just stuck to some issues which I would like to describe here. I will keep on adding parts in this blog series as I will explore Telerik’s GridView more and more.

Issue 1. How to access standard silverlight controls lying inside Telerik’s RadGridView (infact inside the RowDetailsTemplate of RadGridView) to generate dynamic RowDetailsTemplate for RadGridView
Solution : To access the StackPanel(Standard Silverlight Control) inside the RowDetailsTemplate of the Telerik’s RadGridView we can use “LoadingRowDetails” event of the RadGridView and then we can get the StackPanel using ‘GridViewRowDetailsEventArgs e’ and following c# code…….

StackPanel sp = e.DetailsElement.FindName(“x:NameOfTheStackPanel”);

Issue 2. How to access GridViewColumn of RadgridView programmatically with c# code
Solution :
To access the GridViewColumn of RadGridView we can use the following c# code…….

GridViewColumn gvc = RadGridViewName.Columns[“UniqueNameOfGridViewColumn”];

Telerik’s RadControls for Silverlight are really working great so I suggest,

In part two of this blog series I will discuss how to make telerik’s GridView hirarchical using simle c# code.