somebody must know this

  • Thread starter Thread starter Lerp
  • Start date Start date
L

Lerp

Hi all,

I thought I has solved this earlier but was wrong.

Say I have 2 tables CUSTOMER and ORDER in a related dataset based on
customerid and I would like to display the customer's lastname along with
the ordertitle and orderdate all on one row then iterate through to the next
row.
The customer name comes from the CUSTOMER table and the other two fields
come from the ORDER table.

Also, say I have a one to many relation between the 2 tables : a CUSTOMER
can have one or more ORDER records.

I have tried writing a sub that is called onItemdataBound event of the
datagrid to substitute the values. Is this the normal way to do this?


Thank you for your help, Lerp
 
You could create a new DataTable and populate it by iterating through
the customer and order datatables to get values as needed.

Then bind this new datatable to the datagrid.

This would make it possible to show customername, ordertitle, and
orderdate on one line,
then only ordertitle and orderdate on subsequent lines until you got to
the next customer.

Jim
 
Back
Top