hyperlink in grid

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

How can I create a hyperlink in a datagrid were I'm autogenerating the
columns? I need to have a link to the document listed in the grid.
 
I know how to add the hyperlink if I'm binding the colums through the
designer. How can you add a hyperlink to a column if I'm adding the columns
via code and not the designer? Binding the columns through the designer will
not work in this case due to the grid columns change based on the users
selection from the drop down
 
You can add HyperLinkColumn. Then in datagrid_ItemDataBound event to build
its URL accouding to data source data. You can also know its position
depending on data source, e.g. datatable.Columns.Count. Anyway, why not?

HTH

Elton Wang
 
I figured it out

Elton W said:
You can add HyperLinkColumn. Then in datagrid_ItemDataBound event to build
its URL accouding to data source data. You can also know its position
depending on data source, e.g. datatable.Columns.Count. Anyway, why not?

HTH

Elton Wang
 
Back
Top