Dropdownlist in datagrid

D

Darren

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
 
A

ashelley

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
 
D

Darren

Guys,
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.


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
 
A

ashelley

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top