How can a text be wraped on a table cell
I am designing a blog using a dynamically generated table in C# for code behind. When testing I enter a long text without whitespace eg. "QQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQ" it doesn't wrap on the table cell. What's the solution for this. Please help.
Marimuthu ArigovindasamyPosted Jun 15, 2010, 9:46 PM
Khagy AmirPosted Jun 25, 2010, 12:24 PM
tr.Cells[0].Text = "
The only issue with this is that my table has two columns and after making these changes the text no longer spans the two columns as before. How can I resolve this?
thanks once again
Just sorted this out. This is how to span the text 2 columns;
tr.Cells[0].Text = "
Khagy AmirPosted Jun 16, 2010, 7:58 AM
// add blog in a single cell and span 2 columns
tr = new TableRow();
tr.Cells.Add(new TableCell());
tr.Cells[0].Width = 500;
tr.Cells[0].ColumnSpan = 2;
tr.Cells[0].Text = dr[3].ToString();
this.BlogTable.Rows.Add(tr);
This is where the message is being displayed. Because am not doing any work on HTML as BlogTable is generated dynamically, it is a bit difficult to implement your suggestion here.
Khagy AmirPosted Jun 16, 2010, 7:31 AM
This doesn't work either. Any more ideas?
thanks
Marimuthu ArigovindasamyPosted Jun 16, 2010, 1:34 AM