SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Zealot
    Join Date
    Sep 2005
    Posts
    189
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    DropDownList in DataGrid

    Hi,

    I have a template column for a dropdown list in my datagrid.

    What I need to do is fire some sort of event for each row, that will build a different dataset for each row.

    I can build the dataset easily, however it's the doing it for each row that's bugging me.

    I've seen an example which uses a row created method. However this was using a gridview. Unfortunately I'm using .NET 1.0

    so in summary, I have an empty dropdown list in every row, I just need a way to choose a dataset for each individual row (or maybe keep the same dataset but change the data that is pulled into it. I guess it's an event I'm looking for.

    Thanks!

  2. #2
    SitePoint Author silver trophybronze trophy
    wwb_99's Avatar
    Join Date
    May 2003
    Location
    Washington, DC
    Posts
    10,649
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    The DataRowBound event is in the DataGrid as well. I might have the name wrong, but look at the events in the documentation. There is one.

    As for the other issue (repeated hits to the db)--you are better off querying the in-memory dataset presuming the query is not complex.

  3. #3
    SitePoint Zealot
    Join Date
    Sep 2005
    Posts
    189
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks :-)

    I've managed to find the onDataBound event which will do pretty much the same thing. It involves pulling up the dataset, returning some values from it, then building a dropdown list from the values..and binding it.

    It's only taken me all day to do!

    Ah well..I'll know for next time


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •