Hyperlink column not clickable

Hi,

I have a gridview on my page bound to a dataset.
It shows all the information, but the one column that should be a hyperlink 
is not working.
Here is the code I use to create the hyperlink column:

Dim clHP As New HyperLinkField
    clHP.DataTextField = "dateline"
    clHP.HeaderText = "Date"
    clHP.HeaderStyle.BackColor = gridbackcolor
    clHP.HeaderStyle.ForeColor = gridforecolor
    clHP.HeaderStyle.Font.Name = "Arial"
    clHP.HeaderStyle.Font.Bold = True
    clHP.HeaderStyle.Font.Size = fontsize
    clHP.HeaderStyle.HorizontalAlign = HorizontalAlign.Center
    clHP.DataNavigateUrlFields = field1
    clHP.DataNavigateUrlFormatString = 
"~/timsheetView.aspx?Sheet={0}&user={1}"
    clHP.DataTextFormatString = "{0:dd/MM/yyyy}"
    clHP.ItemStyle.BorderStyle = BorderStyle.Solid
    clHP.ItemStyle.BorderWidth = 1
    clHP.ItemStyle.BorderColor = Drawing.Color.Gray
    clHP.ItemStyle.HorizontalAlign = HorizontalAlign.Center
    clHP.ItemStyle.Font.Size = 8
    clHP.ItemStyle.Width = 70
    clHP.Visible = True
    ctrl.Columns.Add(clHP)

ctrl is the gridview.
I have used this in another website and there is works, so what is going 
wrong?
The date in this field is not underlined and you cannot click on it.

pls help me.

rg,
Eric
0
Utf
12/14/2009 9:18:01 AM
aspnet.datagridcontrol 10 articles. 0 followers. Follow

2 Replies
2515 Views

Similar Articles

[PageSpeed] 8

On Dec 14, 10:18=A0am, Eric <E...@discussions.microsoft.com> wrote:
> Hi,
>
> I have a gridview on my page bound to a dataset.
> It shows all the information, but the one column that should be a hyperli=
nk
> is not working.
> Here is the code I use to create the hyperlink column:
>
> Dim clHP As New HyperLinkField
> =A0 =A0 clHP.DataTextField =3D "dateline"
> =A0 =A0 clHP.HeaderText =3D "Date"
> =A0 =A0 clHP.HeaderStyle.BackColor =3D gridbackcolor
> =A0 =A0 clHP.HeaderStyle.ForeColor =3D gridforecolor
> =A0 =A0 clHP.HeaderStyle.Font.Name =3D "Arial"
> =A0 =A0 clHP.HeaderStyle.Font.Bold =3D True
> =A0 =A0 clHP.HeaderStyle.Font.Size =3D fontsize
> =A0 =A0 clHP.HeaderStyle.HorizontalAlign =3D HorizontalAlign.Center
> =A0 =A0 clHP.DataNavigateUrlFields =3D field1
> =A0 =A0 clHP.DataNavigateUrlFormatString =3D
> "~/timsheetView.aspx?Sheet=3D{0}&user=3D{1}"
> =A0 =A0 clHP.DataTextFormatString =3D "{0:dd/MM/yyyy}"
> =A0 =A0 clHP.ItemStyle.BorderStyle =3D BorderStyle.Solid
> =A0 =A0 clHP.ItemStyle.BorderWidth =3D 1
> =A0 =A0 clHP.ItemStyle.BorderColor =3D Drawing.Color.Gray
> =A0 =A0 clHP.ItemStyle.HorizontalAlign =3D HorizontalAlign.Center
> =A0 =A0 clHP.ItemStyle.Font.Size =3D 8
> =A0 =A0 clHP.ItemStyle.Width =3D 70
> =A0 =A0 clHP.Visible =3D True
> =A0 =A0 ctrl.Columns.Add(clHP)
>
> ctrl is the gridview.
> I have used this in another website and there is works, so what is going
> wrong?
> The date in this field is not underlined and you cannot click on it.
>
> pls help me.
>
> rg,
> Eric

