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

Missing link in HyperLink Column in datagrid

I have a HyperLink Column , View, in DataGrid, which link to URL Field,
called URLQuery.

In codebehind, I have
dsResource.Tables("Resource4Spec").Columns.Add("UR LQuery",
Type.GetType("System.String"), "MethodName + '?pkey=' + PatientKey + '&prot='
+ Protocol + '&ip=' + IPaddress + '&path=' + DirPath + '&file=' + FileName +
'&rscID=' + ResourceID")

where MethodName, PatientKey, IPaddress, DirPath, FileName, and ResourceID
are column names of a database table.

The problem is that when FileName field in a row is NULL (Nothing), the View
field is not highlighted (i.e., not enabled) and URLQuery field is empty too
in that row.

In this case, how can I do such that the URLQuery field can have other
key/name pairs but not file/FileName?

Thank you

David
Jan 5 '06 #1
2 1379
Replace the null field by a blank like this: IsNull(FileName,'')
dsResource.Tables("Resource4Spec").Columns.Add("UR LQuery",
Type.GetType("System.String"), "MethodName + '?pkey=' + PatientKey +
'&prot='
+ Protocol + '&ip=' + IPaddress + '&path=' + DirPath + '&file=' +
IsNull(FileName,'') +
'&rscID=' + ResourceID")

--
HTH,
Phillip Williams
http://www.societopia.net
http://www.webswapp.com
"david" wrote:
I have a HyperLink Column , View, in DataGrid, which link to URL Field,
called URLQuery.

In codebehind, I have
dsResource.Tables("Resource4Spec").Columns.Add("UR LQuery",
Type.GetType("System.String"), "MethodName + '?pkey=' + PatientKey + '&prot='
+ Protocol + '&ip=' + IPaddress + '&path=' + DirPath + '&file=' + FileName +
'&rscID=' + ResourceID")

where MethodName, PatientKey, IPaddress, DirPath, FileName, and ResourceID
are column names of a database table.

The problem is that when FileName field in a row is NULL (Nothing), the View
field is not highlighted (i.e., not enabled) and URLQuery field is empty too
in that row.

In this case, how can I do such that the URLQuery field can have other
key/name pairs but not file/FileName?

Thank you

David

Jan 5 '06 #2
Thank you

"Phillip Williams" wrote:
Replace the null field by a blank like this: IsNull(FileName,'')
dsResource.Tables("Resource4Spec").Columns.Add("UR LQuery",
Type.GetType("System.String"), "MethodName + '?pkey=' + PatientKey +
'&prot='
+ Protocol + '&ip=' + IPaddress + '&path=' + DirPath + '&file=' +
IsNull(FileName,'') +
'&rscID=' + ResourceID")

--
HTH,
Phillip Williams
http://www.societopia.net
http://www.webswapp.com
"david" wrote:
I have a HyperLink Column , View, in DataGrid, which link to URL Field,
called URLQuery.

In codebehind, I have
dsResource.Tables("Resource4Spec").Columns.Add("UR LQuery",
Type.GetType("System.String"), "MethodName + '?pkey=' + PatientKey + '&prot='
+ Protocol + '&ip=' + IPaddress + '&path=' + DirPath + '&file=' + FileName +
'&rscID=' + ResourceID")

where MethodName, PatientKey, IPaddress, DirPath, FileName, and ResourceID
are column names of a database table.

The problem is that when FileName field in a row is NULL (Nothing), the View
field is not highlighted (i.e., not enabled) and URLQuery field is empty too
in that row.

In this case, how can I do such that the URLQuery field can have other
key/name pairs but not file/FileName?

Thank you

David

Jan 5 '06 #3

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

Similar topics

2
by: Ravikanth[MVP] | last post by:
Hi asp:DataGrid id="YourID" runat="server" AutoGenerateColumns="False"> <Columns> <asp:TemplateColumn HeaderText="Sample Column"> <ItemTemplate> <asp:Hyperlink runat="server" Text='<%...
2
by: damonf | last post by:
I'm currently trying to add an ASP hyperlink to a template column in a datagrid. The normal hyperlink column doesn't give me the ability to add attributes to the item. In my grid there are four...
5
by: jib | last post by:
How do I redirect a hyperlink column's URL when the URL doesn't exist? Is it possible to set a default URL for the Hyperlink button? Thanks, Jib
2
by: Alex | last post by:
I would like to have one column in my DataGrid that content acts as a hyperlink. In addition to that I would like that the content is databound to a DataSet source. If I create a hyperlink...
9
by: Paul | last post by:
Hi I have a data grid with a hyperlink column. the colum has numbers like 00001,000002, ect. Just wondering how to get the text value of the cell as tempstring =...
1
by: D. Shane Fowlkes | last post by:
Hello All. I keep asking for help with this on the www.asp.net forums and nobody seems to be able to help. What I'm trying to accomplish is very simple. I simply want to create a Hyperlink...
2
by: JenHu | last post by:
hi, I have a datagrid in my asp.net application, I am using vb.net language. I want to have my last column as a link column, link to text file. The link path is "c:\Temp\" & F_File_Name, which...
6
by: Chris Kennedy | last post by:
I have a datagrid bound to a datareader. One of the columns contains file name. I would like a column which acts as a link and opens a link to the file (normally a pdf). How would I do this?
3
by: serge calderara | last post by:
Dear all, I have an application which display database result querry , store it in a dataset and bind a Datagrid control to it. I would like that the content of one particular column behaves...
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:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
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
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

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.