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
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