DataBound DataList showing the correct number of empty elements!

L

Luis Ferrao

Hi, i'm experiencing strange problems with the datalist webcontrol.

I have it bound to a datatable like this:

Me.TreeNodeList.DataSource = _existingNodesTable
Me.TreeNodeList.DataBind()

which does contain the elements i want to display. The problem is that
the final output looks like this:

<table ...>
<tr><td></td></tr>
<tr><td></td></tr>
<tr><td></td></tr>
...
</table>

Actually the number of lines is the same as the number of records in the
datatable, but they're all empty!

Thanks in advance for any help!

Luis
 
E

Eliyahu Goldin

Luis,

A datalist has to have an item template. Do you have one? What is there?

If all you want is just to show the table as it is you should use a datagrid
wth AutoGenerateColumns=true, which is default.

Eliyahu
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,767
Messages
2,569,570
Members
45,045
Latest member
DRCM

Latest Threads

Top