datagrid ignoring my columnspans



Hi i've been wrestling with this all day to no effect; I'm trying to
add cells to a datagrid's pager row:
protected void Grid_ItemCreated(object sender, DataGridItemEventArgs e)
if (e.Item.ItemType == ListItemType.Pager)
TableCell headerCell = new TableCell();

Label lblHeader = new Label();
lblHeader.Text = "Journals";

e.Item.Cells.AddAt(0, headerCell);

e.Item.Cells[0].ColumnSpan = 3;
e.Item.Cells[1].ColumnSpan = 1;
That's the jist of it anyway, seems simple enough but on the page, the
first pager cell is always set to span the entire table
(colspan='however-man-columns-in-table') and the remaining cell(s) that
I add just dribble off the end of the table. Why on earth won't the
datagrid respect my perfectly reasonable columnspan parameters! Any
ideas greatly appreciated.


Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question