Re: Datatables and relations?
From: Dianne Howard (anonymous_at_discussions.microsoft.com)
Date: 02/13/04
- Next message: Kevin Yu [MSFT]: "RE: Best way to return a select number of rows?"
- Previous message: Brian Takita: "Re: Why doesn't DbDataAdapter implement IDbDataAdapter?"
- In reply to: William Ryan eMVP: "Re: Datatables and relations?"
- Next in thread: Harsh Thakur: "RE: Datatables and relations?"
- Messages sorted by: [ date ] [ thread ]
Date: Fri, 13 Feb 2004 01:19:05 -0800
Hi,
I haven't coded the data relations yet. At the moment all
the code is doing is filling a dataAdapter with the
records returned by the stored procedure. I've been
reading through some information on data relations and
data tables, but I'm just a bit confused!
Do I need to create 2 data tables - one containing the
parent details (i.e. the category), and one containing the
child details (i.e. all the records relating to that
category)?
Do I then need to create a relationship between these two
data tables?
Do I require two dataAdapters to do this?
What do I bind to the datagrid?
This is probably quite basic stuff, but I'm new to all of
this. It would be really useful if I could find a code
example.
Thanks for your help
Dianne
>-----Original Message-----
>Dianne:
>
>If you have only ten records in ParentTable of which one
record is A and you
>have 20000 records in the child, 20 of which are A...and
you use a
>DataRelation and bind your controls, when you go to
select Value A from the
>parent, the grid should be restricted to only the child
values that relate
>to A.
>
>How are you doing your DataRelations and Bindings?
>"Dianne Howard" <anonymous@discussions.microsoft.com>
wrote in message
>news:ea5c01c3f188$423260f0$a101280a@phx.gbl...
>> Hi all,
>>
>> Please can anyone help with the following:
>> I want to display selected records retieved by a stored
>> procedure in a datagrid (using a template column) -
sorted
>> by the category field, with relevant records displayed
>> underneath.
>>
>> I can get as far as displaying all results, but the
>> problem I'm having is that I only want to display each
>> category once, e.g. If I have 10 records that belong to
>> category 'A', I don't want Category 'A' to appear 10
times
>> at the top of each result in the datagrid - only once.
>>
>> I think that this involves using
datatables/relationships
>> and/or views, but I don't have a clue how to do it.
>>
>> Please help before I go insane!
>>
>> Thanks
>> Dianne
>>
>>
>
>
>.
>
- Next message: Kevin Yu [MSFT]: "RE: Best way to return a select number of rows?"
- Previous message: Brian Takita: "Re: Why doesn't DbDataAdapter implement IDbDataAdapter?"
- In reply to: William Ryan eMVP: "Re: Datatables and relations?"
- Next in thread: Harsh Thakur: "RE: Datatables and relations?"
- Messages sorted by: [ date ] [ thread ]