Adding runtime columns to designtime datagrid

Discussion in 'ASP .Net' started by Chip, Nov 10, 2003.

  1. Chip

    Chip Guest

    I've got a datagrid defined on the design page. At runtime, I'd like to add
    a bound column. I'm using
    Dim CallNum As New BoundColumn()
    CallNum.DataField = "call_num"
    CallNum.HeaderText = "Call #"
    CallNum.Visible = True
    grdList.Columns.Add(CallNum)


    But, the new column is not showing up at runtime. Is there another step to
    this?

    Chip
    Chip, Nov 10, 2003
    #1
    1. Advertising

  2. Chip

    Chip Guest

    Just figured it out. The new column doesn't survive the postback, so it
    needs to be added just in time for use.


    "Chip" <> wrote in message
    news:...
    > I've got a datagrid defined on the design page. At runtime, I'd like to

    add
    > a bound column. I'm using
    > Dim CallNum As New BoundColumn()
    > CallNum.DataField = "call_num"
    > CallNum.HeaderText = "Call #"
    > CallNum.Visible = True
    > grdList.Columns.Add(CallNum)
    >
    >
    > But, the new column is not showing up at runtime. Is there another step to
    > this?
    >
    > Chip
    >
    >
    Chip, Nov 10, 2003
    #2
    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. Varangian
    Replies:
    7
    Views:
    560
    Varangian
    Apr 27, 2006
  2. Grupo ESI - Cotarelo
    Replies:
    0
    Views:
    406
    Grupo ESI - Cotarelo
    Sep 29, 2008
  3. General Chaud Caliente

    Segregating designtime from runtime

    General Chaud Caliente, Oct 17, 2003, in forum: ASP .Net Building Controls
    Replies:
    8
    Views:
    339
    Victor Garcia Aprea [MVP]
    Oct 24, 2003
  4. Naveed Alam

    Adding Columns at runtime in datagrid control

    Naveed Alam, Sep 5, 2003, in forum: ASP .Net Datagrid Control
    Replies:
    0
    Views:
    130
    Naveed Alam
    Sep 5, 2003
  5. Edward J. Stembler

    Designtime error when accessing DataGrid Columns collection

    Edward J. Stembler, Oct 17, 2003, in forum: ASP .Net Web Controls
    Replies:
    0
    Views:
    115
    Edward J. Stembler
    Oct 17, 2003
Loading...

Share This Page