Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > HowTo: databound hyperlink in DataGrid?

Reply
Thread Tools

HowTo: databound hyperlink in DataGrid?

 
 
Alex
Guest
Posts: n/a
 
      04-13-2004
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 column in VS.NET I loose the databinding feature for
that column. If I choose a data bound column I don't get the hyperlink
formatting and actions.



 
Reply With Quote
 
 
 
 
Cowboy \(Gregory A. Beamer\) [MVP]
Guest
Posts: n/a
 
      04-14-2004
Right click on the datagrid and go to Property Builder. Go to the second
choice, which is bound columns (or similar). Uncheck autogenerate checkbox
and add each of the columns. Unfortunately, you will have to know the actual
names of the fields. You can set up a hyperlink column by pulling a
hyperlink column over. You can set different fields for text and URL. For
URL format, it is generally:

pageName.aspx?ID={0}

You then specify the column to use for ID= in the URL text field. Once you
play with it a bit, you will find it to be extremely simple.

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

************************************************** *************
Think outside the box!
************************************************** *************
"Alex" <(E-Mail Removed)> wrote in message
news:c5htli$cum$(E-Mail Removed)...
> 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 column in VS.NET I loose the databinding feature

for
> that column. If I choose a data bound column I don't get the hyperlink
> formatting and actions.
>
>
>



 
Reply With Quote
 
 
 
 
Alex
Guest
Posts: n/a
 
      04-14-2004
Being new to this, I think I need a little more detail for the second part.
My URL's come from a DB as a column in the dataset.


"Cowboy (Gregory A. Beamer) [MVP]" <(E-Mail Removed)> wrote
in message news:O%23%(E-Mail Removed)...
> Right click on the datagrid and go to Property Builder. Go to the second
> choice, which is bound columns (or similar). Uncheck autogenerate checkbox
> and add each of the columns. Unfortunately, you will have to know the

actual
> names of the fields. You can set up a hyperlink column by pulling a
> hyperlink column over. You can set different fields for text and URL. For
> URL format, it is generally:
>
> pageName.aspx?ID={0}
>
> You then specify the column to use for ID= in the URL text field. Once you
> play with it a bit, you will find it to be extremely simple.
>
> --
> Gregory A. Beamer
> MVP; MCP: +I, SE, SD, DBA
>
> ************************************************** *************
> Think outside the box!
> ************************************************** *************
> "Alex" <(E-Mail Removed)> wrote in message
> news:c5htli$cum$(E-Mail Removed)...
> > 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 column in VS.NET I loose the databinding feature

> for
> > that column. If I choose a data bound column I don't get the hyperlink
> > formatting and actions.
> >
> >
> >

>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
databound custom controls vs composite databound custom controls rodchar ASP .Net 0 11-26-2007 03:51 PM
Bulletedlist - Databound - Hyperlink Håkan ASP .Net 1 04-20-2007 01:33 PM
databound and hyperlink field needed in gridview Carlos ASP .Net 1 06-08-2006 04:17 AM
templated databound control problem - not showing databound Manu ASP .Net Web Controls 0 05-22-2006 09:46 AM
Hiding a hyperlink in a non-databound datagrid column BobRoyAce ASP .Net 2 01-20-2005 04:24 PM



Advertisments