Using DropDownList control in GridView.

J

jack

Hi all im trying to use DropDownList control in GridView

The senerio is like the <ItemTemplate> Control is a Label control and
when click on edit control DropDownList should be the
<EditItemTemplate> control

I want to get the selected value from the dropdownlist control of the
selected row from the gridview.

Im pretty confused about these and tried a lot but not able to do this.


please help.

Thank you for replying me.
 
P

Patrick H

jack said:
Hi all im trying to use DropDownList control in GridView

The senerio is like the <ItemTemplate> Control is a Label control and
when click on edit control DropDownList should be the
<EditItemTemplate> control

I want to get the selected value from the dropdownlist control of the
selected row from the gridview.

Im pretty confused about these and tried a lot but not able to do this.


please help.

Thank you for replying me.

in your edititemtemplate you should have template field which is the
dropdownlist, when you declare it set the selectedValue property (it
wont show in intelli-sense) to bind to the field you you want.
 
P

Patrick H

jack said:
Hi all im trying to use DropDownList control in GridView

The senerio is like the <ItemTemplate> Control is a Label control and
when click on edit control DropDownList should be the
<EditItemTemplate> control

I want to get the selected value from the dropdownlist control of the
selected row from the gridview.

Im pretty confused about these and tried a lot but not able to do this.


please help.

Thank you for replying me.

In the EditItemTemplate have a TemplateField which has a DropDownList
control in it. In the markup for the DropDownList set the SelectedValue
property (it wont show up in intelli-sense) to whatever you your data
is.
 

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

Top