473,669 Members | 2,523 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Hyperlink as a TableCell

RA
While dynamically creating the table; I am adding a hyperlink as a TableCell
where text is "Delete". Initially it is disabled and if a checkbox is
selected from a table then it gets enabled. Even though it is disabled, if I
click on that cell it fires onClick event.
The other concern is it does not show Hand as its cursor; which we would
expect from a hyperlink. (NOTE: I am also adding hyperlinks to few other
TableCells, which are not disabled in the begining or any time. Those links
behaves fine.)

Any Suggestions?
Nov 18 '05 #1
9 2325
for the cursor
Style="Cursor:H and;"
As for the other, how are you disabling it?

--
Curt Christianson
Owner/Lead Developer, DF-Software
Site: http://www.Darkfalz.com
Blog: http://blog.Darkfalz.com
"RA" <rc************ ***@storis.com> wrote in message
news:OC******** *****@TK2MSFTNG P11.phx.gbl...
While dynamically creating the table; I am adding a hyperlink as a
TableCell where text is "Delete". Initially it is disabled and if a
checkbox is selected from a table then it gets enabled. Even though it is
disabled, if I click on that cell it fires onClick event.
The other concern is it does not show Hand as its cursor; which we would
expect from a hyperlink. (NOTE: I am also adding hyperlinks to few other
TableCells, which are not disabled in the begining or any time. Those
links behaves fine.)

Any Suggestions?

Nov 18 '05 #2
RA
The following code I am using to add "Delete" Hyperlink

Dim HLink As New HyperLink
HLink.ID = "DelLink"
HLink.Enabled = False
HLink.Attribute s.Add("onClick" , _
"return confirm('Are you Sure you want to delete " & _
"selected items?');")
HLink.navigateU RL = "MasterReasonCo de.aspx"
HLink.Text = "Delete"
hdrRow.Cells.Ad d(HLink))

As soon as any checkbox is checked; it gets enabled. For that I am using
JavaScript.

Thank you for prompt reply.

"Curt_C [MVP]" <software_AT_da rkfalz.com> wrote in message
news:uq******** ******@TK2MSFTN GP09.phx.gbl...
for the cursor
Style="Cursor:H and;"
As for the other, how are you disabling it?

--
Curt Christianson
Owner/Lead Developer, DF-Software
Site: http://www.Darkfalz.com
Blog: http://blog.Darkfalz.com
"RA" <rc************ ***@storis.com> wrote in message
news:OC******** *****@TK2MSFTNG P11.phx.gbl...
While dynamically creating the table; I am adding a hyperlink as a
TableCell where text is "Delete". Initially it is disabled and if a
checkbox is selected from a table then it gets enabled. Even though it is
disabled, if I click on that cell it fires onClick event.
The other concern is it does not show Hand as its cursor; which we would
expect from a hyperlink. (NOTE: I am also adding hyperlinks to few other
TableCells, which are not disabled in the begining or any time. Those
links behaves fine.)

Any Suggestions?


Nov 18 '05 #3
You are saying that when you have it Enabled=False it's still firing the
onClick? Is it also going to the specified URL or just sitting on the page?
--
Curt Christianson
Owner/Lead Developer, DF-Software
Site: http://www.Darkfalz.com
Blog: http://blog.Darkfalz.com
"RA" <rc************ ***@storis.com> wrote in message
news:uS******** ******@TK2MSFTN GP09.phx.gbl...
The following code I am using to add "Delete" Hyperlink

Dim HLink As New HyperLink
HLink.ID = "DelLink"
HLink.Enabled = False
HLink.Attribute s.Add("onClick" , _
"return confirm('Are you Sure you want to delete " & _
"selected items?');")
HLink.navigateU RL = "MasterReasonCo de.aspx"
HLink.Text = "Delete"
hdrRow.Cells.Ad d(HLink))

As soon as any checkbox is checked; it gets enabled. For that I am using
JavaScript.

Thank you for prompt reply.

"Curt_C [MVP]" <software_AT_da rkfalz.com> wrote in message
news:uq******** ******@TK2MSFTN GP09.phx.gbl...
for the cursor
Style="Cursor:H and;"
As for the other, how are you disabling it?

