Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Creating hyperlinks in datagrid
Message
 
To
03/07/2002 14:08:20
Jerry Tovar
Dana Corporation Dana It
Maumee, Ohio, United States
General information
Forum:
ASP.NET
Category:
Other
Miscellaneous
Thread ID:
00675043
Message ID:
00675059
Views:
11
You do this inside the Web DataGrid. Use use the HyperLink Web Control as a column. To get to the columns, go into the DataGrid Propery Builder and then select Columns. Then choose HyperLink Column for the one you want to display as a hyperlink.

>Using C#.
>
>I am currently displaying data in a webform using the datagrid control.
>
>How can I wrap HTML around 1 of the fields in my table to create a hyper link?
>
>I tried this, but it didn't work:
>oleDbCommand1.CommandText =
> "SELECT " +
> "" +
> "mytable.cu_name" + "
" + " AS Company, " +
> "mytable.cu_profess AS Profession, " +
> "mytable.cu_fulname AS Full_Name " +
> "FROM mytable WHERE mytable.name LIKE '" + lc_somevar + "%' "
>
>When I did a build and browse, I got a "Command contains unrecognized phrase/keyword" in the browser.
>
>Using Web Connect, I can:
>SELECT ;
> "" + ;
> ALLTRIM(mytable.field) + ;
> "
" AS myheader, ;
> FROM mytable ;
> INTO CURSOR mycursor NOFILTER
>
>How can I do this in C#?
>
>Thanks,
>
>Jerryt
-----------------------------------------

Cathi Gero, CPA
Prenia Software & Consulting Services
Microsoft C# / .NET MVP
Mere Mortals for .NET MVP
cgero@prenia.com
www.prenia.com
Weblog: blogs.prenia.com/cathi
Previous
Reply
Map
View

Click here to load this message in the networking platform