I think the problem is in that fact that your
DataNavigateUrlFormatString required 2 parameters "Sheet=3D{0}&user=3D{1}"
but you did supply only 1:

clHP.DataNavigateUrlFields =3D field1

DataNavigateUrlFields requires a string, so you need to change it to
"field1, field2"

Hope this helps
0
Alexey
12/15/2009 8:38:46 AM

"Alexey Smirnov" wrote:

> On Dec 14, 10:18 am, Eric <E...@discussions.microsoft.com> wrote:
> > Hi,
> >
> > I have a gridview on my page bound to a dataset.
> > It shows all the information, but the one column that should be a hyperlink
> > is not working.
> > Here is the code I use to create the hyperlink column:
> >
> > Dim clHP As New HyperLinkField
> >     clHP.DataTextField = "dateline"
> >     clHP.HeaderText = "Date"
> >     clHP.HeaderStyle.BackColor = gridbackcolor
> >     clHP.HeaderStyle.ForeColor = gridforecolor
> >     clHP.HeaderStyle.Font.Name = "Arial"
> >     clHP.HeaderStyle.Font.Bold = True
> >     clHP.HeaderStyle.Font.Size = fontsize
> >     clHP.HeaderStyle.HorizontalAlign = HorizontalAlign.Center
> >     clHP.DataNavigateUrlFields = field1
> >     clHP.DataNavigateUrlFormatString =
> > "~/timsheetView.aspx?Sheet={0}&user={1}"
> >     clHP.DataTextFormatString = "{0:dd/MM/yyyy}"
> >     clHP.ItemStyle.BorderStyle = BorderStyle.Solid
> >     clHP.ItemStyle.BorderWidth = 1
> >     clHP.ItemStyle.BorderColor = Drawing.Color.Gray
> >     clHP.ItemStyle.HorizontalAlign = HorizontalAlign.Center
> >     clHP.ItemStyle.Font.Size = 8
> >     clHP.ItemStyle.Width = 70
> >     clHP.Visible = True
> >     ctrl.Columns.Add(clHP)
> >
> > ctrl is the gridview.
> > I have used this in another website and there is works, so what is going
> > wrong?
> > The date in this field is not underlined and you cannot click on it.
> >
> > pls help me.
> >
> > rg,
> > Eric
> 
> I think the problem is in that fact that your
> DataNavigateUrlFormatString required 2 parameters "Sheet={0}&user={1}"
> but you did supply only 1:
> 
> clHP.DataNavigateUrlFields = field1
> 
> DataNavigateUrlFields requires a string, so you need to change it to
> "field1, field2"
> 
> Hope this helps
> .
> 

Hi,

No, field1 is a string() holding "value1, value2"

But I solved the problem by using a template field.

thanks for replying.

rg,
Eric
0
Utf
12/18/2009 10:22:01 AM
Reply:

Similar Artilces:

Stacked/clustered column chart with a two vertical axes
Much has been discussed here about how to build this chart, but I haven't found anything explaining the possibility of combining it with a second y axis. I want to graph the advertising expenditure and gross rating points (what would be the return of investment on advertising) on television for three diaper brands by day part. Day parts would be represented by the different colors of which columns will consist. There are 5 of them: day, early, prime, late and over. For each brand, I want that two data columns show. The one to the right will represent the expenditure in $ and the one to the...

Hyperlinks #20
I have several hyperlinks in a word document that link to a specifi Excel workbook . Each of these links needs to point to a differen sheet within the workbook . However I can only get it to open the fil and not at the sheet I want - any clues -- Message posted from http://www.ExcelForum.com try =HYPERLINK("[yourworkbook.xls]sheet1!$a$4") -- Don Guillett SalesAid Software donaldb@281.com "kennyken >" <<kennyken.15borm@excelforum-nospam.com> wrote in message news:kennyken.15borm@excelforum-nospam.com... > I have several hyperlinks in a word document tha...

