datagrid ignoring my columnspans

J

justin

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";
headerCell.Controls.Add(lblHeader);

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

Members online

No members online now.

Forum statistics

Threads
473,928
Messages
2,570,068
Members
46,513
Latest member
JacklynMcC

Latest Threads

Top