Create hyperlink column in gridview or datagrid

Sometimes when you display the data on the datagrid or gridview , you want to create some link. let’s say when you displaying your user detail data in the grid. you want the user to be able to click the link in email column that automatically open microsoft outlook for you. You also would like to avoid writing some string replacement or creating a function in rowbound event. This is the easiest way to do it. Edit the column and add this into DataFormatString

{0:G}

this can be used to pass some variable from the fields(query string) to some address.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s