Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. dynamic hyper link in datagrid

dynamic hyper link in datagrid

Scheduled Pinned Locked Moved ASP.NET
tutorial
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    dotnet_cpp
    wrote on last edited by
    #1

    Any good example on how to create dynamic hyperlink column in datagrid .. also when I read data .. . i want PID couln to be hyper link and then pass that ID to next page

    N C 2 Replies Last reply
    0
    • D dotnet_cpp

      Any good example on how to create dynamic hyperlink column in datagrid .. also when I read data .. . i want PID couln to be hyper link and then pass that ID to next page

      N Offline
      N Offline
      Nick Seng
      wrote on last edited by
      #2

      Don't double post. And didn't Misko already answered you?


      "if you vote me down, I shall become more powerful than you can possibly imagine" - Michael P. Butler.

      1 Reply Last reply
      0
      • D dotnet_cpp

        Any good example on how to create dynamic hyperlink column in datagrid .. also when I read data .. . i want PID couln to be hyper link and then pass that ID to next page

        C Offline
        C Offline
        chintan1979
        wrote on last edited by
        #3

        Hi, You can try out this... In the select statement add a dummy column as urlhref. This column will have the name of the page u want to call combined with the respective PID. For eg. if your table has two columns citycd and citydesc then write a select statement in this fashion.. select citycd, citydesc, 'webform1.aspx?c=' + citycd as urlhref from city. Now in datagrid columns, you must have made one column as hyperlink column. There is one property of the hyperlink column 'DataNavigateUrlField', which takes a field name of the datasource as its value and the datagrid uses this field for href tag for each row in the hyperlink column. So you can set this field DataNavigateUrlField='urlhref'. So now each row of your data grid's hyperlink column will have diffrent href as per the 'urlhref' column value. May be I am not able to give a perfact explaination but hope that it will help you... Chintan

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups