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

Dynamic Menu Creation

1 Answer 88 Views
Menu
This is a migrated thread and some comments may be shown as answers.
prem
Top achievements
Rank 1
prem asked on 18 Apr 2008, 08:28 AM
Hi,

i want to create a dynamic menu from the database based on the user type.
i need to know how to bind the menu from the dataset
i tried this in the page load event, but it doesn't works..

the select command is "SELECT ChildID,ParentID,Text,URL from Menu"
 protected void Page_Load(object sender, EventArgs e)
    {
        DataSet ds;
        ObjDistributor = new Cls_Distributor();
        ds = ObjDistributor._load_Menu();

        RadMenu1.DataFieldID = ds.Tables[0].Columns[0].ColumnName.ToString();
        RadMenu1.DataFieldParentID = ds.Tables[0].Columns[1].ColumnName.ToString();
        RadMenu1.DataTextField = ds.Tables[0].Columns[2].ColumnName.ToString();

        RadMenu1.DataSource = ds.Tables[0];
        RadMenu1.DataBind();
      
    }


wat i'm declared wrong?

thanks
-prem

1 Answer, 1 is accepted

Sort by
0
Helen
Telerik team
answered on 21 Apr 2008, 08:28 AM
Hello Prem,

Please review our help topic on how to bind the Menu to a DataSet.

Hope it is helpful.

Sincerely yours,
Helen
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
Tags
Menu
Asked by
prem
Top achievements
Rank 1
Answers by
Helen
Telerik team
Share this question
or