This is a migrated thread and some comments may be shown as answers.

These columns don't currently have unique values.

3 Answers 193 Views
PanelBar
This is a migrated thread and some comments may be shown as answers.
david
Top achievements
Rank 1
david asked on 19 Dec 2011, 07:16 AM
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

3 Answers, 1 is accepted

Sort by
0
Kevin
Top achievements
Rank 2
answered on 19 Dec 2011, 02:32 PM
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.
0
david
Top achievements
Rank 1
answered on 19 Dec 2011, 04:29 PM
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.
0
Kate
Telerik team
answered on 21 Dec 2011, 12:43 PM
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
Tags
PanelBar
Asked by
david
Top achievements
Rank 1
Answers by
Kevin
Top achievements
Rank 2
david
Top achievements
Rank 1
Kate
Telerik team
Share this question
or