Maybe you are working on ASP. in the ne program, when the dataset master-slave table is nested, this constraint cannot be enabled when filtering the master table, because not all values have the corresponding parent values.
First of all, we need to understand the meaning of this sentence. First, the meaning of this sentence is that the data in the sub-table is not the value associated with each value in the master table.
When we nest two dataset tables, we use an ID to associate the two tables. The statement is as follows: datarelation datasetrelation = Ds. relations. add ("myrela", DS. tables [0]. columns ["caseid"], DS. tables [1]. columns ["caseid"]);
Normally, when the primary table is not filtered, it can be displayed normally. If you delete data from the primary table or filter the primary table, for example, you can set the date of the primary table
When filtering
This constraint cannot be enabled because not all values have corresponding parent values.
Error
This error occurs because the ID table in the sub-table has more values than the ID in the primary table.
The solution is simple.
Datarelation datasetrelation = Ds. relations. add ("myrela", DS. tables [0]. columns ["caseid"], DS. tables [1]. columns ["caseid"], false );
Just add false.