How to create links to a datagrid programmitcally


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 4 of 4

Thread: How to create links to a datagrid programmitcally

  1. #1
    Join Date
    Feb 2005
    Posts
    91

    How to create links to a datagrid programmitcally

    Hi People,

    Could anyone suggest how to create hyper links to a datagrid? I have created a datagrid that will retrieves information from a database and would like to add hyper links to the id column programmitcally.

    I know you can use create hyper links from design view, but my datagrid only appear in runtime.

    Please help

    Thanks

    Kero

  2. #2
    Join Date
    Nov 2003
    Location
    Portland, OR
    Posts
    8,387
    How are you creating the DataGrid at runtime? You should be able to simply create a new HyperlinkColumn and add it to the DataGrid's Columns collection.
    Phil Weber
    http://www.philweber.com

    Please post questions to the forums, where others may benefit.
    I do not offer free assistance by e-mail. Thank you!

  3. #3
    Join Date
    Feb 2005
    Posts
    91
    Thanks Phil,

    I have replaced the BoundColumn object with the HyperlinkColumn Object.

    eg.

    I am using HyperLinkColumn
    ' -- add Hyper Link columns to datagrid
    Dim datagridHyp As New HyperLinkColumn
    datagridHyp.HeaderText = "ID"
    datagridHyp.DataTextField = IDNo

    Instead of using BoundColumn
    ' -- add bound columns to datagrid
    Dim datagridcol As New BoundColumn
    'datagridcol.HeaderText = "ID"
    'datagridcol.DataField = IDNo

    Thanks

    kero

  4. #4
    Join Date
    Feb 2004
    Posts
    126
    Kero this example could help at:-
    http://www.datawebcontrols.com/faqs/...ewWindow.shtml
    Patrick

Similar Threads

  1. Getting a GUI to run
    By Eric in forum Java
    Replies: 4
    Last Post: 04-14-2006, 09:09 AM
  2. Replies: 0
    Last Post: 08-26-2002, 03:38 AM
  3. Create dynamic links using XSL
    By Curt in forum XML
    Replies: 7
    Last Post: 06-27-2002, 01:03 PM
  4. Replies: 0
    Last Post: 10-17-2001, 02:36 AM
  5. Create links from Window Onload
    By THOMGATE in forum Web
    Replies: 0
    Last Post: 02-22-2001, 03:19 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center