Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / ASP.NET > Menu > Data Binding Samples Menu
RadControls for ASP.NET are no longer supported (see this page for reference). In case you have inquiries about the Telerik ASP.NET AJAX controls, post them in the pertinent ASP.NET AJAX forums.

Data Binding Samples Menu

Feed from this thread
  • Joel Cosby avatar

    Posted on May 31, 2005 (permalink)

    DataBinding
    I am somewhat new to ASP.net unfortunately and I was wondering where the 101 series of samples and quick start guides would be for simple menu binding to a SQL server.  All samples are for MDB access however, everything I work with is SQL.
     
    Would anyone have a good starting reference for us new folks for binding menus to SQL DB? 
     
    thanks!

  • Nick Nick admin's avatar

    Posted on Jun 1, 2005 (permalink)

    Hi Joel,

    When mapping Database content to menu properties during databinding you have to follow the same principle as with XML content files - you have elements representing the required objects (Menu, Group, Item) and attributes representing object properties like Text, Href, Target, etc. So the mapping goes one-to-one: the attributes in the XML files have the same signature/definition as the properties in the API.
    This rule applies to the databinding as well: the mapping is one-to-one, which means that you have to provide a DataSource and DataSet (containing the bind table) or DataTable that have columns, named in the same way the as properties. This could be accomplished in two ways:

    1. You can set the column names directly in the underlying DB storage
    2. The user has a DB with tables that have their names already set. The Description column corresponds to the MenuItem's Textproperty, col1 column corresponds to MenuItem's Href property, etc. When this is the case, we have to alias the generic DB columns so that the databinding process could automatically accomplish its task (generating the menu structure). This could be done easily by using SQL Aliasing in the SELECT statement (in the SQL query or stored procedure), so that the generic column names could be resolved to the property names.

      Example: SELECT ITEMID, PARENTID, DESCRIPTION AS Text, col1 AS Href FROM MyTable WHERE ….  

    For more details please review the Help Manual (look for Mapping DB Content to Menu Properties) as it contains all the essential information that handles the matter.

    Regards,
    the telerik team

  • Joel Cosby avatar

    Posted on Jun 1, 2005 (permalink)

    Thanks for your quick reply…

    You stated:

    For more details please review the Help Manual (look for Mapping DB Content to Menu Properties) as it contains all the essential information that handles the matter.”

     

    Where would I find this manual?  I looked for a master help doc but could not locate it..

     
    Thanks!
    Joel

  • Nick Nick admin's avatar

    Posted on Jun 1, 2005 (permalink)

    Hello Joel,

    If you installed the menu control by using the installation .exe file than the Help Manual can be launched directly from Program Files->telerik->r.a.d.menu3.x->r.a.d.menu version 3.x Documentation.

    If you installed r.a.d.menu from the provided ZIP file, than the Help Manual will be available after running the reg_radmenu.bat file in the menu's Help dir. Afterwards you must to start your VS.NET application and press F1.

    Still, for your convenience you can directly review the article under our online Help Manual. Simply follow the link below: Mapping DB Content to Menu properties

    Please feel free to let us know if you need further assistance.

    Best wishes,
    the telerik team

  • awapai avatar

    Posted on Feb 17, 2006 (permalink)

    This happens because the top level of your menu should have as parentidtext the value "null" and not something else. In my case I had "0" instead of null and I was getting the same message. When I changed to null menu displayed as it should.

  • walter avatar

    Posted on Jun 17, 2011 (permalink)

    The links provided are no longer functional, are there any examples that demonstrate this?
    Can you point to where to find the info "Mapping DB Content to Menu Properties"

    Thanks

  • Posted on Jun 17, 2011 (permalink)

    Hello Walter,

    I suppose the following link might be helpful.
    http://www.telerik.com/help/aspnet-ajax/menu-data-binding-overview.html

    Thanks,
    Shinu.

  • walter avatar

    Posted on Jun 17, 2011 (permalink)

    Shinu,

    Thanks for your quick response, that link is helpful, but I am using the MVC 3 razor engine.
    Are there any razor samples that show binding a menu to as stored procedure? In this way the stored procedure can be used to filter which rows are displayed in the menu.

    Walter

  • Kate Kate admin's avatar

    Posted on Jun 21, 2011 (permalink)

    Hello walter,

    We do not currently have such example but I would suggest that you take a look at the MVC demos here where you could find more information.

    Best wishes,
    Kate
    the Telerik team

    Consider using RadControls for ASP.NET AJAX (built on top of the ASP.NET AJAX framework) as a replacement for the Telerik ASP.NET Classic controls, See the product support lifecycle here.

Back to Top

Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / ASP.NET > Menu > Data Binding Samples Menu