Print Page | Close Window

Multiple Objects in a DGView?

Printed From: IdeaBlade
Category: DevForce
Forum Name: DevForce Classic
Forum Discription: For .NET 2.0
URL: http://www.ideablade.com/forum/forum_posts.asp?TID=92
Printed Date: 12-Jun-2026 at 9:59am


Topic: Multiple Objects in a DGView?
Posted By: jsmark
Subject: Multiple Objects in a DGView?
Date Posted: 22-Jun-2007 at 12:05pm
Hi,

I'm wondering if it is possible to bind two objects to a Data Grid View? For an explanation of what I am trying to achieve:

I have a Customer Transactions object which stores information such as Customer ID, Goods amount etc. I also have a related object, CustomerTransactionsTaxLink, which corresponds to a specific TaxID and then the transaction ID and the amount for the specific tax, to allow for multiple taxes.  Now the problem I am running into is I have a datagrid with all the transaction info but I am not sure how to dynamically add columns for each tax. I could use a separate grid view for the tax that changes whenever the transaction is changed but for ease of entry it is best contained in one. Is there an easy way of doing something similar to this with DevForce or would I have to do everything through code?

Thanks,

Mark



Replies:
Posted By: Linguinut
Date Posted: 22-Jun-2007 at 3:09pm
Hi Mark,
 
No, you cannot directly bind two different objects to a DGV; however, the one-to-many-relationship could be expressed in a grid-in-grid setup.  Have you tried that arrangement?  You mentioned a separate grid, but did you embedded it in the tax column of the first one?
 
Bill


Posted By: jsmark
Date Posted: 22-Jun-2007 at 3:28pm
I haven't tried that yet. I haven't ever done a grid-in-grid setup, i'll play around and see how that goes.

Thanks,

Mark



Print Page | Close Window