Binding accesskey using data driven RadMenu

3 posts, 0 answers
  1. Mansoor
    Mansoor avatar
    3 posts
    Member since:
    Jul 2008

    Posted 15 Jul 2008 Link to this post

    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. Atanas Korchev
    Admin
    Atanas Korchev avatar
    8462 posts

    Posted 15 Jul 2008 Link to this post

    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
  3. Mansoor
    Mansoor avatar
    3 posts
    Member since:
    Jul 2008

    Posted 15 Jul 2008 Link to this post

    Thanks for your help Albert, it's done now.

    Cheers for the great support :)
    Mansoor Nadeem.
Back to Top