--
Curt Christianson
Owner/Lead Developer, DF-Software
Site: http://www.Darkfalz.com
Blog: http://blog.Darkfalz.com
"RA" <rc************ ***@storis.com> wrote in message
news:OC******** *****@TK2MSFTNG P11.phx.gbl...
While dynamically creating the table; I am adding a hyperlink as a
TableCell where text is "Delete". Initially it is disabled and if a
checkbox is selected from a table then it gets enabled. Even though it
is disabled, if I click on that cell it fires onClick event.
The other concern is it does not show Hand as its cursor; which we would
expect from a hyperlink. (NOTE: I am also adding hyperlinks to few other
TableCells, which are not disabled in the begining or any time. Those
links behaves fine.)

Any Suggestions?



Nov 18 '05 #4
Tested, it's an HTML limitation it looks like.
Maybe Hide/Show two different values, one with the HREF one without, with
the javascript.
Either way, might want to hit up an html group.

--
Curt Christianson
Owner/Lead Developer, DF-Software
Site: http://www.Darkfalz.com
Blog: http://blog.Darkfalz.com
"Curt_C [MVP]" <software_AT_da rkfalz.com> wrote in message
news:%2******** ********@TK2MSF TNGP09.phx.gbl. ..
You are saying that when you have it Enabled=False it's still firing the
onClick? Is it also going to the specified URL or just sitting on the
page?
--
Curt Christianson
Owner/Lead Developer, DF-Software
Site: http://www.Darkfalz.com
Blog: http://blog.Darkfalz.com
"RA" <rc************ ***@storis.com> wrote in message
news:uS******** ******@TK2MSFTN GP09.phx.gbl...
The following code I am using to add "Delete" Hyperlink

Dim HLink As New HyperLink
HLink.ID = "DelLink"
HLink.Enabled = False
HLink.Attribute s.Add("onClick" , _
"return confirm('Are you Sure you want to delete " & _
"selected items?');")
HLink.navigateU RL = "MasterReasonCo de.aspx"
HLink.Text = "Delete"
hdrRow.Cells.Ad d(HLink))

As soon as any checkbox is checked; it gets enabled. For that I am using
JavaScript.

Thank you for prompt reply.

"Curt_C [MVP]" <software_AT_da rkfalz.com> wrote in message
news:uq******** ******@TK2MSFTN GP09.phx.gbl...
for the cursor
Style="Cursor:H and;"
As for the other, how are you disabling it?

--
Curt Christianson
Owner/Lead Developer, DF-Software
Site: http://www.Darkfalz.com
Blog: http://blog.Darkfalz.com
"RA" <rc************ ***@storis.com> wrote in message
news:OC******** *****@TK2MSFTNG P11.phx.gbl...
While dynamically creating the table; I am adding a hyperlink as a
TableCell where text is "Delete". Initially it is disabled and if a
checkbox is selected from a table then it gets enabled. Even though it
is disabled, if I click on that cell it fires onClick event.
The other concern is it does not show Hand as its cursor; which we
would expect from a hyperlink. (NOTE: I am also adding hyperlinks to
few other TableCells, which are not disabled in the begining or any
time. Those links behaves fine.)

Any Suggestions?



Nov 18 '05 #5
RA
As I have following code for hyperlink

HLink.Attribute s.Add("onClick" , _
"return confirm('Are you Sure you want to delete " & _
"selected items?');")

Clicking that link(TableCell) it pops up a messagebox asking 'Are you sure
you want to delete selected items?' with "Ok" and "Cancel" buttons.

I have not written the code to delete items yet.
"Curt_C [MVP]" <software_AT_da rkfalz.com> wrote in message
news:%2******** ********@TK2MSF TNGP09.phx.gbl. ..
You are saying that when you have it Enabled=False it's still firing the
onClick? Is it also going to the specified URL or just sitting on the
page?
--
Curt Christianson
Owner/Lead Developer, DF-Software
Site: http://www.Darkfalz.com
Blog: http://blog.Darkfalz.com
"RA" <rc************ ***@storis.com> wrote in message
news:uS******** ******@TK2MSFTN GP09.phx.gbl...
The following code I am using to add "Delete" Hyperlink

Dim HLink As New HyperLink
HLink.ID = "DelLink"
HLink.Enabled = False
HLink.Attribute s.Add("onClick" , _
"return confirm('Are you Sure you want to delete " & _
"selected items?');")
HLink.navigateU RL = "MasterReasonCo de.aspx"
HLink.Text = "Delete"
hdrRow.Cells.Ad d(HLink))

As soon as any checkbox is checked; it gets enabled. For that I am using
JavaScript.

Thank you for prompt reply.

"Curt_C [MVP]" <software_AT_da rkfalz.com> wrote in message
news:uq******** ******@TK2MSFTN GP09.phx.gbl...
for the cursor
Style="Cursor:H and;"
As for the other, how are you disabling it?

