J
Jerry
Hi,
I have 2 dataviews for 2 tables, Master and Detail. I
filter dataview1 on a name field which gives me say 2 rows
with 2 ID's (ID field). Detail table contains 2 rows with
first ID and 2 rows with 2nd ID. Here is what I do to
filter the Detail dataview on these 2 ID values:
For i As Integer = 0 to dataview1.Count - 1
strCriteria = strCriteria & dataview1(i).Item
("ID").ToString
Next
strCriteria = Microsoft.VisualBasic.Left(strCriteria,
StrCriteria.Length - 1) 'get rid of last comma
dataview2.RowFilter = "ID In (" & strCriteria & ")"
Note: The App's Dataset1 contains Master and Detail
tables and these 2 tables are joined on ID with
constraints set, etc. Can I use the constraint in
Dataset1 to filter dataview2 (detail) or am I OK with the
routine above? How?
Thanks,
Jerry
I have 2 dataviews for 2 tables, Master and Detail. I
filter dataview1 on a name field which gives me say 2 rows
with 2 ID's (ID field). Detail table contains 2 rows with
first ID and 2 rows with 2nd ID. Here is what I do to
filter the Detail dataview on these 2 ID values:
For i As Integer = 0 to dataview1.Count - 1
strCriteria = strCriteria & dataview1(i).Item
("ID").ToString
Next
strCriteria = Microsoft.VisualBasic.Left(strCriteria,
StrCriteria.Length - 1) 'get rid of last comma
dataview2.RowFilter = "ID In (" & strCriteria & ")"
Note: The App's Dataset1 contains Master and Detail
tables and these 2 tables are joined on ID with
constraints set, etc. Can I use the constraint in
Dataset1 to filter dataview2 (detail) or am I OK with the
routine above? How?
Thanks,
Jerry