User (Old forums)MemberJuly 31, 2012 at 7:45 pmPost count: 23064
I’ve been trying to build a Master/Detail grid using the example but without the sources for the NorthWind database or the access functions (specifically SampleData.DataProvider.GetNorthwindDataSet()), I am unable to figure out how.
In the example, gridcontrol1 is bound to “Shippers” which I expect is a table name.
However, detailGridTemplate is bound to “Shippers.ShippersOrders”.
What exactly is “Shippers.ShippersOrders”, a view, a relation?
I know the MasterDetail sample correctly reduces the detail to only those belonging to the parent row, but the example does not expose how this happens. Any hints would be helpful.
Also, is it possible to get the NorthWind database access functions used in the examples?
Imported from legacy forums. Posted by Ken (had 2421 views)Diane [Xceed]ModeratorAugust 1, 2012 at 10:43 amPost count: 1353
The Northwind database is actually a common database for testing that is provided by Microsoft. We simply packaged it inside a DLL to make it easier to include it with our product as sample data.
– the GetNorthwindDataSet() will return a DataSet with the Northdwind database
– Shippers is the Shippers table
– ShippersOrders is a detail relation on the Shippers table
If you want a copy of the actual Access database, simply do a search online for “northwind database”. There are older and newer versions, so instead of pointing you to a specific one, I will let you run the search and select the one you prefer.
Imported from legacy forums. Posted by Diane [Xceed] (had 333 views)User (Old forums)MemberAugust 1, 2012 at 1:46 pmPost count: 23064
Thanks, that helps.
I found a copy of the database but I don’t know if it the same as used in the example.
I’m trying to create a Master/Detail grid from this database using the Orders and Order Details tables.
Looking at the version of the database I have, the Orders table has a relation to the Order Details table.
However, it’s unclear to me how the naming works. In the example, the detail grid is bound to “Shippers.ShippersOrders”.
This looks like the naming is TableName.RelationTable+RelatedTable. So for my test, I used the name “Orders.OrdersOrder Details”.
But I get the “Child list for field OrdersOrder Details cannot be created.” error. I tried removing the space but got the same error (without the space).
Can you see what I’m doing wrong (or what the name mapping is)?
Also, it would be real helpful to see the sources for the DLL you created to package the database. Any chance of this being published?
Imported from legacy forums. Posted by Ken (had 378 views)Diane [Xceed]ModeratorAugust 2, 2012 at 10:43 amPost count: 1353
I did a quick test using the Master/Detail sample we provide. I commented out all the lines for the 2nd detail level, then changed the master level to be “Orders” and the 1st detail level to be “Orders.OrdersOrderDetails”. You also need to play around with which columns are added to the template and comment out a few lines that were specific to the original example, but in the end it worked fine for me.
If you are still having issues, you can send me the test project you are working on and I will take a look at it. Please send it by email at email@example.com and include a link to this forum thread as reference. Thank you.
As an extra, I found the following article which gives a nice overview and includes screen shots of the schema diagrams (both for the MDB and the SQL versions):
As for the source code for the SampleData DLL, it is not something that we offer. It is simply a wrapper with a constructor to give you a DataSet object, after that it’s the normal content with the Tables and Relations, etc. We don’t do anything special with it.
Imported from legacy forums. Posted by Diane [Xceed] (had 368 views)User (Old forums)MemberAugust 2, 2012 at 1:40 pmPost count: 23064
Thanks Diane. I have my example working now (the relation name for the DB I’m using was Orders.New_OrderDetails).
I am now switching to the real database I’m going to work with and have to decide how I’m going to build my wrapper.
I’m new to .NET and it’s very hard to select correctly from the plethora of object type choices.
The overview is helpful but it would be very helpful to see exactly how you wrapped the the database access.
If possible, please forward my request for publishing the wrapper code.
Imported from legacy forums. Posted by Ken (had 1398 views)
- You must be logged in to reply to this topic.