--
Curt Christianson
Owner/Lead Developer, DF-Software
Site: http://www.Darkfalz.com
Blog: http://blog.Darkfalz.com
"RA" <rc************ ***@storis.com> wrote in message
news:OC******** *****@TK2MSFTNG P11.phx.gbl...
While dynamically creating the table; I am adding a hyperlink as a
TableCell where text is "Delete". Initially it is disabled and if a
checkbox is selected from a table then it gets enabled. Even though it
is disabled, if I click on that cell it fires onClick event.
The other concern is it does not show Hand as its cursor; which we
would expect from a hyperlink. (NOTE: I am also adding hyperlinks to
few other TableCells, which are not disabled in the begining or any
time. Those links behaves fine.)

Any Suggestions?



Nov 18 '05 #6
RA
Thank you Curt,

This solution sounds good.

I really appreciate for immediate replies.

"Curt_C [MVP]" <software_AT_da rkfalz.com> wrote in message
news:Om******** ******@TK2MSFTN GP10.phx.gbl...
Tested, it's an HTML limitation it looks like.
Maybe Hide/Show two different values, one with the HREF one without, with
the javascript.
Either way, might want to hit up an html group.

--
Curt Christianson
Owner/Lead Developer, DF-Software
Site: http://www.Darkfalz.com
Blog: http://blog.Darkfalz.com
"Curt_C [MVP]" <software_AT_da rkfalz.com> wrote in message
news:%2******** ********@TK2MSF TNGP09.phx.gbl. ..
You are saying that when you have it Enabled=False it's still firing the
onClick? Is it also going to the specified URL or just sitting on the
page?
--
Curt Christianson
Owner/Lead Developer, DF-Software
Site: http://www.Darkfalz.com
Blog: http://blog.Darkfalz.com
"RA" <rc************ ***@storis.com> wrote in message
news:uS******** ******@TK2MSFTN GP09.phx.gbl...
The following code I am using to add "Delete" Hyperlink

Dim HLink As New HyperLink
HLink.ID = "DelLink"
HLink.Enabled = False
HLink.Attribute s.Add("onClick" , _
"return confirm('Are you Sure you want to delete " & _
"selected items?');")
HLink.navigateU RL = "MasterReasonCo de.aspx"
HLink.Text = "Delete"
hdrRow.Cells.Ad d(HLink))

As soon as any checkbox is checked; it gets enabled. For that I am using
JavaScript.

Thank you for prompt reply.

"Curt_C [MVP]" <software_AT_da rkfalz.com> wrote in message
news:uq******** ******@TK2MSFTN GP09.phx.gbl...
for the cursor
Style="Cursor:H and;"
As for the other, how are you disabling it?

--
Curt Christianson
Owner/Lead Developer, DF-Software
Site: http://www.Darkfalz.com
Blog: http://blog.Darkfalz.com
"RA" <rc************ ***@storis.com> wrote in message
news:OC******** *****@TK2MSFTNG P11.phx.gbl...
> While dynamically creating the table; I am adding a hyperlink as a
> TableCell where text is "Delete". Initially it is disabled and if a
> checkbox is selected from a table then it gets enabled. Even though it
> is disabled, if I click on that cell it fires onClick event.
> The other concern is it does not show Hand as its cursor; which we
> would expect from a hyperlink. (NOTE: I am also adding hyperlinks to
> few other TableCells, which are not disabled in the begining or any
> time. Those links behaves fine.)
>
> Any Suggestions?
>



Nov 18 '05 #7
Well thats a good idea for confirmation!

"RA" wrote:
As I have following code for hyperlink

HLink.Attribute s.Add("onClick" , _
"return confirm('Are you Sure you want to delete " & _
"selected items?');")

Clicking that link(TableCell) it pops up a messagebox asking 'Are you sure
you want to delete selected items?' with "Ok" and "Cancel" buttons.

I have not written the code to delete items yet.
"Curt_C [MVP]" <software_AT_da rkfalz.com> wrote in message
news:%2******** ********@TK2MSF TNGP09.phx.gbl. ..
You are saying that when you have it Enabled=False it's still firing the
onClick? Is it also going to the specified URL or just sitting on the
page?
--
Curt Christianson
Owner/Lead Developer, DF-Software
Site: http://www.Darkfalz.com
Blog: http://blog.Darkfalz.com
"RA" <rc************ ***@storis.com> wrote in message
news:uS******** ******@TK2MSFTN GP09.phx.gbl...
The following code I am using to add "Delete" Hyperlink

