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.
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.