I am trying to implement a treeview (using telerik controls) and am running into an error.
"This constraint cannot be enabled as not all values have corresponding parent values." Attached is a snap shot of my table which holds information for the treeview. Does the structure need to change? Any help would be greatly appreciated
I was able to get the treeview to half way work.... If I remove the ParentID it displays my reports in a list....
It does not like the ParentID for some reason.... ?
Been a while since I worked with Telerik treeview control, but what if you specify ParentID = 0 instead of NULL? I believe I have a telerik treeview in one of our customer apps, I can check when I return to work on Monday.
there is no problem with your structure
but the only thing is how you relate your tables
only problem wuld be the relation u are passing just reverse your relation and give a try
tonykachappilly,
Thanks for the reply.
I did play with the relations and end up getting the same error. I know sql but I am not an expert. I have attached the table diagram and the sql I am using to get my report list. Please review
Thanks
SELECT CMSC.Reports.Text, CMSC.Reports.Description, CMSC.Reports.Report, CMSC.Reports.ParentID, CMSC.ReportRoleRelation.rID FROM CMSC.Reports INNER JOIN CMSC.ReportRoleRelation ON CMSC.ReportRoleRelation.rID = CMSC.Reports.rID WHERE (CMSC.ReportRoleRelation.RoleID = @param)
I am using a Stored procedure which goes into a Datatable within a class, which I use as the datasource for the treeview.... I get the error when the treeview control loads....
I forgot I had this open. I ended up upgrading my telerik controls and it worked fine.
Web Development
--
Questions
--
Followers
Top Experts
Web development includes all aspects of presenting content on intranets and the Internet, including delivery development, protocols, languages and standards, server software, browser clients, databases and multimedia generation.