Adding hyperlink button column in silverlight grid from codebehind?
-
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---
-
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---
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 uniqueName
. After the button was created, I subscribed to theClick
event (all buttons used the same event method), and then added the button to the appropriate grid column/row. In the event handler, theTag
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