473,654 Members | 3,071 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

DataBound DataList showing the correct number of empty elements!

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

I have it bound to a datatable like this:

Me.TreeNodeList .DataSource = _existingNodesT able
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

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 19 '05 #1
1 1368
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 AutoGenerateCol umns=true, which is default.

Eliyahu

"Luis Ferrao" <lf*@undisclose d.com> wrote in message
news:eu******** ******@TK2MSFTN GP09.phx.gbl...
Hi, i'm experiencing strange problems with the datalist webcontrol.

I have it bound to a datatable like this:

Me.TreeNodeList .DataSource = _existingNodesT able
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

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Nov 19 '05 #2

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

Similar topics

0
1253
by: Steve | last post by:
Hi, I have a problem here with bounding data inside a datalist. Currently I am working on a page which I can have a list of items using a datalist(listA). Inside this datalist(listA) i would like to bound with another datalist(listB) so I am able to list items in listB based on the unique value on listA. here's the code that I kinda have...
6
2183
by: tshad | last post by:
I need to get to a status label I have on my footer section of my datalist. There is no event happening that would go to the footer. I am just doing some processing and want to update the label on the footer. At the moment, I go through the dataListItems like so: for each oItem as DataListItem in DataList1.Items trace.warn("inside for loop oItem type = " & oItem.itemType.ToString())
0
1695
by: bryanp10 | last post by:
I have a DataList on my page which contains multiple DropDownLists. My page defaults to showing six rows in the DataList. I want the ability to dynamically add rows if needed. Right now I'm just using an empty table with X rows, and adding a new row to the table that the DataList is bound to. However, I can't figure out a way to do this and at the same time maintain the current viewstate of the existing controls. When I call...
3
10292
by: Mirek Endys | last post by:
I have DataList as part of DataList item. DataList in DataList. The parent DataList working well including Edit command, that shows Edit template and correctly bind the data into edit template (where is the child DataList).... But in case I want to make Edit in this child DataList it is not working... No edit template showed... :( this is a code that i use for the child DataList... Edit command // this is for child DataList...
7
1748
by: | last post by:
I'm using ASP.NET 2.0, C#, SQL Server 2005, and databound controls like the DataList and the GridView. Right now I'm using SqlDataSource as part of very quick and dirty site; I'm not looking to tier things. I want the topmost/first data element in a particular control to NOT be displayed. This should be possible by either telling the renderer to hide the first element programmatically, or by deleting it from the data store that it has...
1
1021
by: beachboy | last post by:
hello, I have set "RepeatColumns" on myDataList = 5, if the reminder of itemdata is not multiple of 5.. e.g: only have 3 items. then the display will break... any method i can solive this and add empty columns if the output is less than 5? Thanks in advanced.
1
3704
by: studen771 | last post by:
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 <HeaderTemplateand creating a row in the <ItemTemplatesection. The <FooterTemplateonly has a closing </tabletag within it. The problem: The datagrid is repeating all of the elements in the array as rows in...
4
2943
by: Derty | last post by:
Any way to limit the length of databound text on a datalist itemtemplate?
1
1877
by: Brock | last post by:
First note that I am using Framework 1.1. I have an .aspx page that is displaying a list of employees, but only the Employee Number, First Name, Last Name, and Title. It is working great. I recessed it in a <Div></Divto allow scrolling of just the data, not the page. What I need to do is place a DataList (also in a <Div></Divto allow scrolling of just the data) to the right of the Datagrid to show 40 Employee Detail fields (listed top to...
0
8816
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8497
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7310
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6162
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4150
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4299
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2721
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1928
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1598
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.