First bind string separated by comma to a label...
Then in
RowDataBound...
protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
Label lblcol3 = (Label)e.Row.FindControl("lblcol3");
string temp = lblcol3.Text;
if (temp != "")
{
string[] temporary = temp.Split(',');
int length = temporary.Count();
StringBuilder db = new StringBuilder();
bool first = true;
if (length > 0)
{
foreach (string word in temporary)
{
if (word == "," || word == "")
{
break;
}
else
{
if(!first)
{
db.Append("," + "<br />");
}
db.Append(word);
}
}
lblcategory.Text = db.ToString();
}
else
{
}
}
}
...