Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   ASP .Net Datagrid Control (http://www.velocityreviews.com/forums/f60-asp-net-datagrid-control.html)
-   -   insert a hyperlink column to datgrid (http://www.velocityreviews.com/forums/t760335-insert-a-hyperlink-column-to-datgrid.html)

TJS 02-27-2004 05:45 AM

insert a hyperlink column to datgrid
 
how can I programmatically insert an optional hyperlink column into my
datagrid which is currently being created from design tags

I am trying example found as below but with no success. what am I missing?


==============code====================
.... create dataset ...

MyDataGrid.AutoGenerateColumns = false

if condition = true then
' Add a hyperlink column
Dim hc1 as new HyperLinkColumn
hc1.DataTextField = "StringValue"
hc1.DataTextFormatString = "Show details for {0}"
hc1.DataNavigateUrlField="IntegerValue"
hc1.DataNavigateUrlFormatString="details.aspx?ID={ 0}"
hc1.HeaderText="Show me more"
MyDataGrid.Columns.Add (hc1)
end if

MyDataGrid.DataSource = ds
MyDataGrid.DataBind()



Alvin Bruney [MVP] 03-02-2004 02:59 PM

Re: insert a hyperlink column to datgrid
 
Your post went unanswered. Have you resolved this issue?

--
Regards,
Alvin Bruney [ASP.NET MVP]
Got tidbits? Get it here...
http://tinyurl.com/3he3b
"TJS" <nospam@here.com> wrote in message
news:enQrpTP$DHA.4060@TK2MSFTNGP10.phx.gbl...
> how can I programmatically insert an optional hyperlink column into my
> datagrid which is currently being created from design tags
>
> I am trying example found as below but with no success. what am I

missing?
>
>
> ==============code====================
> ... create dataset ...
>
> MyDataGrid.AutoGenerateColumns = false
>
> if condition = true then
> ' Add a hyperlink column
> Dim hc1 as new HyperLinkColumn
> hc1.DataTextField = "StringValue"
> hc1.DataTextFormatString = "Show details for {0}"
> hc1.DataNavigateUrlField="IntegerValue"
> hc1.DataNavigateUrlFormatString="details.aspx?ID={ 0}"
> hc1.HeaderText="Show me more"
> MyDataGrid.Columns.Add (hc1)
> end if
>
> MyDataGrid.DataSource = ds
> MyDataGrid.DataBind()
>
>





All times are GMT. The time now is 09:56 AM.

Powered by vBulletin®. Copyright ©2000 - 2013, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57