Customizing Relations in a Typed DataSet

G

Guest

I'm working in Visual Studio 2005.

I'm looking at two tables in the Data Set Designer. There's a relation
between the two tables that lists 7 matching columns. Works great.

One of the key columns from each table is called "Team". Valid values are F1
through F7, and when they match, the result set works exactly like you'd
think it would.

The problem is that somebody decided to put in a "Team" value of ALL, which
of course doesn't match any of the existing F1 through F7 values.

Any suggestions for using some sort of wild card or adding custom code to
the DataSet that won't be overwritten by the DataSet Designer? It seems like
the alternative is to remove "Team" from the Relation and custom code this in
the UI, but I think custom-defining the relation in the DataSet would be
cleaner.

Thanks,
Randy
 
B

bob clegg

Hi
Doesn't the problem actually boil down to incorrect data?
The 'All' entry is a summary of certain aspects of each team data
row.
It could be constructed as a view, it has no place as a row in the
table(s).
From your question my suspicion is that your UI should be presented
with all of the rows from the dataset and that the filtering should be
done there.
Dataset -> Bindingsource -> datagridview.
Bindingsource.filter controls what rows are displayed.

hth
Bob
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top