Note that there are some explanatory texts on larger screens.

plurals
  1. POPutting HTML inside dynamically made column on aspx GridView
    text
    copied!<p>i'm trying to put a html div that contains an style that represents a dot (green, yellow or red). The thing is: I have to put this html inside a gridview (histRagStatus) column that was programatically made, as you can see:</p> <pre><code> private void popularHistoricoRAGStatus() { DataTable ragTable =ProjetoBO.HistoricoRAGStatusProjeto(Convert.ToInt32(Session["idProjeto"])); int agrupadorRagStatus = -1; int cont = 1; var tabelaFinal = PegarDataTable(); DataRow dataRow = tabelaFinal.NewRow(); foreach (DataRow row in ragTable.Rows) { cont++; if (Convert.ToInt32(row[9]) != agrupadorRagStatus) { cont = 1; agrupadorRagStatus = Convert.ToInt32(row[9]); tabelaFinal.Rows.Add(dataRow); dataRow = tabelaFinal.NewRow(); dataRow[1] = PegarCorIndicadorRagStatus(Convert.ToInt32(row[3]),row[6].ToString()); continue; } dataRow[0] = DateTime.Parse(row[2].ToString()).ToShortDateString(); dataRow[cont] = PegarCorIndicadorRagStatus(Convert.ToInt32(row[3]), row[6].ToString()); } histRagStatus.DataSource = tabelaFinal; histRagStatus.DataBind(); } </code></pre> <p>I got this DataTable that I fill with data from the database and I put it as a data source to the grid view. But Here is the problem: when I have a table with static column, that I put while on design, it works OK, the html is converted into the images, but when I put the SAME HTML into a programatically made column, it doesn't work, it becomes the HTML text itself as you can see here <a href="https://www.dropbox.com/s/rf07ecu66axmzg0/Sem%20t%C3%ADtulo.png" rel="nofollow">https://www.dropbox.com/s/rf07ecu66axmzg0/Sem%20t%C3%ADtulo.png</a> </p> <p>I'm stuck with this, any help would be appreciated</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload