populating separators dynamically in RadMenu
i am using a radmenu where i poulate the items dynamically from sqldata source.
i have only the radmenu declaration in aspx file and the rest in code behind.
now i need to implement separators for this menu items.
how can it be done dynamically using sql data source ??
thanks in advance :)
Hello Varun,
One approach that you can use is to set a specific value for the MenuItem (which you intend to use as separator) and on ItemDataBound event to check this value and set the IsSeparator property of the item to true as below:
protected
void
RadMenu1_ItemDataBound(
object
sender, RadMenuEventArgs e)
if
(e.Item.Value ==
"someValue"
)
e.Item.IsSeparator =
true
;