Hello Alex Ruggeri,
Here is an example that should help you.
The panelbar is bound to an sqlDataSource and we intercept the server-side event OnItemCreated.
Here is the code-behind handler of this event:
sender, Telerik.Web.UI.RadPanelBarEventArgs e)
var createdItem = e.Item;
var owner = createdItem.Owner;
levelInHierarchy = 0;
owner = owner.Owner;
color = System.Drawing.Color.Black.ToString();
createdItem.ForeColor = System.Drawing.Color.Blue;
color = System.Drawing.Color.Blue.ToString();
createdItem.ForeColor = System.Drawing.Color.Red;
color = System.Drawing.Color.Red.ToString();
// templating the line
i = 0; i <= levelInHierarchy; i++)
markUp += color +
Attached is an example (a screenshot) of the output of this handler, right after the page is loaded (the sqlDataSource is connected to the Northwind - MS's sample DB, to table Employees with selected EmployeeID, LastName and ReportsTo columns).
Hope that this will help you!
All the best,
the Telerik team
Do you want to have your say when we set our development plans?
Do you want to know when a feature you care about is added or when a bug fixed?
Telerik Public Issue Tracking
system and vote to affect the priority of the items.