473,399 Members | 3,919 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,399 software developers and data experts.

somebody must know this

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


Nov 18 '05 #1
3 801
I'd use an Expression based column.
http://msdn.microsoft.com/library/de...ssionTopic.asp -
specifically check out the PARENT/CHILD RELATION REFERENCING section.
http://msdn.microsoft.com/library/de...ta05312002.asp -
some examples here.
"Lerp" <ad***@officience.ca> wrote in message
news:ui*************@TK2MSFTNGP12.phx.gbl...
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


Nov 18 '05 #2


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

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 18 '05 #3
Thank you both for your help!

Cheers, Lerp :)
"Jim Corey" <jc****@nospamcharter.net> wrote in message
news:#J**************@TK2MSFTNGP09.phx.gbl...


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

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Nov 18 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: RC | last post by:
Hi, somebody know how is possible to open a popup on clients browser that are visiting my page? I need to open a popup within a message into browser of xxx client that is on xxx page. Like a...
2
by: martijn | last post by:
Hi There, my vb app can open files. Well, actually my vb app launches word or excell to open them. These files are shared in a network. If somebody else has allready opened that file, you...
4
by: John Dean | last post by:
Hi I have been reading quite a lot of Python source code recently and I have come across a particular construct which I don't understand. I would be grateful if somebody could explain the reason...
3
by: Patrick | last post by:
Hi, I managed to open a msaccess database with python. import win32com.client.dynamic db1 = win32com.client.dynamic.Dispatch("Access.Application") dbname =...
6
by: lostinspace | last post by:
After four+ years of using FrontPage in a limited capacity and having created over 600 pages on my sites, I've finally (at least for the most part) abandoned FP, to begin the process of converting...
9
by: Daniel Walzenbach | last post by:
Hi, I'd like to know how I can nominate somebody as a MVP? I've checked the MVP FAQ but haven't found anything (@ least not on the german one...) Thank you! Best regards Daniel Walzenbach
0
by: Pola | last post by:
Please Help I am using VC++ in win 2000 In my appl (Win32 project) I want to control the close operation of the apl (for example if somebody will try to close appl from the "Windows Task Manager")...
2
by: Dexter | last post by:
Hello all, Somebody know a B.I. (Business Intelligence) Tool to .NET and SQL Server? A .DLL or .OCX that i can to use in my web application. Thanks Dexter
3
by: Syoam4ka | last post by:
Hi, I want to change the backcolor of my button every second ,for example red, after a second blue, after a second re, then blue and so on...i need it in a web form not in a windows form(in winform...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.