check if I am reinventing the wheel?

  • Thread starter Thread starter Jerry
  • Start date Start date
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
 
Hi Ken,

Well, I downloaded your example file, and it works
properly. This is very cool. The code seems so simple.
It appears that you created everything form code, all the
components. I can see the form and the datagrids but
there appear to be little locks on the form and
components. I'm on my home pc right now. I'll see if
it's the same thing on my work pc tommorrow. In the
meantime, I will study this example.

Thanks,
Jerry
 
Back
Top