not allowing null values a a data bound (This constraint cannot be enabled as not all values have corresponding parent values)

StackOverflow https://stackoverflow.com/questions/23130448

  •  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(); 
Was it helpful?

Solution

every row does'nt contains parentID one must be null (the root node)

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top