Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 1.0 and 1.1 > ASP.NET 1.1
|
ASP.NET 1.1 As of 10/6/2005, this forum is locked as part of the reorganization described here: http://p2p.wrox.com/topic.asp?TOPIC_ID=35394. No posts have been deleted. Open ongoing discussions from the last week have been moved to either ASP.NET 1.0 and 1.1 Beginners http://p2p.wrox.com/asp-net-1-0-1-1-basics-60/ or ASP.NET 1.0 and 1.1 Professional. http://p2p.wrox.com/forum.asp?FORUM_ID=50. See my sticky post inside for more.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.1 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old June 2nd, 2005, 02:03 AM
Authorized User
 
Join Date: Mar 2005
Posts: 36
Thanks: 2
Thanked 1 Time in 1 Post
Default Adding checkbox to ASP:Table control

I am trying to create table rows and add it into the ASP:Table.
I have created the table in design time and adding the cell from the program. Actually I am taking the data from data set and creating checkboxes and adding the same to table cell and adding the cell to the table row. The checkbox is shown but the text value is not shown.
code is as bellow.

For Each drr In viewDataset.Tables(0).Rows
            Dim tcell As New TableCell
            Dim trow As New TableRow
            Dim dc As New DataColumn
            Dim lit As New LiteralControl
            Dim tlastcell As New TableCell
           strResourceName = drr.ItemArray(2)

               lit.Text = strResourceName
                chk.Text = strResourceName
                chk.ID = "chk" + strResourceName
                chk.Visible = True
                lbl.Text = strResourceName
                tcell.Controls.Add(chk)
               trow.Cells.Add(tcell)
               TableAppRecords.Rows.Add(trow)

        Next

The design time code is as follows


<asp:Table id="TableAppRecords" runat="server" >
<asp:TableRow BackColor="#990000">
<asp:TableCell>

</asp:TableCell>
</asp:TableRow>
</asp:Table>
 
Old June 2nd, 2005, 11:23 AM
Friend of Wrox
 
Join Date: Nov 2003
Posts: 1,348
Thanks: 0
Thanked 5 Times in 5 Posts
Default

I am not sure why you have that problem. I would suggest using a datagrid.






Similar Threads
Thread Thread Starter Forum Replies Last Post
INFO: Adding Google Maps (New ASP.Net Control) jimibt BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 4 September 12th, 2007 03:18 AM
Adding a checkbox into a listview?? pauljoy Pro VB 6 0 January 9th, 2006 08:04 AM
Adding Checkbox to grid k_kosaraju General .NET 1 March 14th, 2005 06:23 PM
Adding rows to a table in ASP.NET codebehind GilletteCat ASP.NET 1.0 and 1.1 Professional 2 August 3rd, 2004 02:56 PM
Table control using ASP.Net lily611 General .NET 2 July 30th, 2004 10:06 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.