E
epigram
I'm using the DataGrid with AutoGenerateColumns set to false and choosing
which columns I want in the grid by using the <Columns> attribute. What I
want to do is to create a hyperlink out of one of the columns that I am
displaying, but in order to build this link, I need a value that is in my
SELECT clause, but is not being displayed via a BoundColumn.
Say I have a query: SELECT ID, Name FROM Companies
Here, ID is the PK. I am only displaying the Name column, but I want the
Name to be a hyperlink to a "details" page for the company. So, I want to
build a link such as "CompanyDetails.aspx?id=1234".
I know there is an event I can override to change how the Name cell in the
DataGrid is rendered. What I don't know is how I can programmatically
access the ID column from my query once I am in this event handler.
Thanks!
which columns I want in the grid by using the <Columns> attribute. What I
want to do is to create a hyperlink out of one of the columns that I am
displaying, but in order to build this link, I need a value that is in my
SELECT clause, but is not being displayed via a BoundColumn.
Say I have a query: SELECT ID, Name FROM Companies
Here, ID is the PK. I am only displaying the Name column, but I want the
Name to be a hyperlink to a "details" page for the company. So, I want to
build a link such as "CompanyDetails.aspx?id=1234".
I know there is an event I can override to change how the Name cell in the
DataGrid is rendered. What I don't know is how I can programmatically
access the ID column from my query once I am in this event handler.
Thanks!