473,405 Members | 2,282 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,405 software developers and data experts.

Gridview with more than 2 tables

Hello. I'd like to know how can use in a Gridview more than two tables and
when I hit the update button should display for the child table a
dropdownlist instead of a textbox?
How can i do this two things? Best regards and thanks in advance for the help.
Oct 8 '08 #1
5 1615
On Oct 8, 7:19*pm, egsdar <egs...@discussions.microsoft.comwrote:
Hello. I'd like to know how can use in a Gridview more than two tables and
when I hit the update button should display for the child table a
dropdownlist instead of a textbox?

How can i do this two things? Best regards and thanks in advance for the help.
Hi. Check the following articles

http://msdn.microsoft.com/en-us/library/ms972948.aspx
http://msdn.microsoft.com/en-us/library/ms178294.aspx
Oct 8 '08 #2
I'm really thankful. It works, but I'm really sorry but now i have this:

Table A:
ID Resource IDgroup
1 Callcenter 2

Table B:
IDgroup Description
1 Human Resources
2 Networking
And with your help, when I hit edit, it displays the content with the
dropdown list as it should be and I'm able to update it, but after that it
displays back the content of table A. Is there a way that in normal mode i
can display the grid like this:

Gridview:
ID Resource IDgroup
1 Callcenter Networking

Thanks again.
"Alexey Smirnov" wrote:
On Oct 8, 7:19 pm, egsdar <egs...@discussions.microsoft.comwrote:
Hello. I'd like to know how can use in a Gridview more than two tables and
when I hit the update button should display for the child table a
dropdownlist instead of a textbox?

How can i do this two things? Best regards and thanks in advance for the help.

Hi. Check the following articles

http://msdn.microsoft.com/en-us/library/ms972948.aspx
http://msdn.microsoft.com/en-us/library/ms178294.aspx
Oct 9 '08 #3
On Oct 9, 2:05*am, egsdar <egs...@discussions.microsoft.comwrote:
I'm really thankful. It works, but I'm really sorry but now i have this:

Table A:
ID * * Resource * *IDgroup
1 * * *Callcenter * 2

Table B:
IDgroup * Description
1 * * * * * *Human Resources
2 * * * * * *Networking

And with your help, when I hit edit, it displays the content with the
dropdown list as it should be and I'm able to update it, but after that it
displays back the content of table A. Is there a way that in normal mode i
can display the grid like this:

Gridview:
ID * * Resource * *IDgroup
1 * * *Callcenter * Networking

Thanks again.

"Alexey Smirnov" wrote:
On Oct 8, 7:19 pm, egsdar <egs...@discussions.microsoft.comwrote:
Hello. I'd like to know how can use in a Gridview more than two tables and
when I hit the update button should display for the child table a
dropdownlist instead of a textbox?
How can i do this two things? Best regards and thanks in advance for the help.
Hi. Check the following articles
http://msdn.microsoft.com/en-us/library/ms972948.aspx
http://msdn.microsoft.com/en-us/library/ms178294.aspx
it's a matter of your request, if you said "IDgroup" it shows "2"
because this is the value from IDgroup field. To show Description
value from another table you need to join that table.

For example, look at the article I sent you. There is a request like

<asp:SqlDataSource ID="..." Runat="server"
SelectCommand="SELECT ...."
ConnectionString="<%$ ConnectionStrings:NWConnectionString %>">

You would need to change that SelectCommand as

SelectCommand="SELECT a.ID, a.Resource, a.IDGroup, b.DESCRIPTION
FROM tableA a, TABLEB b
WHERE a.IDGroup=b.IDGroup"

Oct 9 '08 #4
I'm going throguh a learning process with ASP.net and I'm really thankful
with your support and patience. After all it works.

"Alexey Smirnov" wrote:
On Oct 9, 2:05 am, egsdar <egs...@discussions.microsoft.comwrote:
I'm really thankful. It works, but I'm really sorry but now i have this:

Table A:
ID Resource IDgroup
1 Callcenter 2

Table B:
IDgroup Description
1 Human Resources
2 Networking

And with your help, when I hit edit, it displays the content with the
dropdown list as it should be and I'm able to update it, but after that it
displays back the content of table A. Is there a way that in normal mode i
can display the grid like this:

Gridview:
ID Resource IDgroup
1 Callcenter Networking

Thanks again.

"Alexey Smirnov" wrote:
On Oct 8, 7:19 pm, egsdar <egs...@discussions.microsoft.comwrote:
Hello. I'd like to know how can use in a Gridview more than two tables and
when I hit the update button should display for the child table a
dropdownlist instead of a textbox?
How can i do this two things? Best regards and thanks in advance for the help.
Hi. Check the following articles
>http://msdn.microsoft.com/en-us/library/ms972948.aspx
>http://msdn.microsoft.com/en-us/library/ms178294.aspx

