View previous topic :: View next topic |
Author |
Message |
flc.net
Joined: 21 Jun 2005 Posts: 89 Location: Switzerland
|
Posted: Thu Jun 23, 2005 11:56 am Post subject: Problems with FindRow |
|
|
Hi a have problems with FindRow.
In my Test Application I have a DataSet with 3 Tables:
Company --> Car --> CarModel. The 3 Tables have also a DataSet Relation.
I bind the Virtual Tree DataSource to myDS.Company
In the DataBinding Tab of the VirtualTree Designer i make 3 DataRowBindings and set the Child/Parent Relation to the DataSet Relation.
When I call myVirtaulTree.FindRow(myDS.Car[1]) the return Value of the Method is null.
What I make wrong?
Thanks and best Regards
Giuseppe |
|
Back to top |
|
|
flc.net
Joined: 21 Jun 2005 Posts: 89 Location: Switzerland
|
Posted: Thu Jun 23, 2005 12:12 pm Post subject: |
|
|
ok. I found the problem ... I have to use the DataRowView instead of the DataRow.
it's also possible to use a DataRow?
thanks |
|
Back to top |
|
|
Infralution
Joined: 28 Feb 2005 Posts: 5027
|
Posted: Thu Jun 23, 2005 11:24 pm Post subject: |
|
|
No unfortunately when working with Datasets you have to use DataRowViews - since this is the type of object returned by the DataView as its children. Microsoft don't make it particularly easy to manage the conversion from a DataRow to the corresponding DataRowView - for this reason we supply a static method (GetDataRowView) in DataRowRowBinding that you can use to locate the DataRowView in the DefaultView of a table that corresponds to a given DataRow. _________________ Infralution Support |
|
Back to top |
|
|
|