3
I have the following code that generates my Gridview:
protected void Page_Load(object sender, EventArgs e)
        {
            try
            {
                AlteracoesContrato alteracoes = new AlteracoesContrato(movimentacaoId);
                grdListaAlteracoes.DataSource = alteracoes.ListaResumidaAlteracoes;
                if (alteracoes.ListaResumidaAlteracoes.Count > 0)
                {
                    lblAviso.Visible = false;
                    BoundField linkColumnBoundField = new BoundField();
                    linkColumnBoundField.HeaderText = "Visualizar";
                    grdListaAlteracoes.Columns.Add(linkColumnBoundField);
                    grdListaAlteracoes.DataBind();
                }
                else
                    lblAviso.Text = "Nenhuma alteração foi realizada nesse contrato.";
            }
            catch (Exception ex)
            {
                lblAviso.Text = "Erro ao exibir alterações do contrato.";
                GravaLogErro(ex);
                ShowAlert(ERRO_RECUPERAR);
            }
        }
In the stretch grdListaAlteracoes.Columns.Add(linkColumnBoundField); i add a column on the grid, but I don’t know how to popular each field with the link I want.
I thought about putting the HTML right in the initial list that mounts the Grid, but I did a test and it does not do the HTML Find and the text is shown with the tags instead of the link.
How can I add this column with links?