ddl in datagrids

Discussion in 'ASP .Net Datagrid Control' started by Carl, Oct 21, 2003.

  1. Carl

    Carl Guest

    Hello All..

    I'm trying to find the best way to edit two columns in a datagrid. The data
    source for each of the two editable items are presented in the form a drop
    down lists.

    Upon clicking edit for a row, I'd like to present a ddl in each of the two
    editable columns. The first column determines the contents of the second
    column.

    Upon clicking save, I'd like the two selected items to be saved. I've done
    inline editing before with text boxes, but not with ddl's.

    Is this possible.. and if so.. can someone point me in the right direction?

    Thanks very much.

    Carl
    Carl, Oct 21, 2003
    #1
    1. Advertising

  2. Carl

    Igor Okulist Guest

    This is a pain to do. i looked at some samples, but somehow everybody
    fails to solve the selection of needed item in the ddl (i.e. when you edit
    the grid it suppose to show up correct selection)

    Here is what i did, first of all it is not perfect (far from it) but works
    well

    The query shall return two things:
    *Text representation of the selected item (just for viewing)
    *Id representation of the selected item (for editing)

    In the aspx file:
    * assign the datasource to a function that returns a list of items
    * assign the selected index to a function that will return the selected
    index. You will have to search through the list of items from the first
    function to figure out the index




    "Carl" <> wrote in message
    news:uZ43gz%...
    > Hello All..
    >
    > I'm trying to find the best way to edit two columns in a datagrid. The

    data
    > source for each of the two editable items are presented in the form a drop
    > down lists.
    >
    > Upon clicking edit for a row, I'd like to present a ddl in each of the two
    > editable columns. The first column determines the contents of the second
    > column.
    >
    > Upon clicking save, I'd like the two selected items to be saved. I've

    done
    > inline editing before with text boxes, but not with ddl's.
    >
    > Is this possible.. and if so.. can someone point me in the right

    direction?
    >
    > Thanks very much.
    >
    > Carl
    >
    >
    Igor Okulist, Oct 21, 2003
    #2
    1. Advertising

  3. Carl

    okigan Guest

    Damn it, accidentally posted with my email address,
    got junk in minutes


    "Igor Okulist" <> wrote in message
    news:...
    > This is a pain to do. i looked at some samples, but somehow everybody
    > fails to solve the selection of needed item in the ddl (i.e. when you edit
    > the grid it suppose to show up correct selection)
    >
    > Here is what i did, first of all it is not perfect (far from it) but works
    > well
    >
    > The query shall return two things:
    > *Text representation of the selected item (just for viewing)
    > *Id representation of the selected item (for editing)
    >
    > In the aspx file:
    > * assign the datasource to a function that returns a list of items
    > * assign the selected index to a function that will return the selected
    > index. You will have to search through the list of items from the first
    > function to figure out the index
    >
    >
    >
    >
    > "Carl" <> wrote in message
    > news:uZ43gz%...
    > > Hello All..
    > >
    > > I'm trying to find the best way to edit two columns in a datagrid. The

    > data
    > > source for each of the two editable items are presented in the form a

    drop
    > > down lists.
    > >
    > > Upon clicking edit for a row, I'd like to present a ddl in each of the

    two
    > > editable columns. The first column determines the contents of the

    second
    > > column.
    > >
    > > Upon clicking save, I'd like the two selected items to be saved. I've

    > done
    > > inline editing before with text boxes, but not with ddl's.
    > >
    > > Is this possible.. and if so.. can someone point me in the right

    > direction?
    > >
    > > Thanks very much.
    > >
    > > Carl
    > >
    > >

    >
    >
    okigan, Oct 21, 2003
    #3
    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. huobazi

    Can NOt AutoPostBack for two DDL

    huobazi, Jul 2, 2003, in forum: ASP .Net
    Replies:
    1
    Views:
    495
    huobazi
    Jul 2, 2003
  2. Shane O. Pinnell

    Databound DDL in Datagrid using code-behind

    Shane O. Pinnell, Jul 10, 2003, in forum: ASP .Net
    Replies:
    0
    Views:
    375
    Shane O. Pinnell
    Jul 10, 2003
  3. Rob Wire
    Replies:
    5
    Views:
    479
    Yan-Hong Huang[MSFT]
    Aug 14, 2003
  4. San Diego Guy
    Replies:
    0
    Views:
    533
    San Diego Guy
    Aug 7, 2003
  5. Marina
    Replies:
    0
    Views:
    904
    Marina
    Aug 12, 2003
Loading...

Share This Page