I have data grid:
In that i have to show different hyperlinks colors with type of memberships.
If gold member then Hyperlink is Green
If Silver member then Hyperlink is Red.
otherwise the Hyperlink shoudl be Blue !!!
How to achieve this is Data grid!!!.
As I demonstrate in the second article you basically have two choices:
1) Perform some preprocessing on your DataTable after filling it from the database and before binding it to the DataGrid. For example, create another column, loop over all the rows and fill the added column with the HTML you want to display. Then you can bind that column to a simple BoundColumn on the Grid.
2) Use TemplateColumns where you have total control. Then once you define your DataGrid columns, there is no preprocessing of your DataTable required. You can bind the table directly to the grid after reading from the database.
If you need a quick and dirty solution, use 1), if you expect to run into this problem again, use 2).
For all the details and my custom link template column, check out the articles.