hyperlinks - file location
I'm creating hyperlinks with a list of documents in an excel spreadsheet. Is there a way to tell Excel where to look when I try to add the hyperlink. The link it only to a file on a network directory ... not to a website. It's a real time-waster to have to change it 200+ times. I did change where it looks for documents, but that was ineffective. It still goes to the same "wrong" location. It only goes to the drive/directory that the excel file is located ... arghhhhh! Any ideas. Thanks in advance. Diana When I do this, I put the server/folder names in a cell (A1) and ...

Pivot Table Splits Columns for same entry #2
Thanks for the response. However, I seem to have misrepresented m problem because the solution doesn't help. In the Layout for the Pivo Table I have the following: In the "ROW": Item#, In the "COLUMN": Tota Lost $, Frequency of Reports generated by item #, In the "DATA": sum th counts of each item #. My chart displays the Item# on the x-axis, th sum the counts of each item # on the y-axis, the Total Lost $ and th Frequency of Reports generated by item # in the legend. There should only be one column per item # whether the chart type i stacked or clustered. I...

Help Please- How to offset Date to correct column for Ageing
Hi All, I have a stock ageing sheet for finished goods, which uses a vlookup table, on entry of the Product code (last 3 Digits), this populates the next three columns with description, FG cost and Quantity of product. the quantity of product is entered again manually into the appropriate column, there are five columns these are banded <3 Months 0%, 3 to 6 Months 25%, 6 to 9 months 50%, 9 to 12 Months 75% and > 1 Year 100%, the percentage is liability provision. What I would like to do is on entry of the product code as above the quantity is automatically inserted into the correc...

Extracting hyperlinks
Hi, I have got an excel spreadsheet which has 500+ hyperlinks. I need to extract the address behind the text to be able to import the actual address into a db. e.g cell A1 has "click here" with http:/www.xyz.com behind it. I need to be able to copy the cell "click here" and paste it (special?) so that what i am pasting is http:/www.xyz.com. Paste value doesn't seem to work nor formula. Cheers Hi there Assuming that the hyperlinks are in the same column (starting in A1) the following code will place the address of the hyperlink in the cell directly to th...

changing lookup columns
Anybody know a way to add a column to the LookUp screen for Accounts? When I am in a contact record and want to choose a parent account, I would like more columns to distinguish between the different accounts that come up. This isn't the Advanced Find or Associated View for Accounts so I can't see where to add the columns. I've even checked the QueryBase table and don't see any one that looks like it applies. Thanks. There is no supported way to do this in v.1x. Check this folder if you feel curious: \\CRMSERVER\c$\Inetpub\wwwroot\_controls\lookup\lookupxml "A...

Selecting a directory or folder in Hyperlink dialog box
I am building a macro that will automate the first few steps of building a hyperlink. Because I don't know the location or name of the file to which the hyperlink will point, I would like the user to complete the process past a certain point. So, I have the following items in the macro thus far (for 2007): Application.SendKeys ("%NI") Application.SendKeys ("%L") This opens the Hyperlink dialog box and then activates the Look In block. Now I would like to direct it to a certain directory in the Look In block allowing the user to complete the h...

Determine if Value in column A exists in Column B
Hello All- Simple question...I have a sheet with several hundred 10 digit numbers in column A and in Column B. I need a formula to put in column C, that will tell me if the number in A appears anywhere in the list of column B. Doesn't matter if the num,ber in column A appears more than once in column B, just if it appears anywere at all.. A B C 1 02020 02110 True (appears at B2) 2 01121 02020 False 3 01111 98981 False 4 02110 89789 True (appears at B1) 5 19982 58676 ...

Ungrouping columns
I was wondering if there was a way to ungroup a column in a bar graph from the others so I can put individual error bars on it. I can get error bars but it will put the same ones on all in that same group and that's not accurate for what I need. The way I have to have it set for presentation I can't do it any other way. If anyone can help it would be appreciated. Troy - You can put the error bar values into the worksheet, different values for each point, then in the Error Bars dialog, use the Custom definition to select the range containing these values. You can also spec...

