Brock,
I have several nested DataList controls, which are similar to the
Drilldown report that can be found in the Reports Starter Kit. The
difference is that in one of the DataList controls, I would like to
iterate through an array (some collection) to create table definitions
(<td>s) for the DataList. The size and content of the collection is
determined by the user's selections. With the collection I would like
to do two things.
1. Define the header template
2. Bind data to the DataList control inside the item template. The
items inside of the collection are columns in a DataSet. That's
explains (<%#
DataBinder.Eval(Container.DataItem, i.ToString() %>)
The DataGrid control may be more suitable but I would like to drilldown
one more time, as seen below. Note, I would be drilling down into a
DataGrid.
Sometimes it's hard to give up old habits.
bbernienb
Cars Trucks Buses
1990 DATA DATA DATA
1991 DATA DATA DATA
1992 DATA DATA DATA
1993 DATA DATA DATA
1994 DATA DATA DATA
1995 DATA DATA DATA
Cars Trucks Buses
1990 DATA DATA DATA
Jan DATA DATA DATA
Feb DATA DATA DATA
Mar DATA DATA DATA
Apr DATA DATA DATA
May DATA DATA DATA
Jun DATA DATA DATA
Jul DATA DATA DATA
Aug DATA DATA DATA
Sep DATA DATA DATA
Oct DATA DATA DATA
Nov DATA DATA DATA
Dec DATA DATA DATA
1991 DATA DATA DATA
1992 DATA DATA DATA
1993 DATA DATA DATA
1994 DATA DATA DATA
1995 DATA DATA DATA
"Brock Allen" <ba****@NOSPAMdevelop.com> wrote in message
news:76**********************@msnews.microsoft.com ...
No, the <%%> syntax is put into a Render method, which is a seperate
method from the <%# %> DataBinding code snippet. What exactly are you trying to
do... this looks very ASP-sih. Maybe we can suggest a more ASP.NET
appropriate approach.
-Brock
DevelopMentor
http://staff.develop.com/ballen
Hi, All,
Is it possible to access a variable inside of a data binding, without
the
variable being out of scope?
(Note: On the DataBinder line, I get an error message that says "Name
'i' is
not declared". The data bind is for a DataList.)
Example:
<%
Dim i As String
For Each i In ViewState("ArrField")
%>
<td><%# DataBinder.Eval(Container.DataItem, i.ToString() %>
</td>
<%Next %>