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. General Programming
  3. WPF
  4. Adding hyperlink button column in silverlight grid from codebehind?

Adding hyperlink button column in silverlight grid from codebehind?

Scheduled Pinned Locked Moved WPF
questioncsswpfwcf
2 Posts 2 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.
  • M Offline
    M Offline
    mittalpa
    wrote on last edited by
    #1

    Hi Since I am building the columns from code-behind, I need to attach hyperlink into one of the columns from code behind. And also, I need to add the click event. How can I do that and its data-binding in code behind? Please advise. Thanks AJ

    Follow your goals, Means will follow you ---Gandhi---

    realJSOPR 1 Reply Last reply
    0
    • M mittalpa

      Hi Since I am building the columns from code-behind, I need to attach hyperlink into one of the columns from code behind. And also, I need to add the click event. How can I do that and its data-binding in code behind? Please advise. Thanks AJ

      Follow your goals, Means will follow you ---Gandhi---

      realJSOPR Offline
      realJSOPR Offline
      realJSOP
      wrote on last edited by
      #2

      I just did that in our own silverlight app (I assume you're talking about a regular Grid (as opposed to a DataGrid). I simply created the button and set the Tag property indicating it's purpose (or associated data). This kept me from having to set a unique Name. After the button was created, I subscribed to the Click event (all buttons used the same event method), and then added the button to the appropriate grid column/row. In the event handler, the Tag object indicated what the button was supposed to do.

      .45 ACP - because shooting twice is just silly
      -----
      "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997
      -----
      "The staggering layers of obscenity in your statement make it a work of art on so many levels." - J. Jystad, 2001

      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