se_brandon
se_brandon

Reputation: 228

HyperLinkField in Gridview not showing link on column's items

I have a question today about the usage of HyperLinkField in a GridView. I have searched nearly everything, but nothing I try is working. I am running and ORACLE database and all of the fields below are string type EXCEPT for RECORD_DATE and RECORD_TIME. They are of type 'DATE'.

This is what I have:

 <asp:HyperLinkField HeaderText="MODEL_NUMBER" DataTextField="MODEL_NUMBER" SortExpression="MODEL_NUMBER" DataNavigateUrlFields="MODEL_NUMBER, SERIAL_NUMBER, DEFECT_CODE, RECORD_DATE, RECORD_TIME"
                DataNavigateUrlFormatString="~/AllAudits.aspx?Model={0}&Serial={1}&Defect={2}&RecordDate={3}&RecordTime={4}" />

Visual Studio has no complaints with the string, and the page loads fine and everything, but it isn't showing a link for the column labeled "MODEL_NUMBER" like it should be.

I tried:

 NavigateUrl="~/AllAudits.aspx"

And that created a link, but I don't think I have the ability to pass parameters through this.

Can anyone point me in the correct direction on this?

Upvotes: 0

Views: 1136

Answers (1)

Goose
Goose

Reputation: 3279

It may have something to do with how you are passing in the date types. This thread seems to resolve the problem you are having.

Upvotes: 1

Related Questions