This is a migrated thread and some comments may be shown as answers.

RadContextMenu and checked state

2 Answers 180 Views
Menu
This is a migrated thread and some comments may be shown as answers.
Russell
Top achievements
Rank 1
Russell asked on 24 Jul 2008, 01:20 PM
I have created a RadContextMenu and added an item to the menu with the following code:

    RadMenuItem menuItem = new RadMenuItem(name);
    menuItem.Attributes["State"] = "checked";
    detailMenu.Items.Add(menuItem);

When the menu is shown there is no check on the menu.

I have looked at your sample http://www.telerik.com/DEMOS/ASPNET/prometheus/Menu/Examples/CustomAttributes/DefaultCS.aspx which shows usage of checked and unchecked but I cannot get it to work on a ContextMenu

Regards
Russell

2 Answers, 1 is accepted

Sort by
0
Accepted
Veselin Vasilev
Telerik team
answered on 24 Jul 2008, 01:33 PM
Hi Russell,

The State is just a custom attribute in that example. It could have been any other name. You need to observe the ToggleCheck and ApplyImage javascript functions in that example. They just put an image which looks like a checkbox next to the clicked item.

I hope this will get you started.

Regards,
Veskoni
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Russell
Top achievements
Rank 1
answered on 24 Jul 2008, 01:44 PM
Thanks very much for your prompt response. Indeed you are correct.

I should probably have spent more time investigating your sample.

Thanks
Russell
Tags
Menu
Asked by
Russell
Top achievements
Rank 1
Answers by
Veselin Vasilev
Telerik team
Russell
Top achievements
Rank 1
Share this question
or