Dropdownlist in datagrid

Discussion in 'ASP .Net' started by Darren, Jun 29, 2004.

  1. Darren

    Darren Guest

    Guys,

    I have a template column with a picture and when I
    click on it I would like to enter edit mode and instead
    of the picture being displayed I need a drop down list
    populated with data.

    once data is selected from the list I need to exit edit
    mode and replace the picture with a hyperlink item.

    Is this possible..?

    I have added an edit item template to the grid with a
    dropdownlist, but how do I enter edit mode as I cant seem
    to be getting an event to change the edititemindex

    I would appreciate any help

    thanks

    Darren
    Darren, Jun 29, 2004
    #1
    1. Advertising

  2. Darren

    Guest

    On Tue, 29 Jun 2004 08:54:14 -0700, "Darren"
    <> wrote:

    >Guys,
    >
    > I have a template column with a picture and when I
    >click on it I would like to enter edit mode and instead
    >of the picture being displayed I need a drop down list
    >populated with data.
    >
    > once data is selected from the list I need to exit edit
    >mode and replace the picture with a hyperlink item.
    >
    > Is this possible..?
    >


    yes, although, it doesn't make sense to go from
    picture->dropdown->linkbutton.

    This is gonna be a headache and sounds like a nonintuitive interface.

    >I have added an edit item template to the grid with a
    >dropdownlist, but how do I enter edit mode as I cant seem
    >to be getting an event to change the edititemindex
    >
    >I would appreciate any help


    the command name should be 'edit' and you should make an eventhandler
    for the editcommand event.

    -adam
    , Jun 29, 2004
    #2
    1. Advertising

  3. Darren

    Darren Guest

    >>Guys,
    >>
    >> I have a template column with a picture and when I
    >>click on it I would like to enter edit mode and instead
    >>of the picture being displayed I need a drop down list
    >>populated with data.
    >>
    >> once data is selected from the list I need to exit

    edit
    >>mode and replace the picture with a hyperlink item.
    >>
    >> Is this possible..?
    >>

    >
    >yes, although, it doesn't make sense to go from
    >picture->dropdown->linkbutton.
    >
    >This is gonna be a headache and sounds like a

    nonintuitive interface.
    >
    >>I have added an edit item template to the grid with a
    >>dropdownlist, but how do I enter edit mode as I cant

    seem
    >>to be getting an event to change the edititemindex
    >>
    >>I would appreciate any help

    >
    >the command name should be 'edit' and you should make an

    eventhandler
    >for the editcommand event.
    >
    >-adam
    >.


    Thanks for the quick answer adam

    can you please clarify on the following questions

    Can I use the HTML image tag instead of the link button
    or is there any other way i can display the image
    Imagebutton does not display the image

    When it finally does enter edit mode does it make the
    entire row editable..? I only want the current cell to be
    made editable

    and after the process is done can I change the cell to
    have a link instead (i.e add a link control) in the event
    handler

    also I would appreciate if you could point me to some
    examples

    Thanks a lot



    >
    Darren, Jun 29, 2004
    #3
  4. Darren

    Guest

    On Tue, 29 Jun 2004 09:21:21 -0700, "Darren"
    <> wrote:


    >
    >Can I use the HTML image tag instead of the link button
    >or is there any other way i can display the image
    >Imagebutton does not display the image
    >


    imagebutton should work. I'd trouble shoot the problem instead of
    working around it.

    >When it finally does enter edit mode does it make the
    >entire row editable..? I only want the current cell to be
    >made editable
    >


    only the cells that are not readonly. If you only want the current
    cell editable then you probably don't want to use a datagrid. a more
    custom solution would be advisable.

    >and after the process is done can I change the cell to
    >have a link instead (i.e add a link control) in the event
    >handler
    >

    yes you can but this will need to be recreated during itemdatabound.
    so you will need be able to detect that the value has been set and add
    the link button each time.

    >also I would appreciate if you could point me to some
    >examples
    >


    I don't have examples cause you haven't clearly explained what you are
    trying to do. I'd suggest instead of asking these questions about
    specific functionality you should give us an overall description of
    what you expect and how it should work and people may be able to
    respond about how you might go about accomplishing what you want. I
    don't think a datagrid is necessarily what you want if u're wanting to
    click on each cell individually to edit them.

    -Adam
    , Jun 29, 2004
    #4
    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. mr2_93
    Replies:
    1
    Views:
    3,597
    mr2_93
    Oct 2, 2005
  2. tshad
    Replies:
    8
    Views:
    2,229
    tshad
    Oct 19, 2005
  3. =?Utf-8?B?SnVhbmpv?=

    GridView: Filtr DropDownList from another DropDownList

    =?Utf-8?B?SnVhbmpv?=, Dec 23, 2005, in forum: ASP .Net
    Replies:
    0
    Views:
    1,863
    =?Utf-8?B?SnVhbmpv?=
    Dec 23, 2005
  4. =?Utf-8?B?SnVhbmpv?=

    GridView: Filter DropDownList for another DropDownList

    =?Utf-8?B?SnVhbmpv?=, Dec 29, 2005, in forum: ASP .Net
    Replies:
    0
    Views:
    1,296
    =?Utf-8?B?SnVhbmpv?=
    Dec 29, 2005
  5. keithb
    Replies:
    1
    Views:
    11,972
    shauns1
    Nov 1, 2006
Loading...

Share This Page