I am new to the Infragistics Net Advantage for ASP.NET product and am trying to convert a web site from 2008.3 to 2011.2. Our site currently uses uses the UltraWebMenu control to build menus dynamically from database queries and we need to convert to the WebDataMenu control to make the site compatible with the IE9 browser. Since the Infragistics web site is woefully inadequate for finding info on building menus and setting their appearance dynamically, I need some help. Does anyone know of a site that provides a good pimer on the WebDataMenu control and especially building menus dynamically?
Thanks,
Roger
Hi Roger,
Here is a simple example how to bind webdataMenu on SQL Data source.
In aspx.
="server">
</
>
<
="1">
="CategoryName"/>
In C#:
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
this.WebDataMenu1.DataSource = this.SqlDataSource1;
this.WebDataMenu1.DataBind();
}
In the example I use SQL data source I use the wizard to create the connection string and the select command. it takes all the categoryNames from the Categories table from the Northwind DB. After that these items are bound to the menu items of the WebDataMenu
I hope that will help you
Thanks for the reply Todor.
I have no problem with binding the results of my database query to the WebDataMenu. The code I am upgrading actually loops through the db resultset and adds DataMenuItems and sub items dynamically.
My problem is in adjusting the appearance of the menu items once they are loaded. I'd like to have a top level horizontal menu with one background (repeated gradient image) and sub-menu items with a different background. I'd also like to change the foreground and background colors for the sub-menu items. And also change the appearance of the menu items on hover, using different attributes for the top level and sub-items. How do I do that?
Hello dpinkston
I am attaching sample with is with horizontal menu and red menu background - green submenu background. You will have to override our css classes located in the ig_ress/Default folder (or whatever theme you are using). The sample shows which two classes should be overriden in order to achieve the desired effect.
Hello Don,If you have any further questions do not hesitate to ask.
Thanks for your reply Nikifor.
I've looked over your sample and it seems to do the job, once I converted it to VS 2008. We're not using VS 2010 here yet.