Dim HLink As New HyperLink
HLink.ID = "DelLink"
HLink.Enabled = False
HLink.Attribute s.Add("onClick" , _
"return confirm('Are you Sure you want to delete " & _
"selected items?');")
HLink.navigateU RL = "MasterReasonCo de.aspx"
HLink.Text = "Delete"
hdrRow.Cells.Ad d(HLink))

As soon as any checkbox is checked; it gets enabled. For that I am using
JavaScript.

Thank you for prompt reply.

"Curt_C [MVP]" <software_AT_da rkfalz.com> wrote in message
news:uq******** ******@TK2MSFTN GP09.phx.gbl...
for the cursor
Style="Cursor:H and;"
As for the other, how are you disabling it?

--
Curt Christianson
Owner/Lead Developer, DF-Software
Site: http://www.Darkfalz.com
Blog: http://blog.Darkfalz.com
"RA" <rc************ ***@storis.com> wrote in message
news:OC******** *****@TK2MSFTNG P11.phx.gbl...
> While dynamically creating the table; I am adding a hyperlink as a
> TableCell where text is "Delete". Initially it is disabled and if a
> checkbox is selected from a table then it gets enabled. Even though it
> is disabled, if I click on that cell it fires onClick event.
> The other concern is it does not show Hand as its cursor; which we
> would expect from a hyperlink. (NOTE: I am also adding hyperlinks to
> few other TableCells, which are not disabled in the begining or any
> time. Those links behaves fine.)
>
> Any Suggestions?
>



Nov 18 '05 #8
a hypelink renders as an anchor. there is no disable property for them in
html. also if there is no href specified, they will not render underlines or
hover mode (cursor). if you are doing a onclick, the standard url is "#".

to disable, don't set the url, or javascript. to enable, set the href to
"#", and add the onclick handler.

-- bruce (sqlwork.com)


"RA" <rc************ ***@storis.com> wrote in message
news:OC******** *****@TK2MSFTNG P11.phx.gbl...
| While dynamically creating the table; I am adding a hyperlink as a
TableCell
| where text is "Delete". Initially it is disabled and if a checkbox is
| selected from a table then it gets enabled. Even though it is disabled, if
I
| click on that cell it fires onClick event.
| The other concern is it does not show Hand as its cursor; which we would
| expect from a hyperlink. (NOTE: I am also adding hyperlinks to few other
| TableCells, which are not disabled in the begining or any time. Those
links
| behaves fine.)
|
| Any Suggestions?
|
|
Nov 18 '05 #9
RA
As per your suggestion, I have added a label control and a Hyperlink control
in the same cell. Using following JavaScript to make them visible and
invisible.

function EnableBtn(thefo rm)
{ if (rowsSelected != 0)
{ document.getEle mentById("DelLi nk").visible = true;
document.getEle mentById("DelLa bel").visible = false; }
else
{ document.getEle mentById("DelLi nk").visible = false;
document.getEle mentById("DelLa bel").visible = true; } }

When I debug through this code and try to see in the immediate window for
'document.getEl ementById("DelL ink")' it shows null.

Other controls just shows fine where TableCell has only one control. But for
these two controls ('DelLink' and 'DelLabel') it displays null.

any clue?

"Curt_C [MVP]" <software_AT_da rkfalz.com> wrote in message
news:Om******** ******@TK2MSFTN GP10.phx.gbl...
Tested, it's an HTML limitation it looks like.
Maybe Hide/Show two different values, one with the HREF one without, with
the javascript.
Either way, might want to hit up an html group.

--
Curt Christianson
Owner/Lead Developer, DF-Software
Site: http://www.Darkfalz.com
Blog: http://blog.Darkfalz.com
"Curt_C [MVP]" <software_AT_da rkfalz.com> wrote in message
news:%2******** ********@TK2MSF TNGP09.phx.gbl. ..
You are saying that when you have it Enabled=False it's still firing the
onClick? Is it also going to the specified URL or just sitting on the
page?
--
Curt Christianson
Owner/Lead Developer, DF-Software
Site: http://www.Darkfalz.com
Blog: http://blog.Darkfalz.com
"RA" <rc************ ***@storis.com> wrote in message
news:uS******** ******@TK2MSFTN GP09.phx.gbl...
The following code I am using to add "Delete" Hyperlink

