populate a dg column based upon the value populated to another row in the datagrid

Discussion in 'ASP .Net' started by Mike P, Jan 13, 2006.

  1. Mike P

    Mike P Guest

    Is it possible when populating a datagrid to populate a dropdownlist
    column based upon the value populated to another row in the datagrid?
    (i.e. I have a drop down which I want to populate differently for each
    row with user names based upon a UserRegionID which is also a column in
    the row).

    Since you don't actually know the value of the UserRegionID until the
    data is already bound to the datagrid, how do you do this?



    Thanks,

    Mike


    *** Sent via Developersdex http://www.developersdex.com ***
     
    Mike P, Jan 13, 2006
    #1
    1. Advertising

  2. Mike P

    DavidG Guest

    You can use the datagrid events (RowDataBound I think) to handle this
    by populating your dropdown using the id of each row as the grid is
    populated

    HTH

    -----------------------------------------
    David Gray
    ASP.NET/C# Developer/Architect (MCAD.NET)

    On Fri, 13 Jan 2006 02:23:16 -0800, Mike P <>
    wrote:

    >Is it possible when populating a datagrid to populate a dropdownlist
    >column based upon the value populated to another row in the datagrid?
    >(i.e. I have a drop down which I want to populate differently for each
    >row with user names based upon a UserRegionID which is also a column in
    >the row).
    >
    >Since you don't actually know the value of the UserRegionID until the
    >data is already bound to the datagrid, how do you do this?
    >
    >
    >
    >Thanks,
    >
    >Mike
    >
    >
    >*** Sent via Developersdex http://www.developersdex.com ***
     
    DavidG, Jan 13, 2006
    #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. vishnu
    Replies:
    1
    Views:
    1,230
    Patrick.O.Ige
    Mar 25, 2006
  2. John Kotuby
    Replies:
    1
    Views:
    628
    bruce barker
    Mar 12, 2008
  3. Balaji
    Replies:
    0
    Views:
    472
    Balaji
    Jul 7, 2003
  4. Enjoy Life
    Replies:
    2
    Views:
    290
    Roland Hall
    Feb 23, 2005
  5. mrichardson
    Replies:
    1
    Views:
    272
    Brian Helterline
    Sep 16, 2004
Loading...

Share This Page