Search:
Namespaces
Discussions
.NET v1.1
Feedback
Need help with Hyperlink Column in DataGrid!
Messages
Related Types
This message was discovered on
microsoft.public.dotnet.framework.aspnet
.
Post a new message to this list...
Jack Black
Hi, all!
I'm trying to build a hyperlink column in a
DataGrid
whose textField
is one column in the query, but whose URL needs to dynamically contain
the data from another.
For example, I want to display a book title (column = "Title"), but
the URL needs to be:
myPage.aspx?book=ISBN (where ISBN is a column name)
I'm building this with the designer, and not by manually writing out
the
DataGrid
and
HyperLinkColumn
tags. I've tried setting the URL
properties in the designer to a number of different things, but I only
get either the data column ALONE in place of the URL, or it isn't
processing the {0} portion of the URL (presumably this is an index
value, but since I can't find a single shred of documentation on this
convention, I'm guessing here)...
Tried a few different approaches, but can't get there... Suggestions?
Jack
Reply to this message...
Hermit Dave
set the column as template column... and then add hyperlink
for the navigate url.. use
navigateURL = '<%# "myPage.aspx?book=" + DataBind(
Container
.DataItem,
"columnname") %>'
something like that
--
Regards,
Hermit Dave
(
http://hdave.blogspot.com
)
"Jack Black" <
Click here to reveal e-mail address
> wrote in message
news:
Click here to reveal e-mail address
...
[Original message clipped]
Reply to this message...
Jack Black
Dave, thanks for responding! I tried that, and it still didn't work.
For some bizarre reason, using the "{0} nomenclature in the
URLFormatString property magically started working, after not having
worked all afternoon. Go figure. 8-|
Thanks again for the tip! I'll probably try to get your suggestion to
work anyway so I have other options in the ol' toolbag! :)
Jack
On Fri, 10 Sep 2004 22:25:29 +0100, "Hermit Dave"
<
Click here to reveal e-mail address
> wrote:
[Original message clipped]
Reply to this message...
System.ComponentModel.Container
System.Web.UI.WebControls.DataGrid
System.Web.UI.WebControls.HyperLinkColumn
System.Windows.Forms.DataGrid
Ad
MBR BootFX
Best-of-breed application framework for .NET projects, developed by Matthew Baxter-Reynolds and MBR IT
Copyright © Matthew Baxter-Reynolds 2001-2008. '.NET 247 Software Development Services' is a trading style of MBR IT Solutions Ltd.
Contact Us
-
Terms of Use
-
Privacy Policy
-
www.dotnet247.com