I have an ASP.NET web app that processes some data from other sites and displays the information in a gridview. I don't know how many rows that gridview is going to have, nor how many columns.
In this gridview I have a templatefield which I used to add a Checkbox. The rest of the columns are added using a DataTable that I bind to this gridview. The problem now is that after 10 columns, I have an URL which I want to display as a button, or a link. After this link I have x nr of columns.
How do I add this URL which is resting between static columns and dynamic columns, in a GridView with dynamic rows ?
I tried writing a href=link.. in the DataTable but it displays it as text. I found an article that suggested something with HtmlDecode, but for that to work I would need to use boundfields which set the htmlencode = false..or something like that.
Is there any way of doing this ? or should I just move the link in the itemtemplate that has the checkbox as well and try to set it there ?