Sorting Stacked Columns
I am trying to sort the columns so that the largest value is on th bottom each year. This would change the order of the series over eac year presumably. I have not figured out a way to do this, and fear i may be VBA related. Any ideas? Thanks. I attached the file for viewing Attachment filename: testbook_stackedcols.xls Download attachment: http://www.excelforum.com/attachment.php?postid=61644 -- Message posted from http://www.ExcelForum.com ...

Searching in a column of strings
Hi I try to find how many cells have a sequence of charcters. From Cell A1:A50. Exemple for "NY" : cellA1 = NY123 cellA2 = NY3235 cellA3 = NY5434 cellA4 = LA4234 function(NY) = 3 Like Seach but instead to be in a single cell, it's in a sequence of cell? Thanks Jack Jack =COUNTIF($A:$A,"*NY*") Regards Trevor "Jack" <anonymous@discussions.microsoft.com> wrote in message news:348501c3fd71$700c6c60$a001280a@phx.gbl... > > Hi > > I try to find how many cells have a sequence of > charcters. From Cell A1:A50. > > Exe...

Return to Column A #2
There was a post almost a month ago on this subject. The question posed was a good one though the answers returned didn't really answer the need. It's easy to move to the right on enter but how do you move to the next row and first column if you are at the end of the first row. Yes one can hit down arrow/home or Home/down arrow but this is a little annoying. If a sheet is protected and cells are locked, isn't there an easier way to do this more elegantly? Thanks in advance for your thoughts, Greg Say you start with A1 selected. Type something in A1 and hit the Tab key...

Adjusting Two Columns with Text
I have two columns. I've entered numbered text in each column. As I add more numbered items, the second column keeps adjusting itself downward. Is there anyway to freeze the second column as I add items to column one? I am not really sure what you mean by "the second column keeps adjusting itself downward". Do you have a two column table, or is the document formatted with columns? It sounds like you may have the former when what you want is the latter. Format the document so that it has two columns (via the Page Setup section of the Page Layout tab in Word 200...

Dynamic Hyperlinking ?
Hi, I need to burn some files ( Word,PPTs,PDFs, etc) onto a CD. These are referenced using hyperlinks in excel. Is there a way to maintain the hyperlink while burning the CD, so that the hypelinks still work while on the the CD ?? Also, is there a way to embed Word/PDF/PPT files into an Excel Sheet and then Hyperlink it. So it all is stored in One BIG excel file . Thanks, Create a user function resulting in the path / filename of the excel sheet, and use that in your hyperlink destination. That way, if the files on CD are in the same (relative) location, it should still work after burn...

Help...Need to modify data within a column in a .csv file
I have been given a .csv file of several thousand rows, and I need to change column A of each. The brief cutout below shows column A of the first two rows. (I need to skip the first row, which is the headers.) Kinda clumsy to have such a wide column, but the application this file is to be fed after I change the contents requires all the data separated by double-quotes to be in the one column. Cell A2: 09/12/0509/25/05"1417385"121"307"111-11-1111"09/30/05"LASTNAME1 Cell A3: 09/12/0509/25/05"1417386"101"900000005"222-22-2222"09/30/05"...

comparing columns of numbers
Hi If you have 2 columns of numbers and you want to find the numbers that are in one columns but not the other, and you type say A10=B10 then when you find a figure that is in one column but not the other you insert/delete a line and then drag the formula down again to keep checking. Is there any better formula I can use or anyway I can do it so I don't have to keep dragging down the formula Public Sub ProcessData() Const TestCol1 As String = "A" Const TestCol2 As String = "B" Dim i As Long Dim LastRow As Long With Application .ScreenUpdating = Fal...

How do I make column on the left side of Outlook[inbox,Sent etc.]
I want to add a column on the left side when I am in Outlook that shows (Inbox, Sent Items, Deleted items etc...) How is this done when in Outlook, Windows XP (SP3) Home Edition? "John" <John@discussions.microsoft.com> wrote in message news:6FA61CD3-8CE3-4DFA-B7B7-A27BCF0C29A6@microsoft.com... > I want to add a column on the left side when I am in Outlook that shows > (Inbox, Sent Items, Deleted items etc...) How is this done when in Outlook, > Windows XP (SP3) Home Edition? Enable the Navigation Pane. Press Alt+F1 or click View>Navigation Pane. ...

