When you use a TemplateField
you cannot use e.Row.Cells[index].Text
to access a control text of the cell. I would simply add a Label
to the panel.
But you can also try it this way:
Panel ViewCommentPanel = (Panel) e.Row.FindControl("ViewCommentPanel");
LiteralControl objPanelText = ViewCommentPanel.Controls[0] as LiteralControl;
TextBox Comment = (TextBox) row.FindControl("Comment");
Comment.Text = objPanelText.Text;