public void PopulateGrid(DataSet dataSets, String tableName,String testStepId) { this.dataSet = dataSets; //'this' here is a usercontrol - an Editable Data Grid View to be precise. IEnumerable<Int32> dfp2 = from paramss in dataSet.Tables["Parameters"].AsEnumerable() where (paramss.Field<Int32>("TestStep_Id") == Int32.Parse(testStepId)) select paramss.Field<Int32?>("Parameters_Id");
var p2 = from parameter in dataSet.Tables["Parameter"].AsEnumerable() where parameter.Field<Int32>("Parameters_Id") == (Int32)dfp2.First() select parameter;
// bindingSource.DataSource = parameter.AsDataView(); bindingSource.DataSource = p2.AsDataView(); . . . . } |