Hello everyone!
I need a little help, this might be something easy but i haven't had the solution.
Right now i'm binding a sitemap provider to the RadMenu .
At runtime i want to stablish the ImageUrl property to each MenuItem. so im using the OnItemDatabound event like this:
protected void RadPanel_OnItemDatabound(object sender, RadPanelBarEventArgs e)
{
if (e.Item.Items.Count >0)
{
e.Item.ImageUrl = "arrow-right.gif";
e.Item.ExpandedImageUrl = "arrow-down.gif";
e.Item.ImagePosition = RadPanelItemImagePosition.Right;
}
}
but i want only to use the image url only to Items that has children.
I can't see how to make this validation. I hoped to be a Property called HasChildren() or something :(
I tried to use the Item.Items.Count but it doesnt work.
I appreciate any help
Thank you
I need a little help, this might be something easy but i haven't had the solution.
Right now i'm binding a sitemap provider to the RadMenu .
At runtime i want to stablish the ImageUrl property to each MenuItem. so im using the OnItemDatabound event like this:
protected void RadPanel_OnItemDatabound(object sender, RadPanelBarEventArgs e)
{
if (e.Item.Items.Count >0)
{
e.Item.ImageUrl = "arrow-right.gif";
e.Item.ExpandedImageUrl = "arrow-down.gif";
e.Item.ImagePosition = RadPanelItemImagePosition.Right;
}
}
but i want only to use the image url only to Items that has children.
I can't see how to make this validation. I hoped to be a Property called HasChildren() or something :(
I tried to use the Item.Items.Count but it doesnt work.
I appreciate any help
Thank you