SQL statement to find a particular column within all tables
I am looking for a query that will allow me to find all instances of a particular column within all tables so I know where they are all located. Does anyone have such a query they would be willing to share? Thank you. Pam, I posted this query a few months aback on my blog (http://dynamicsgpblogster.blogspot.com/2008/03/in-past-days-i-have-found-lot-of-people.html), but here is the excerpt: select distinct rtrim(objs.name) from syscolumns cols inner join sysobjects objs on (cols.id = objs.id) inner join sysindexes indx on (cols.id = indx.id) where (cols.name = 'ACTINDX') and (ob...

Hyperlinks not active
I have a 2007 worksheet where I have a column of about 250 hyperlinks. Non of them show up as hyperlinks. When I move my mouse over them they dont do anything. Is there a way I can make these cells which are valid web addresses, a working hyperlink?? Thanks CARD With your "dead" hyperlinks in column A, in B1 enter: =HYPERLINK(A1) and copy down -- Gary''s Student - gsnu2007h "Mr Crowley" wrote: > I have a 2007 worksheet where I have a column of about 250 hyperlinks. Non > of them show up as hyperlinks. When I move my mouse over them they...

hyperlinks from a list? using excel 2000
jacob Okay, I'll get right to the issue. I'm using the List feature of Data Validation in A1, with a range of names on the Z file. The list contains a name and telephone number and email address. What I'm trying to do is insert an email hyperlink in that same cell so when a List item is chosen from the drop down list, you can click on A1 to send an email address. The email hyperlink would need to change along with the name. I don't think this will work, so what about creating a clickable link in A2 that changes with ...

delete rows when any cells in column A is filled in RED color
Hi people, I need your help for a VB code that can delete the rows with any cells in column A being filled in RED color ? Alternatively, it will be fine for me if you have the code that can move the rows to the top when there are cells being filled in RED color in column A . Thanks in advance for help. ------------------------------------------------ ~~ Message posted from http://www.ExcelTip.com/ ~~View and post usenet messages directly from http://www.ExcelForum.com/ ~~Now Available: Financial Statements.xls, a step by step guide to creating financial statements If the colors are ...

how do I create a chart on two axes with stacked columns and line
I am struggling to create a chart that combines stacked columns on one X axis with a line on a second axis. Both are available as standard charts. Hi, Create the stacked column chart with all of your data. Select the data series you want to plot as a line on the secondary axis. Change the chart type to line. And then on the format dialog change the axis to the secondary. Cheers Andy ian ian ian rogers wrote: > I am struggling to create a chart that combines stacked columns on one X axis > with a line on a second axis. Both are available as standard charts. -- Andy Pope, Microso...

Hidden hyperlink within excel
Using VB6, I have created an excel spreadsheet. Some cells contain a hyperlink to TIF image files on a specific server within the LAN. When the user clicks on any one of these cells, it launches a copy of Imaging software and displays the image the hyperlink is pointing to. Is it possible to let the users view the images, like they are currently doing, without giving them direct read access to the specific location where the image files are located? I need to do this to ensure that the users do not view/access the images by any means other than clicking on the hyperlink. Also, the location of...

copy an intial cells contents into the next series of blank cells in a column
When doing a pivot table, the data in a column might have the initial cell inditifer, such as a date and the remaining cells if they have the same date will be blank. I know there is a process that you can highlight the cells in a range and have copied the initial cell into the next suceeding blank cells, I just don't remember the sequence of steps to get there. can anybod help? Select the column with data. F5>Special>Blanks>OK Type an = sign in active blank cell. Arrow or point to cell above. CTRL + Enter to fill all blanks with value from above. Gord Dibben MS Excel MV...