datagrid ignoring my columnspans

Discussion in 'ASP .Net Web Controls' started by justin, Oct 10, 2006.

  1. justin

    justin Guest

    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.
    justin, Oct 10, 2006
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. GIMME
    Replies:
    2
    Views:
    863
    GIMME
    Feb 11, 2004
  2. Jonathan Hollinger

    ASP.NET Processor Ignoring DataLists?

    Jonathan Hollinger, Aug 18, 2003, in forum: ASP .Net
    Replies:
    3
    Views:
    386
    Ken Cox [Microsoft MVP]
    Aug 19, 2003
  3. Ron Icard

    ASP.NET ignoring all breakpoints

    Ron Icard, Aug 22, 2003, in forum: ASP .Net
    Replies:
    1
    Views:
    429
    Ron Icard
    Aug 22, 2003
  4. Andy Beetz

    Request.QueryString ignoring characters

    Andy Beetz, Mar 2, 2004, in forum: ASP .Net
    Replies:
    6
    Views:
    794
    bruce barker
    Mar 2, 2004
  5. justin

    datagrid ignoring my columnspans

    justin, Oct 10, 2006, in forum: ASP .Net
    Replies:
    0
    Views:
    327
    justin
    Oct 10, 2006
Loading...

Share This Page