473,396 Members | 1,805 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,396 software developers and data experts.

A simple nested datagrid (vb.net)?

Hi all

What is the best way to do a simple nested datagrid?
I have a tableA with personID, first name and last. TableB with
information on personID. I am looking for a way to bring
name values on a datagrid and when selected it would show person
information.

Like this:

William Tom 01
Lorens Jack 02
Nash Mike 03

When selected Lorens Jack ->

William Tom 01
Lorens Jack 02
Info Info Info
Info Info Info
Info Info Info
Info Info Info
Nash Mike 03

Tuomo
Mar 16 '06 #1
4 3424
That is done in the SQL statement.

You need to JOIN on the key field present in both tables.

Juan T. Llibre, asp.net MVP
aspnetfaq.com : http://www.aspnetfaq.com/
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
===================================
"Vili" <tu***@eitoimi.fi.invalid> wrote in message news:44***********************@news.fv.fi...
Hi all

What is the best way to do a simple nested datagrid?
I have a tableA with personID, first name and last. TableB with information on personID. I am
looking for a way to bring
name values on a datagrid and when selected it would show person information.

Like this:

William Tom 01
Lorens Jack 02
Nash Mike 03

When selected Lorens Jack ->

William Tom 01
Lorens Jack 02
Info Info Info Info Info Info
Info Info Info Info Info Info
Nash Mike 03

Tuomo

Mar 16 '06 #2
Juan T. Llibre wrote:
That is done in the SQL statement.

You need to JOIN on the key field present in both tables.


But that would just get me

William Tom 01
Lorens Jack 02 Info Info Info Info Info Info
Lorens Jack 02 Info Info Info Info Info Info
Lorens Jack 02 Info Info Info Info Info Info
Nash Mike 03

or?

Here is an example what I found
http://www.standardio.org/article.aspx?id=155

But I had some problems with that.
Mar 16 '06 #3
That example you point to uses *exactly* what I said you should use :

strSQL &= "FROM Employees INNER JOIN "
strSQL &= "Orders ON Employees.EmployeeID = Orders.EmployeeID INNER JOIN "
strSQL &= "Customers ON Orders.CustomerID = Customers.CustomerID INNER JOIN "
strSQL &= "[Order Details] ON Orders.OrderID = [Order Details].OrderID INNER JOIN "
strSQL &= "Products ON [Order Details].ProductID = Products.ProductID "
strSQL &= "WHERE Employees.EmployeeID = " & x & " ORDER BY orderdate DESC"


Juan T. Llibre, asp.net MVP
aspnetfaq.com : http://www.aspnetfaq.com/
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
===================================
"Vili" <tu***@eitoimi.fi.invalid> wrote in message news:44***********************@news.fv.fi...
Juan T. Llibre wrote:
That is done in the SQL statement.

You need to JOIN on the key field present in both tables.


But that would just get me

William Tom 01
Lorens Jack 02 Info Info Info Info Info Info
Lorens Jack 02 Info Info Info Info Info Info
Lorens Jack 02 Info Info Info Info Info Info
Nash Mike 03

or?

Here is an example what I found http://www.standardio.org/article.aspx?id=155

But I had some problems with that.

Mar 16 '06 #4
You mean all in one grid?

http://www.denisbauer.com/ASPNETCont...ierarGrid.aspx

"Vili" <tu***@eitoimi.fi.invalid> wrote in message
news:44***********************@news.fv.fi...
Hi all

What is the best way to do a simple nested datagrid?
I have a tableA with personID, first name and last. TableB with
information on personID. I am looking for a way to bring
name values on a datagrid and when selected it would show person
information.

Like this:

William Tom 01
Lorens Jack 02
Nash Mike 03

When selected Lorens Jack ->

William Tom 01
Lorens Jack 02
Info Info Info Info Info Info
Info Info Info Info Info Info
Nash Mike 03

Tuomo

Mar 17 '06 #5

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

Similar topics

0
by: NETDeveloper | last post by:
Hi, I almost have my nested datagrid working properly. I created a datagrid on a user control and dropped that onto another datagrid. At first, I noticed when I was stepping through the code,...
2
by: DelphiBlue | last post by:
I have a Nested Datagrid that is using a data relations to tie the parent child datagrids together. All is working well with the display but I am having some issues trying to sort the child...
0
by: Dharanesha | last post by:
We have created a Nested Datagrid based on Cutting Edge Article on Nested Datagrid. when ever we are expanding a row the header rows are getting disturbed and the values are not properly aligned.
0
by: Chad Folden | last post by:
I can't figure out how to use the EditCommand for the nested datagrid .. HELP PLEASE ;-) It works perfectly for the parent datagrid, but will not display, even though the EditCommand event is...
0
by: Andreas Klemt | last post by:
Hello, how can I easily solve the nested DataGrid problem working correctly with edit / update events? Is there any very simple example? Who has the same problems? Thanks in advance, Andreas
0
by: Chris | last post by:
I've been searching all over and think I am close, but keep getting the error "Index out of range" when trying to reference a nested datagrid when an OnEditCommand event is raised. When the...
1
by: needin4mation | last post by:
Hi, I have a datalist. In this datalist I have a datagrid. The datalist is the master. The datagrid is the detail. It works fine. I populate the datagrid inside of the datalist using the...
1
by: Vili | last post by:
Hi all I am having problems with asp.net 1.1 and nested datagrid. I have a datagrid (dgDetail) nested inside a datagrid (dgMaster). How can I make all the rows editable in dgDetail? So that...
1
by: Vili | last post by:
Hi all I have a datagrid with nested datagrid. How do I get event from dgNested button? I used example from...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
marktang
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,...
0
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...
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...

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.