R
Rob Meade
Hi all,
I have just added a hyperlink column to my datagrid - however I am having
some troubles getting it to behave as I would like...
My objective is to have a hyperlink that I can click on - it doesn't take
the page anywhere (ie, javascript:void(0) - but I want an onClick event
for it.
I can normally do this kinda thing with a 'Attributes' property of the
object - however the HyperLinkColumn doesn't appear to have one of these.
Can anyone advise me how I can achieve this please.
The end game is to have one of the columns that has a value from the
database become the hyperlink - however - for now I've just added a 3rd
column which has the word "Select" etc..
Code as follows:
' Create new instances of our bound column objects
dgCol3 = New HyperLinkColumn
dgCol3.Text = "Select"
dgCol3.NavigateUrl = "javascript:void(0)"
dgCol3.HeaderText = ""
dgCol3.HeaderStyle.CssClass = "normalText"
dgCol3.HeaderStyle.Font.Bold = True
Any information would be appreciated - please note that other than the
server control for the datagrid - all of the columns are being added
programmatically rather than embedded into the HTML.
Thanks
Rob
I have just added a hyperlink column to my datagrid - however I am having
some troubles getting it to behave as I would like...
My objective is to have a hyperlink that I can click on - it doesn't take
the page anywhere (ie, javascript:void(0) - but I want an onClick event
for it.
I can normally do this kinda thing with a 'Attributes' property of the
object - however the HyperLinkColumn doesn't appear to have one of these.
Can anyone advise me how I can achieve this please.
The end game is to have one of the columns that has a value from the
database become the hyperlink - however - for now I've just added a 3rd
column which has the word "Select" etc..
Code as follows:
' Create new instances of our bound column objects
dgCol3 = New HyperLinkColumn
dgCol3.Text = "Select"
dgCol3.NavigateUrl = "javascript:void(0)"
dgCol3.HeaderText = ""
dgCol3.HeaderStyle.CssClass = "normalText"
dgCol3.HeaderStyle.Font.Bold = True
Any information would be appreciated - please note that other than the
server control for the datagrid - all of the columns are being added
programmatically rather than embedded into the HTML.
Thanks
Rob