cant bind radmenu

4 posts, 1 answers
  1. Teoman Tamer
    Teoman Tamer avatar
    3 posts
    Member since:
    Nov 2009

    Posted 17 Nov 2009 Link to this post

    Hi,
    I am trying to bind radmenu but it gives me  error "This constraint cannot be enabled as not all values have corresponding parent values."

     

     

     

    <telerik:RadMenu ID="RadMenu1" Runat="server" DataFieldID="menuid"

     

     

    DataFieldParentID="parentid" DataSourceID="SqlDataSource1"

     

     

    DataTextField="menuname">

     

     

    </telerik:RadMenu>

     

     

    <asp:SqlDataSource ID="SqlDataSource1" runat="server"

     

     

    ConnectionString="<%$ ConnectionStrings:ConnectionString %>"

     

     

    SelectCommand="SELECT menuid,parentid,menuname FROM menu"></asp:SqlDataSource>


    Menu Table
    -------------------------------------
      menuid       parentid     menuname
    ------------------------------------
         1        0        Products
         2        1        Servers
         3        1        Desktops
         4        1        Notebooks

     

  2. Answer
    Yana
    Admin
    Yana avatar
    4554 posts

    Posted 17 Nov 2009 Link to this post

    Hello Teoman,

    Please try to set null for the parentid of root items instead of "0" and let us know how it goes.

    Regards,
    Yana
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Teoman Tamer
    Teoman Tamer avatar
    3 posts
    Member since:
    Nov 2009

    Posted 18 Nov 2009 Link to this post

    thank u.
  5. Tyler
    Tyler avatar
    1 posts
    Member since:
    Nov 2014

    Posted 15 Dec 2015 in reply to Yana Link to this post

    Hello, I am having the same problem as him, however, this solution did not work for me
Back to Top