Dim HLink As New HyperLink
HLink.ID = "DelLink"
HLink.Enabled = False
HLink.Attribute s.Add("onClick" , _
"return confirm('Are you Sure you want to delete " & _
"selected items?');")
HLink.navigateU RL = "MasterReasonCo de.aspx"
HLink.Text = "Delete"
hdrRow.Cells.Ad d(HLink))

As soon as any checkbox is checked; it gets enabled. For that I am using
JavaScript.

Thank you for prompt reply.

"Curt_C [MVP]" <software_AT_da rkfalz.com> wrote in message
news:uq******** ******@TK2MSFTN GP09.phx.gbl...
for the cursor
Style="Cursor:H and;"
As for the other, how are you disabling it?

--
Curt Christianson
Owner/Lead Developer, DF-Software
Site: http://www.Darkfalz.com
Blog: http://blog.Darkfalz.com
"RA" <rc************ ***@storis.com> wrote in message
news:OC******** *****@TK2MSFTNG P11.phx.gbl...
> While dynamically creating the table; I am adding a hyperlink as a
> TableCell where text is "Delete". Initially it is disabled and if a
> checkbox is selected from a table then it gets enabled. Even though it
> is disabled, if I click on that cell it fires onClick event.
> The other concern is it does not show Hand as its cursor; which we
> would expect from a hyperlink. (NOTE: I am also adding hyperlinks to
> few other TableCells, which are not disabled in the begining or any
> time. Those links behaves fine.)
>
> Any Suggestions?
>



Nov 18 '05 #10

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

Similar topics

0
3456
by: Randy | last post by:
Hello All, Is there any way to make this happen... Say I want to make a table with 3 rows. The first row has two TableCells each with a width of 300. The second row has one TableCell with the width of 600. The final row again has two TableCells each with a width of 300. When I try and implement this, the table comes out with the first cells on rows 1 and 3 as 600 and not 300 as set in the code. Here's a brief example of what I'm...
2
1991
by: George Durzi | last post by:
Consider this pseudo HTML from a web form <asp:Table> <asp:TableRow> <asp:TableCell> <asp:Table> <asp:TableRow> <asp:TableCell></asp:TableCell> <asp:TableCell></asp:TableCell> </asp:TableRow>
1
2639
by: Cezar | last post by:
Hello, Is it possible to create a special style just for one column of the grid. I want to display in Bold the values of a column. Also, for a column, I want to create hyperlinks only for some values, based on a condition : e.g public void OnItemDataBoundEventHandler(Object sender, DataGridItemEventArgs e) {
6
2642
by: hb | last post by:
Hi, I have a page bill.aspx and its code-behind bill.aspx.cs. On bill.aspx I have: === Select a month: <asp:dropdownlist runat="server" id="lstDate" autopostback="True" /> <br> <asp:table runat="server" id="tabBill" /> <br>
6
1515
by: Tina | last post by:
I'm going through a DataGridItem looking to find the text in a hyperlink column. It's not in mydataGridItem.cells(3).text. Where is it? thanks, T
6
2940
by: epigram | last post by:
I'm using the DataGrid with AutoGenerateColumns set to false and choosing which columns I want in the grid by using the <Columns> attribute. What I want to do is to create a hyperlink out of one of the columns that I am displaying, but in order to build this link, I need a value that is in my SELECT clause, but is not being displayed via a BoundColumn. Say I have a query: SELECT ID, Name FROM Companies Here, ID is the PK. I am only...
0
999
by: Progman | last post by:
From the VB script, how can I access the "HyperLinkStatementQuestionF" Text property? Actually I tried me.HyperLinkStatementQuestionF.Text = "Something" I could never get to HyperLinkStatementQuestionF from "me" ! It looks like that the objects inside a repeater cant be access. ========
1
6464
by: fiefie.niles | last post by:
I am using .NET Framework 1.1 and VB.NET for the language. I would like to create a table where the first column texts are hyperlinks so that I can click on it to go to another page. How can I do that ? Thanks. Dim i As Integer For i = 1 To 9 Dim tempRow As New TableRow Dim j As Integer
0
901
by: DanG | last post by:
During grid field validation, I would like to generate a message for the user to tell which column had the error. So I have a control (textbox, dropdownlist, checkbox, etc.), and would like to grab the header text from its column. I can't find any direct link from the TableCell (the control's parent) to the table column. I know the TableCell has a ClientID, and the last chars will be a number, but that number doesn't always represent...
0
8466
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8384
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8896
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...
0
8810
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
7410
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
6211
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
5683
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4387
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2035
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.