G
Guest
Thanks in advance to anyone who can help
I have my datalist bound to a normal, single dimension string array (with
three elements) as its data source. In the scripting for the datagrid, I have
it creating a table element in the <HeaderTemplate> and creating a row in the
<ItemTemplate> section. The <FooterTemplate> only has a closing </table> tag
within it.
The problem:
The datagrid is repeating all of the elements in the array as rows in run
time. (i.e., the datalist is repeating the same elements in THREE rows). The
# of times it repeats is dependent on the number of items in the array (i.e.
two elements in the array, and the datalist will repeat the row two times)
Here's the script:
<aspataList ID="dlTest" runat="server"><HeaderTemplate><table><tr
style='color:#FFFFFF; background-color:#0000cc'><th>Name</th><th>Phone
Number</th><th>Title</th></tr></HeaderTemplate>
<ItemTemplate><tr><td><%#this.stuff[0]
%></td><td><%#this.stuff[1]
%></td><td><%#this.stuff[2]%></td></tr></ItemTemplate>
<FooterTemplate></table></FooterTemplate>
</aspataList>
Where [stuff] is the name of the string array.
Anyone?
I have my datalist bound to a normal, single dimension string array (with
three elements) as its data source. In the scripting for the datagrid, I have
it creating a table element in the <HeaderTemplate> and creating a row in the
<ItemTemplate> section. The <FooterTemplate> only has a closing </table> tag
within it.
The problem:
The datagrid is repeating all of the elements in the array as rows in run
time. (i.e., the datalist is repeating the same elements in THREE rows). The
# of times it repeats is dependent on the number of items in the array (i.e.
two elements in the array, and the datalist will repeat the row two times)
Here's the script:
<aspataList ID="dlTest" runat="server"><HeaderTemplate><table><tr
style='color:#FFFFFF; background-color:#0000cc'><th>Name</th><th>Phone
Number</th><th>Title</th></tr></HeaderTemplate>
<ItemTemplate><tr><td><%#this.stuff[0]
%></td><td><%#this.stuff[1]
%></td><td><%#this.stuff[2]%></td></tr></ItemTemplate>
<FooterTemplate></table></FooterTemplate>
</aspataList>
Where [stuff] is the name of the string array.
Anyone?