Re: Typed DataSet Navigation (Multiple Tables)



Rick,

The idea is creating a filter on a parent DataView and then getting a
SINGLE DataView from the child in which contains ALL relating DataRows
/ DataRowViews that essentially pass through the filter.

If you use a filter with the same keys as the relation, than the relation
has no sense anymore.
AFAIK is it impossible to get returned from a relation direct a datatable
(you can get the childrows by using parent.GetChildRows()). Therefore is
that faking with the dataview.

That sample is the first I gave you. Did you look at it?

Co


"Rick" <rryerson@xxxxxxxxxx> schreef in bericht
news:1150215035.005248.186990@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
This method only returns the associated 'rows' for the particular data
row view. But applying a filter to the parent view will contain
multiple rows. I am trying to do this WITHOUT iteration and populating
arrays, collections, etc.

The idea is creating a filter on a parent DataView and then getting a
SINGLE DataView from the child in which contains ALL relating DataRows
/ DataRowViews that essentially pass through the filter.

I would have thought this was possible with a Typed DataSet with
DataRelations.

Consider Northwind. I want to populate a DataGrid with [Order Details]
that are "associated" to orders in which EmployeeId = 5 created.

I don't want to see a DataGrid (or any other controls) with the Orders,
I just want to see and manipulate the order details. (For instance
EmployeeId entered every price with the wrong discount, and I need to
update them, BUT from a single DataView). Also, I want this in a single
DataView, so I don't have to iterate/select the Orders.

Or from the reverse relationship, I would like to see all the orders in
which contain a [order detail] for ProductId = 5. I just want to see
the "associated" Table, in this case here, the Orders (Not Order
Details).

Also, the references to DataGrid are for examples, I am not using ANY
controls what so ever. This is all code, for a Windows Service.

Best regards,

Rick

Cor Ligthert [MVP] wrote:
Rick,

Please keep it with one message thread, now people start answering new
again.

As I read the other message than is the only thing you need the property
"Row"

dr = drv.row; \\\gives the associated row from a drv

I hope this helps,

Cor

"Rick" <rryerson@xxxxxxxxxx> schreef in bericht
news:1150203916.047593.236030@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Cor,

Thanks for example. However, this really doesn't meet my needs. I can
do this by binding the DataSet to controls (2 data grids) but I need to
be able to do this in code as this is for a windows service.

I need to be able to filter one of the tables and get a view from the
other table(s) that will only contain associated records.

Best regards,

Rick

Cor Ligthert [MVP] wrote:
Rick,

With a version 2.0 typed dataset this is a piece of cake.

With 1.1 I assume that most people have taken the route from the non
typed
dataset (it is not changed for nothing in my idea).

I thought that this sample shows a little bit your needs


http://www.vb-tips.com/default.aspx?ID=cb1408ff-030d-4ea8-80b1-af26354b1fa0

I hope this helps,

Cor

<rryerson@xxxxxxxxxx> schreef in bericht
news:1150145592.200147.257100@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
I don't know if my terminology is correct so please bear with me.

I have a Typed DataSet that contains a number of related Tables. I
am
trying to filter the parent table, child table and then traverse a
grand child table with the expected result of the only grand child
records in the data view would be those related to the Parent/Child
and
pass through the filter.

I can't seem to do this.

I could possibly be able to extend an answer that is based on
Northwind
Orders and order Details. I.e. I want to see only Order Detail
records
in the Dataview that pass the filter applied to the master Orders
(Orders.EmployeeId = 6 [I only want to see Order Details that relate
to
Employee 5])

If someone could please help me understand the process of setting
this
up, I would greatly appreciate it.

.NET 1.1 or 1.0.


Best regards,

Rick





.



Relevant Pages

  • Re: Typed DataSet Navigation (Multiple Tables)
    ... It's not a filter on the key. ... EmployeeId is only part of Orders not ... getting child rows, because that means I have to hit EVERY parent ... SINGLE DataView from the child in which contains ALL relating DataRows ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: Delaying child browse
    ... If you change the limit to a manual filter string you can control when ... time lag since the last reset. ... Moving the child filter to the ... View engine trigger because it was defined as a reset field. ...
    (comp.lang.clarion)
  • Re: How to append parameter to Url that has parameters?
    ... Changing the filter to be Company Equal [Input Parameter] is not enough. ... > The parameter I am trying to add to the hyperlink in the ... > dataview isn't an input parameter to that data view. ...
    (microsoft.public.sharepoint.windowsservices)
  • RE: Connecting webparts with a greater than less than filter
    ... I did not understand how the connection was working, but now I have a better ... In the DataView, I go to the Web Part Properties, and in the ... and have Issues filter for issues that exist in that build (i.e. ... > I can get it to work as a url parameter by adding the following to Location ...
    (microsoft.public.sharepoint.windowsservices)
  • Re: A filter driver with bus enumeration capabilities: aka serenum.
    ... Since your filter is not the power policy owner for the stack, it cannot ensure that when the child is powered up that the parent stack is also powered up....BUT...for serial that does not really matter b/c once you send the create to the serial stack from the child stack, serial will stay powered on until it has been closed. ... mark yourself as a filter, ...
    (microsoft.public.development.device.drivers)