every row does'nt contains parentID one must be null (the root node)
not allowing null values a a data bound (This constraint cannot be enabled as not all values have corresponding parent values)
-
05-07-2023 - |
Question
i am getting this error "This constraint cannot be enabled as not all values have corresponding parent values." from below code
DataTable dt = objBLOrgSpecialityManager.getSpecialityTreeChild(UserId);
rdtrvwServices.DataSource = dt;
rdtrvwServices.DataFieldID = "NodeId";
rdtrvwServices.DataFieldParentID = "ParentId";
rdtrvwServices.DataTextField = "NodeName";
rdtrvwServices.DataValueField = "NodeId";
rdtrvwServices.DataBind();
Solution
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow