473,388 Members | 1,234 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,388 software developers and data experts.

Cell.Controls.Add( ??? )

Hi all,

I would like to add more than one object to a table cell using the above, in
this case some text and a hyperlink.

I am writing the table row/cell programitcally and what to have something
like this:

Owner: Rob Meade

Where Rob Meade is a hyperlink.

I've created the hyperlink programmatically,and the text is usually a case
of Cell.text = etc

I know I cant do Cell.Controls.Add("Owner: " & Hyperlink), so is there
another way to add these two items?

Any info would be appreciated.

Regards

Rob
Nov 19 '05 #1
3 1645
Rob,

Are you sure you are on the right track? Looks like you need a datagrid with
a template column.

Eliyahu

"Rob Meade" <ro**********@NOSPAMubht.swest.nhs.uk> wrote in message
news:OU**************@tk2msftngp13.phx.gbl...
Hi all,

I would like to add more than one object to a table cell using the above, in this case some text and a hyperlink.

I am writing the table row/cell programitcally and what to have something
like this:

Owner: Rob Meade

Where Rob Meade is a hyperlink.

I've created the hyperlink programmatically,and the text is usually a case
of Cell.text = etc

I know I cant do Cell.Controls.Add("Owner: " & Hyperlink), so is there
another way to add these two items?

Any info would be appreciated.

Regards

Rob

Nov 19 '05 #2
"Eliyahu Goldin" wrote ...
Are you sure you are on the right track? Looks like you need a datagrid
with
a template column.


Hi Elyahu,

Thanks for your reply..

A datagrid was considered for what I'm doing but I decided not to in the
end, I have found that if I use a Literal control I can achieve what I want
to do.

Thanks again for the reply.

Regards

Rob
Nov 19 '05 #3
Rob Meade wrote:
Hi all,

I would like to add more than one object to a table cell using the
above, in this case some text and a hyperlink.

I am writing the table row/cell programitcally and what to have
something like this:

Owner: Rob Meade

Where Rob Meade is a hyperlink.

I've created the hyperlink programmatically,and the text is usually a
case of Cell.text = etc

I know I cant do Cell.Controls.Add("Owner: " & Hyperlink), so is there
another way to add these two items?

Any info would be appreciated.

Regards

Rob


You need to add *two* controls to that cell:
1) a Label with the text "Owner: "
2) a Hyperlink with the correct text and NavigateURL

an other way it to add a Literal with the correct html for text & link

Hans Kesting
Nov 19 '05 #4

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

Similar topics

2
by: Tolga | last post by:
How do insert a user control i have created into a datagrid cell. Basically i am trying to create a column of my user controls. This is what i have tried so far. int i = 0; while (i <...
3
by: David Whitney | last post by:
All: I have a control that renders a table. As the table is rendered, each row in the table is constructed by creating a run-time (dynamic) object that is derived from an HtmlTableRow. The row...
1
by: Thanks | last post by:
I have a routine that is called on Page_Init. It retrieves folder records from a database which I display as Link Buttons in a table cell. I set the table cell's bgcolor to a default color (say...
2
by: Chuck Hartman | last post by:
I've been trying to add an ImageButton object to a Calendar table cell, but so far I am unable to handle the Command event from that button in my form's code behind. Below is an example of what I...
2
by: Daniel Walzenbach | last post by:
Hi, I created an ASP.NET Datagrid where a single row can be selected by clicking anywhere on the row (according to...
3
by: RN | last post by:
I have a table cell in which I add a few things, but I want a few HTML line breaks (the <BR> tag) to separate these things. Sounds simple but I can't get it to work. Dim litBR as New Literal...
3
by: gh | last post by:
I have a HTML Table with 1 row and 1 column. I have a control I want to add to the cell at runtime based on a condition. I can get the control added by creating a row and cell and using the code...
18
by: Frank M. Walter | last post by:
Hello, I have made an small AddIn with udf for excel 2003. I use vs2003. The point of view is the function __T() I call it in excel sheet writing =__T() I am not able to set a value to a...
1
by: DaveyP | last post by:
I have a user control (called data_dictionary) which I need to add into the header text of a datagrid. I'm doing this by adding the control in the RowCreated event as follows: dds_descriptions...
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: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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?
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...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
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,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.