473,378 Members | 1,456 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

Reference table cell

Hi,

I have a webuser control.
The webuser control contains a single table webcontrol.

The start of the yable looks like

<asp:Table id="tblTabs" runat="server" BorderWidth="0" CellSpacing="0"
CellPadding="5">
<asp:TableRow>
<asp:TableCell ID="CellPracticePeople" CssClass="inactive">
<asp:LinkButton id="LnkBtnPracticePeople"
runat="server">Practice<br>People</asp:LinkButton>
</asp:TableCell>
I need to be able to reference the first table cell "CellPracticePeople" in
the code behind of my ascx page so that I can change the Cssclass of the
cell, however

CellPracticePeople.cssclass = "" gives and error

although the following works

tblTabs.Rows(0).Cells(0).CssClass = "active"

so my question is

How can I actually reference the table cell by its actual ID.

Many thanks in advance.

cheers

martin.
Nov 18 '05 #1
2 1990
When dealing with Tables/Container controls, I've noticed the IDE is unable
to generate the field declarations.

Add this line of code in your codebehind beneath the Inherits line:
Protected WithEvents CellPracticePeople As
System.Web.UI.WebControls.TableCell

"martin" <St**************@yahoo.com> wrote in message
news:eK*************@TK2MSFTNGP10.phx.gbl...
Hi,

I have a webuser control.
The webuser control contains a single table webcontrol.

The start of the yable looks like

<asp:Table id="tblTabs" runat="server" BorderWidth="0" CellSpacing="0"
CellPadding="5">
<asp:TableRow>
<asp:TableCell ID="CellPracticePeople" CssClass="inactive">
<asp:LinkButton id="LnkBtnPracticePeople"
runat="server">Practice<br>People</asp:LinkButton>
</asp:TableCell>
I need to be able to reference the first table cell "CellPracticePeople" in the code behind of my ascx page so that I can change the Cssclass of the
cell, however

CellPracticePeople.cssclass = "" gives and error

although the following works

tblTabs.Rows(0).Cells(0).CssClass = "active"

so my question is

How can I actually reference the table cell by its actual ID.

Many thanks in advance.

cheers

martin.

Nov 18 '05 #2
ok cheers,

I really should have noticed that myself.
Hopefully this will get fixed in the next release :)

cheers

martin.

"Andy Gaskell" <pubb AT hotmail DOT com> wrote in message
news:ee****************@tk2msftngp13.phx.gbl...
When dealing with Tables/Container controls, I've noticed the IDE is unable to generate the field declarations.

Add this line of code in your codebehind beneath the Inherits line:
Protected WithEvents CellPracticePeople As
System.Web.UI.WebControls.TableCell

"martin" <St**************@yahoo.com> wrote in message
news:eK*************@TK2MSFTNGP10.phx.gbl...
Hi,

I have a webuser control.
The webuser control contains a single table webcontrol.

The start of the yable looks like

<asp:Table id="tblTabs" runat="server" BorderWidth="0" CellSpacing="0"
CellPadding="5">
<asp:TableRow>
<asp:TableCell ID="CellPracticePeople" CssClass="inactive">
<asp:LinkButton id="LnkBtnPracticePeople"
runat="server">Practice<br>People</asp:LinkButton>
</asp:TableCell>
I need to be able to reference the first table cell "CellPracticePeople"

in
the code behind of my ascx page so that I can change the Cssclass of the
cell, however

CellPracticePeople.cssclass = "" gives and error

although the following works

tblTabs.Rows(0).Cells(0).CssClass = "active"

so my question is

How can I actually reference the table cell by its actual ID.

Many thanks in advance.

cheers

martin.


Nov 18 '05 #3

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

Similar topics

2
by: Ronny Sigo | last post by:
Hello all, Could anybody help me referencing individual cells in excel? I don't know what I do wrong here (but I'm not familiar with excel vba) (Microsoft Excel 10.0 Object library is referenced)...
7
by: slitvinov | last post by:
I am learning Relax NG. The problem is that I cannot figure out how to make a schema for a table. In my case I would like to make a table with any name of child elements (columns) but columns...
0
by: cor | last post by:
In Access(97) I am able to have a cell to be a hyperlink referencing a spreadsheet, a cell, a column or a database's table or query. When I click on it It opens on such reference program. The...
3
by: Adam | last post by:
I am creating a program to create sudoku games. I have an object that is 1 row of a sudoku game. I store the initial state of the row before I start figuring out the values to place in each cell,...
2
by: Dave Ekhaus | last post by:
hi i'm new to javascript. i'm hoping to get some help and find out if what i want to do is possible and - assuming it is, get some tips on how to accomplish the task. ok - assume i have a...
4
by: [Jongware] | last post by:
I'm a bit stumped about this request on an Adobe forum. Apparently, exporting a table from their flagship InDesign to XML produces the following output for a table (only first 2 rows listed; after...
2
by: Albin | last post by:
Hi, I have a html page where in the table spans for two pages the first page's last row doesn end properly and the 2nd page's first row also isnt proper.The code i use is given below,the no of...
10
by: owuraku | last post by:
Hi y'all Can I reference a cell in an access table within a VBA code?? I have 1 x 2 table (1 row and 2 columns). The first column is just an autoID generator. The second column keeps track of dates....
5
by: jrod11 | last post by:
hi, I found a jquery html table sorting code i have implemented. I am trying to figure out how to edit how many colums there are, but every time i remove code that I think controls how many colums...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.