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
  •  | 
  •  

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(); 
有帮助吗?

解决方案

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

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top