These columns don't currently have unique values.

4 posts, 0 answers
  1. david
    david avatar
    210 posts
    Member since:
    May 2007

    Posted 19 Dec 2011 Link to this post

    Panel and Data below, some where I read that the root must have null values so I wrote a stored proc to convert the root ParentIDs to nulls (please see below)
    But I still get the error '

    These columns don't currently have unique values. '

    <

     

     

    telerik:RadPanelBar ID="RadPanelBar1" runat="server" Height="600px"

     

     

     

    Width="200px" ExpandMode="FullExpandedItem"

     

     

     

    DataFieldID="LectureID"

     

     

     

    DataFieldParentID="SectionID"

     

     

     

    DataSourceID="SqlDataSource1" DataTextField="Name">

     

    </

     

     

    telerik:RadPanelBar>

     

    SectionID LectureID label LecturesID Name
    NULL 1 NULL 329 1:1
    NULL 2 NULL 330 1:2
    NULL 3 NULL 331 1:3
    NULL 4 NULL 332 1:4
    NULL 5 NULL 333 1:5
    NULL 6 NULL 334 1:6
    NULL 7 NULL 335 1:7
    NULL 8 NULL 336 1:8
    NULL 9 NULL 337 1:9
    NULL 10 NULL 338 1:10
    NULL 11 NULL 339 1:11
    NULL 12 NULL 340 1:12
    2 1 NULL 341 2:1
    2 2 NULL 342 2:2
    2 3 NULL 343 2:3
    2 4 NULL 344 2:4
    2 5 NULL 345 2:5
    2 6 NULL 346 2:6
    2 7 NULL 347 2:7
    3 1 NULL 348 3:1
    3 2 NULL 349 3:2
    3 3 NULL 350 3:3
    3 4 NULL 351 3:4
    3 5 NULL 352 3:5
    4 1 NULL 353 4:1
    4 2 NULL 354 4:2
    4 3 NULL 355 4:3
    4 4 NULL 356 4:4
    4 5 NULL 357 4:5
    4 6 NULL 358 4:6
    4 7 NULL 359 4:7
    4 8 NULL 360 4:8
    4 9 NULL 361 4:9
    4 10 NULL 362 4:10
    4 11 NULL 363 4:11
    4 12 NULL 364 4:12
    5 1 NULL 365 5:1
    5 2 NULL 366 5:2
    5 3 NULL 367 5:3
    5 4 NULL 368 5:4
    5 5 NULL 369 5:5
    6 1 NULL 370 6:1
    6 2 NULL 371 6:2
    6 3 NULL 372 6:3
    6 4 NULL 373 6:4
    6 5 NULL 2602 6:5
  2. Kevin
    Kevin avatar
    360 posts
    Member since:
    Jul 2012

    Posted 19 Dec 2011 Link to this post

    Hello David,

    The problem with your table is that the LectureID has repeating values. The DataFieldID column used by the RadPanelBar should be the primary key of the table, so it shouldn't contain duplicate numbers. The reason for that is the RadPanelBar can't determine if LectureID 1 should be shown under Section 2 or Section 5.

    I hope that helps.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. david
    david avatar
    210 posts
    Member since:
    May 2007

    Posted 19 Dec 2011 Link to this post

    Thank you for your quick reply, if I change the DataFieldID to LecturesID (unique primary key) then I get a different message - This constraint cannot be enabled as not all values have corresponding parent values.
  5. Kate
    Admin
    Kate avatar
    1898 posts

    Posted 21 Dec 2011 Link to this post

    Hi David,

    Please refer to the following help articles that fully describe how you can bind a RadPanelBar control to an SQL datasource:

    www.telerik.com/help/aspnet-ajax/panelbar-getting-started-data-binding.html
    www.telerik.com/help/aspnet-ajax/panelbar-data-datasource-components.html 

    Kind regards,
    Kate
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now
Back to Top