I have the following code to get the get the relationship between the tables in the same dataset , but when run the following code i encounter with error saying , these columns currently dont have unique values
DataResultSetDataSet dataset = resultSet as DataResultSetDataSet;
System.Data.DataSet menuDataSet = new System.Data.DataSet();
menuDataSet = dataset.Set;
menuDataSet.DataSetName = "Menus";
menuDataSet.Tables[0].TableName = "Menu";
DataRelation relation = new DataRelation("ParentChild", menuDataSet.Tables["Menu"].Columns["MenuID"], menuDataSet.Tables["Menu"].Columns["ParentID"], true);
relation.Nested = true;
menuDataSet.Relations.Add(relation);
menuXml= menuDataSet.GetXml();
}