Table rows = 0

T

Tim

Hello,

I have dynamically created a table in ASP.NET using tbl.rows.add(tr)
method where 'tbl' is a System.Web.UI.WebControls.Table. and tr is a
TableRows object.

Any ideas why I can't then itterate through the table object and reference
each of the rows using:

Dim tb as tablesRow
For Each tr In tblResults.Rows
xx = tr.Cells(1).Text
Next

There appears to be no rows in the table ie. tbl.tablerows.count = 0

TIA

Tim
 
D

DataGrid Paging Controls

You should add new rows to table like that:
DataTable dt = new DataTable();
DataRow dr = dt.NewRow();

dr[...] = "12312";

dt.Rows.Add(dr);
 

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

Forum statistics

Threads
474,141
Messages
2,570,817
Members
47,365
Latest member
BurtonMeec

Latest Threads

Top