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

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 2305
for the cursor
Style="Cursor:Hand;"
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*************@TK2MSFTNGP11.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.Attributes.Add("onClick", _
"return confirm('Are you Sure you want to delete " & _
"selected items?');")
HLink.navigateURL = "MasterReasonCode.aspx"
HLink.Text = "Delete"
hdrRow.Cells.Add(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_darkfalz.com> wrote in message
news:uq**************@TK2MSFTNGP09.phx.gbl...
for the cursor
Style="Cursor:Hand;"
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*************@TK2MSFTNGP11.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**************@TK2MSFTNGP09.phx.gbl...
The following code I am using to add "Delete" Hyperlink

Dim HLink As New HyperLink
HLink.ID = "DelLink"
HLink.Enabled = False
HLink.Attributes.Add("onClick", _
"return confirm('Are you Sure you want to delete " & _
"selected items?');")
HLink.navigateURL = "MasterReasonCode.aspx"
HLink.Text = "Delete"
hdrRow.Cells.Add(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_darkfalz.com> wrote in message
news:uq**************@TK2MSFTNGP09.phx.gbl...
for the cursor
Style="Cursor:Hand;"
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*************@TK2MSFTNGP11.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_darkfalz.com> wrote in message
news:%2****************@TK2MSFTNGP09.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**************@TK2MSFTNGP09.phx.gbl...
The following code I am using to add "Delete" Hyperlink

Dim HLink As New HyperLink
HLink.ID = "DelLink"
HLink.Enabled = False
HLink.Attributes.Add("onClick", _
"return confirm('Are you Sure you want to delete " & _
"selected items?');")
HLink.navigateURL = "MasterReasonCode.aspx"
HLink.Text = "Delete"
hdrRow.Cells.Add(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_darkfalz.com> wrote in message
news:uq**************@TK2MSFTNGP09.phx.gbl...
for the cursor
Style="Cursor:Hand;"
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*************@TK2MSFTNGP11.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.Attributes.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_darkfalz.com> wrote in message
news:%2****************@TK2MSFTNGP09.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**************@TK2MSFTNGP09.phx.gbl...
The following code I am using to add "Delete" Hyperlink

Dim HLink As New HyperLink
HLink.ID = "DelLink"
HLink.Enabled = False
HLink.Attributes.Add("onClick", _
"return confirm('Are you Sure you want to delete " & _
"selected items?');")
HLink.navigateURL = "MasterReasonCode.aspx"
HLink.Text = "Delete"
hdrRow.Cells.Add(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_darkfalz.com> wrote in message
news:uq**************@TK2MSFTNGP09.phx.gbl...
for the cursor
Style="Cursor:Hand;"
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*************@TK2MSFTNGP11.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_darkfalz.com> wrote in message
news:Om**************@TK2MSFTNGP10.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_darkfalz.com> wrote in message
news:%2****************@TK2MSFTNGP09.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**************@TK2MSFTNGP09.phx.gbl...
The following code I am using to add "Delete" Hyperlink

Dim HLink As New HyperLink
HLink.ID = "DelLink"
HLink.Enabled = False
HLink.Attributes.Add("onClick", _
"return confirm('Are you Sure you want to delete " & _
"selected items?');")
HLink.navigateURL = "MasterReasonCode.aspx"
HLink.Text = "Delete"
hdrRow.Cells.Add(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_darkfalz.com> wrote in message
news:uq**************@TK2MSFTNGP09.phx.gbl...
for the cursor
Style="Cursor:Hand;"
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*************@TK2MSFTNGP11.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.Attributes.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_darkfalz.com> wrote in message
news:%2****************@TK2MSFTNGP09.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**************@TK2MSFTNGP09.phx.gbl...
The following code I am using to add "Delete" Hyperlink

Dim HLink As New HyperLink
HLink.ID = "DelLink"
HLink.Enabled = False
HLink.Attributes.Add("onClick", _
"return confirm('Are you Sure you want to delete " & _
"selected items?');")
HLink.navigateURL = "MasterReasonCode.aspx"
HLink.Text = "Delete"
hdrRow.Cells.Add(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_darkfalz.com> wrote in message
news:uq**************@TK2MSFTNGP09.phx.gbl...
for the cursor
Style="Cursor:Hand;"
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*************@TK2MSFTNGP11.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*************@TK2MSFTNGP11.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(theform)
{ if (rowsSelected != 0)
{ document.getElementById("DelLink").visible = true;
document.getElementById("DelLabel").visible = false; }
else
{ document.getElementById("DelLink").visible = false;
document.getElementById("DelLabel").visible = true; } }

When I debug through this code and try to see in the immediate window for
'document.getElementById("DelLink")' 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_darkfalz.com> wrote in message
news:Om**************@TK2MSFTNGP10.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_darkfalz.com> wrote in message
news:%2****************@TK2MSFTNGP09.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**************@TK2MSFTNGP09.phx.gbl...
The following code I am using to add "Delete" Hyperlink

Dim HLink As New HyperLink
HLink.ID = "DelLink"
HLink.Enabled = False
HLink.Attributes.Add("onClick", _
"return confirm('Are you Sure you want to delete " & _
"selected items?');")
HLink.navigateURL = "MasterReasonCode.aspx"
HLink.Text = "Delete"
hdrRow.Cells.Add(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_darkfalz.com> wrote in message
news:uq**************@TK2MSFTNGP09.phx.gbl...
for the cursor
Style="Cursor:Hand;"
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*************@TK2MSFTNGP11.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
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...
2
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>...
1
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...
6
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...
6
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
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...
0
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...
1
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...
0
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...
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
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...
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.