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

Nested Information (DataList + GridView) Question

Hello there.

I need a DataList to render the Gridview by providing one of the
DataList values as a query for the underlaying Gridview.

This does not work:

SelectCommand="select * from projects where emp_id = <%# Eval("EMP_ID")
%>"

This is my code (simplified):

<asp:SqlDataSource
ID="SQLDSEmp"
SelectCommand="select * from employees"
...
/>

<ASP:DataList
ID="DataListEmp"
DataSourceID="SQLDSEmp"
>
<ItemTemplate>
<asp:Label ID="titleLabel" Text='<%# Eval("EMP_NAME") %>'/>

<asp:GridView
DataSourceID="OrderDetailsDataSource"
AutoGenerateColumns="False" />

<asp:SqlDataSource
ID="OrderDetailsDataSource"
SelectCommand="select * from projects where
emp_id = <%# Eval("EMP_ID") %>">
</asp:SqlDataSource>
</ItemTemplate>
</ASP:DataList>

Sep 3 '06 #1
0 1231

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

Similar topics

2
by: Phil | last post by:
I have a datalist (DataList1)... with an itemtemplate... then a table - server side (Table1)... then another datalist (DataList2)... another itemtemplate... another table - server side (Table2)...
1
by: TheHach | last post by:
Hi. (For information, i'm working in VB.NET) In our company, we have material that is divided into 3 parts : - a system - a batch - an article In each system are different batches, and in...
1
by: ultraweaver | last post by:
Hi, I have a datalist and a gridview nested in the item template and trying to bind the gridview to the datalist. I am getting teh error... System.NullReferenceException: Object reference not...
3
by: Martin | last post by:
Hi, I have a very frustrating problem that I have researched for countless hours to no avail. There are many posts asking very similar things, however none usefull in my situation. I am using VS...
0
by: H5N1 | last post by:
Hi there My problem is that in when I update GridView row, which is nested into DataList control, I want to refresh also DataList in which the GridView is nested, since after update, trigger in...
1
by: H5N1 | last post by:
Hello everybody I'm stuck for a long time with the following problem, so I will be really gratefull if you could help me a bit: I have a GridView nested in DataList (it's located in DataList's...
0
by: HP | last post by:
Hi there I have a datalist control with some bound controls in its Item Template and a gridview bound to one of those fields (residing also in Item Template). I've found out that when I click...
0
by: sansie | last post by:
Hi, I have a page which is basically a details view(in inset mode) inside a datalist. The problem is I want to set the field "invoiceID" (of the detailsview) to an invoiceID coming through the...
3
by: TimVtoo | last post by:
I'm using ASP VB.net and have a GridView inside a DataList EditItemTemplate. I want to be able to select/edit items in the nested gridview. The GridView is correctly showing child records, but...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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: 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...

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.