it's a matter of your request, if you said "IDgroup" it shows "2"
because this is the value from IDgroup field. To show Description
value from another table you need to join that table.

For example, look at the article I sent you. There is a request like

<asp:SqlDataSource ID="..." Runat="server"
SelectCommand="SELECT ...."
ConnectionString="<%$ ConnectionStrings:NWConnectionString %>">

You would need to change that SelectCommand as

SelectCommand="SELECT a.ID, a.Resource, a.IDGroup, b.DESCRIPTION
FROM tableA a, TABLEB b
WHERE a.IDGroup=b.IDGroup"

Oct 10 '08 #5
On Oct 10, 9:03*pm, egsdar <egs...@discussions.microsoft.comwrote:
I'm going throguh a learning process with ASP.net and I'm really thankful
with your support and patience. After all it works.

"Alexey Smirnov" wrote:
On Oct 9, 2:05 am, egsdar <egs...@discussions.microsoft.comwrote:
I'm really thankful. It works, but I'm really sorry but now i have this:
Table A:
ID * * Resource * *IDgroup
1 * * *Callcenter * 2
Table B:
IDgroup * Description
1 * * * * * *Human Resources
2 * * * * * *Networking
And with your help, when I hit edit, it displays the content with the
dropdown list as it should be and I'm able to update it, but after that it
displays back the content of table A. Is there a way that in normal mode i
can display the grid like this:
Gridview:
ID * * Resource * *IDgroup
1 * * *Callcenter * Networking
Thanks again.
"Alexey Smirnov" wrote:
On Oct 8, 7:19 pm, egsdar <egs...@discussions.microsoft.comwrote:
Hello. I'd like to know how can use in a Gridview more than two tables and
when I hit the update button should display for the child table a
dropdownlist instead of a textbox?
How can i do this two things? Best regards and thanks in advance for the help.
Hi. Check the following articles
http://msdn.microsoft.com/en-us/library/ms972948.aspx
http://msdn.microsoft.com/en-us/library/ms178294.aspx
it's a matter of your request, if you said "IDgroup" it shows "2"
because this is the value from IDgroup field. To show Description
value from another table you need to join that table.
For example, look at the article I sent you. There is a request like
<asp:SqlDataSource ID="..." Runat="server"
SelectCommand="SELECT ...."
ConnectionString="<%$ ConnectionStrings:NWConnectionString %>">
You would need to change that SelectCommand as
SelectCommand="SELECT a.ID, a.Resource, a.IDGroup, b.DESCRIPTION
FROM tableA a, TABLEB b
WHERE a.IDGroup=b.IDGroup"
great :-)
Oct 11 '08 #6

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

Similar topics

6
by: Nalaka | last post by:
Hi, I have a gridView (grid1), which as a templateColumn. In the template column, I have put in a gridView (grid2) and a ObjectDataSource (objectDataSource2). Question is... How to I pass the...
2
by: rufpirat | last post by:
Hello I'm in the middle of trying to build an "AD phone book", and this being my first try at asp.net, I have a few questions that I hope some of you might be able to help with: 1. Is it...
5
by: sutphinwb | last post by:
Hi - This could be a simple question. When I relate two tables in a datasetet, how do I get that relation to show up in a GridView? The only way I've done it, is to create a separate table in the...
1
by: jmdolinger | last post by:
Hi all, I'm a newbie to Atlas (and recently ASP.NET) after coming from a long Java background, also have done quite a bit with an Ajax.NET/ASP.NET 1.1 project, but it was basically all...
2
by: Richard Carpenter | last post by:
I have a four-page tabcontrol with a gridview on each page. I have the primary key column of each gridview set to hidden (visible = false), but it still shows up on all but the first page. Anyone...
7
by: =?Utf-8?B?cGF0cmlja2RyZA==?= | last post by:
Hi all! I have a gridview inside a datagrid (nested) for which (gridview) the rowcommand is not raised in order to delete a row from the grid! I also tried OnRowCommand="method", didn't work...
2
by: Blasting Cap | last post by:
I've got a gridview (that I converted over from a datagrid, which had been working properly), that is doubling up the number of rows returned. When it was running as a datagrid, the same code sent...
1
by: Dave | last post by:
I'm having problems getting the GridView to reliably display a large amount of data (50,000+ rows). I am working my way through the excellent book “Real World ASP.NET Best Practices” by Farhan...
2
by: Ralf | last post by:
I have a custome request to print a gridview with lots of columns, 31 to be exact. I know how to print out a gridview, done it already for a GV with 6 columns. But, this GV is very wide and will...
0
by: cmrhema | last post by:
Hi, I have a gridview problem while binding more than two gridviews. I am giving a sample scenario of what I have done so far I have two tables First table: Department , having columns...
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
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
agi2029
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,...
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.