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

Binding accesskey using data driven RadMenu

2 Answers 66 Views
Menu
This is a migrated thread and some comments may be shown as answers.
Mansoor
Top achievements
Rank 1
Mansoor asked on 15 Jul 2008, 01:01 PM
Hello guys, 

    I am using radmenu and it is binded through a database. The code looks something like this. 

protected void Page_Load(object sender, EventArgs e)

{

if (!IsPostBack)

{

//CODE TO GET THE POPULATED DATASET STARTS


classMenuListing
MenuListing = new classMenuListing();

DataSet ds = new DataSet();

ds = MenuListing.getMenuAgainstRole(ds, 14);

//CODE TO GET THE POPULATED DATASET ENDS

MenuBar.DataFieldID =

"ID";

MenuBar.DataFieldParentID =

"ParentID";

MenuBar.DataNavigateUrlField =

"LinkBasicURL";

MenuBar.DataTextField =

"LinkDisplayText";

MenuBar.DataSource = ds;

MenuBar.DataBind();

}

}

I have a field in the database which provides access keys for each menu item. How will i bind the accesskey field to the radmenu. Like I binded (MenuBar.DataNavigateUrlField = "LinkBasicURL";) URL field.

Thanks,
Mansoor Nadeem

2 Answers, 1 is accepted

Sort by
0
Atanas Korchev
Telerik team
answered on 15 Jul 2008, 01:45 PM
Hello Mansoor,

You can use the ItemDataBound event to map bind additional properties of the menu item to database fields. More info can be found in this help topic.

Regards,
Albert
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Mansoor
Top achievements
Rank 1
answered on 16 Jul 2008, 04:10 AM
Thanks for your help Albert, it's done now.

Cheers for the great support :)
Mansoor Nadeem.
Tags
Menu
Asked by
Mansoor
Top achievements
Rank 1
Answers by
Atanas Korchev
Telerik team
Mansoor
Top achievements
Rank 1
Share this question
or