Hi all,
I am building an app that has a lot of one to many relationships and was
curious as to the best method in displaying rows of data from both tables on
the same line.
ie:
row1 of 100 for example in my datagrid:
customerid(1st table), firstname(1st table), lastname(1st table),
orderid(2nd table), ordertitle(2nd table), orderdate(2nd table) etc....
Currently I am using join queries with column aliases and binding this to my
datagrid and using these to display the data from both tables in the same
row iteration of my datagrid. Is this pretty much the standard method of
performing this type of task?
Also, I am assuming that I set the Parent table when I use the fill method
on my adapter? (CUSTOMER Table being the parent between customer and
orders)
ie:
.......
Dim myCmdb as New SqlDataAdapter(strSQLb, MyConn)
myCmdb.fill(ds, "CUSTOMER")
.......
Any insight would greatly be appreciated as I have built this same page
several different ways and would like to know what other people think,
thanks
P.S excuse my newbness to .NET, I'm converting..lol :)
Cheers, Lerp 3 1338
You can display the childrows in a dropdown list or listbox nested within
the line of your datagrid, datalist, or repeater control that you use for
displaying the parent table. Search for the words: nested dropdownlist
datalist. You'll find dozens of articles in google, or MSDN.
Dale
"Lerp" <ad***@officience.ca> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl... Hi all,
I am building an app that has a lot of one to many relationships and was curious as to the best method in displaying rows of data from both tables
on the same line.
ie:
row1 of 100 for example in my datagrid:
customerid(1st table), firstname(1st table), lastname(1st table), orderid(2nd table), ordertitle(2nd table), orderdate(2nd table)
etc....
Currently I am using join queries with column aliases and binding this to
my datagrid and using these to display the data from both tables in the same row iteration of my datagrid. Is this pretty much the standard method of performing this type of task?
Also, I am assuming that I set the Parent table when I use the fill method on my adapter? (CUSTOMER Table being the parent between customer and orders)
ie: ...... Dim myCmdb as New SqlDataAdapter(strSQLb, MyConn) myCmdb.fill(ds, "CUSTOMER") ...... Any insight would greatly be appreciated as I have built this same page several different ways and would like to know what other people think, thanks
P.S excuse my newbness to .NET, I'm converting..lol :)
Cheers, Lerp
Thank you Dale, I will look into that to se if it what I need. I could
apply the same method but with dropdown boxes correct, or do I have to use
list controls?
Cheers, Lerp
"DalePres" <no****@nomail.com> wrote in message
news:e8**************@TK2MSFTNGP12.phx.gbl... You can display the childrows in a dropdown list or listbox nested within the line of your datagrid, datalist, or repeater control that you use for displaying the parent table. Search for the words: nested dropdownlist datalist. You'll find dozens of articles in google, or MSDN.
Dale
"Lerp" <ad***@officience.ca> wrote in message news:%2****************@TK2MSFTNGP12.phx.gbl... Hi all,
I am building an app that has a lot of one to many relationships and was curious as to the best method in displaying rows of data from both
tables on the same line.
ie:
row1 of 100 for example in my datagrid:
customerid(1st table), firstname(1st table), lastname(1st table), orderid(2nd table), ordertitle(2nd table), orderdate(2nd table) etc....
Currently I am using join queries with column aliases and binding this
to my datagrid and using these to display the data from both tables in the
same row iteration of my datagrid. Is this pretty much the standard method
of performing this type of task?
Also, I am assuming that I set the Parent table when I use the fill
method on my adapter? (CUSTOMER Table being the parent between customer and orders)
ie: ...... Dim myCmdb as New SqlDataAdapter(strSQLb, MyConn) myCmdb.fill(ds, "CUSTOMER") ...... Any insight would greatly be appreciated as I have built this same page several different ways and would like to know what other people think, thanks
P.S excuse my newbness to .NET, I'm converting..lol :)
Cheers, Lerp
I have done it by starting with a list control and then displaying the child
rows in a list control or a drop down.
I'm not clear if you're asking about doing two dropdownlists, or about a
list control with the child table in dropdown list. I haven't done related
dropdowns in ASP.Net but that's a relatively common thing in client side
scripting using JavaScript. For ASP.Net, I'd do related listboxes by
setting AutoPostBack on for the parent dropdownlist. Cache the tables that
will be used to populate the child dropdown list and just change the
datasource/datamember for the child dropdownlist and call DataBind() on the
child, in yourSelectedIndexChanged event handler.
Dale
"Lerp" <ad***@officience.ca> wrote in message
news:uL**************@TK2MSFTNGP12.phx.gbl... Thank you Dale, I will look into that to se if it what I need. I could apply the same method but with dropdown boxes correct, or do I have to use list controls?
Cheers, Lerp
"DalePres" <no****@nomail.com> wrote in message news:e8**************@TK2MSFTNGP12.phx.gbl... You can display the childrows in a dropdown list or listbox nested
within the line of your datagrid, datalist, or repeater control that you use
for displaying the parent table. Search for the words: nested dropdownlist datalist. You'll find dozens of articles in google, or MSDN.
Dale
"Lerp" <ad***@officience.ca> wrote in message news:%2****************@TK2MSFTNGP12.phx.gbl... Hi all,
I am building an app that has a lot of one to many relationships and
was curious as to the best method in displaying rows of data from both tables on the same line.
ie:
row1 of 100 for example in my datagrid:
customerid(1st table), firstname(1st table), lastname(1st table), orderid(2nd table), ordertitle(2nd table), orderdate(2nd table) etc....
Currently I am using join queries with column aliases and binding this
to my datagrid and using these to display the data from both tables in the same row iteration of my datagrid. Is this pretty much the standard method of performing this type of task?
Also, I am assuming that I set the Parent table when I use the fill method on my adapter? (CUSTOMER Table being the parent between customer and orders)
ie: ...... Dim myCmdb as New SqlDataAdapter(strSQLb, MyConn) myCmdb.fill(ds, "CUSTOMER") ...... Any insight would greatly be appreciated as I have built this same
page several different ways and would like to know what other people think, thanks
P.S excuse my newbness to .NET, I'm converting..lol :)
Cheers, Lerp
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Steve |
last post by:
Hi;
Is there an **easy** way to tell tsql apart from standard sql?
Will sqlserver run scripts written only in standard sql?
What about variable definitions?
Thanks in advance
|
by: Steven T. Hatton |
last post by:
Now that I have a better grasp of the scope and capabilities of the C++
Standard Library, I understand that products such as Qt actually provide
much of the same functionality through their own...
|
by: theoderich |
last post by:
Following is possible with gcc and g++:
#include <math.h>
double sin(double)
{
return 1;
}
int main()
|
by: Jeff S |
last post by:
Just wondering if it's standard practice to make DAL classes STATIC (in a
Windows Forms). Doing so would make sense to me because DAL methods are
typically called quite frequently - certainly the...
|
by: lovecreatesbeauty |
last post by:
Why the C standard committee doesn't provide a standard implementation
including the C compiler and library when the language standard
document is published?
C works on the abstract model of low...
|
by: Frederick Gotham |
last post by:
If we look at a programming language such as C++: When an updated Standard
comes out, everyone adopts it and abandons the previous one.
It seems though that things aren't so clear-cut in the C...
|
by: Chris Hills |
last post by:
Hi,
It came up in a standards panel meeting the other day that "all c or C++
programmers" have a copy of ISO C and/or C++ ...
I challenged this and said most don't (outside those working on...
|
by: jacob navia |
last post by:
In my "Happy Christmas" message, I proposed a function to read
a file into a RAM buffer and return that buffer or NULL if
the file doesn't exist or some other error is found.
It is interesting...
|
by: June Lee |
last post by:
is it true that Standard C++ Library is pretty much include functions
similar to the following java packages???
java.io
java.lang
java.util
http://www.cplusplus.com/reference/
It seem to...
|
by: Stephen Horne |
last post by:
I've been using Visual C++ 2003 for some time, and recently started
working on making my code compile in GCC and MinGW. I hit on lots of
unexpected problems which boil down to the same template...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
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...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
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,...
|
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...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |