Doubt template

Discussion in 'ASP .Net' started by Paulo, Sep 3, 2007.

  1. Paulo

    Paulo Guest

    Hi, inside a template field, ItemTemplate, on a GridView, I have a combobox,
    but how can I fill it only on first time before filling the gridview rows?
    Im usvig VS 2005 asp.net 2.0 C#??

    Thanks
    Paulo, Sep 3, 2007
    #1
    1. Advertising

  2. Perhaps the best way is to bind it with a DataSource Control (e.g.
    ObjectDataSource or SqlDataSource). That would take care of details
    like 'when, how, where' and caching. Please note that DataSource
    controls are bound by propertie DataSourceID (and not DataSource).

    Alternatively you may hook up RowCreated event and get manual access
    by e.Row.FindControl (after ensuring its a data row by e.Row.RowType
    == DataControlRowType.DataRow).
    Muhammad Naveed Yaseen, Sep 3, 2007
    #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. Chris Theis
    Replies:
    2
    Views:
    467
    Chris Theis
    Jul 24, 2003
  2. Bob Nelson

    doubt about doubt

    Bob Nelson, Jul 28, 2006, in forum: C Programming
    Replies:
    11
    Views:
    623
  3. Replies:
    0
    Views:
    559
  4. Peter Otten
    Replies:
    2
    Views:
    111
    Cousin Stanley
    Aug 10, 2013
  5. Terry Reedy
    Replies:
    0
    Views:
    115
    Terry Reedy
    Aug 10, 2013
Loading...

Share This Page