Setting dropdownlist.selectedindex when entire datagrid is dynamic

N

NancyA

I have a dynamic datagrid that is created using records in a SQL table. The
datagrid functions perfectly in both view and edit modes. The only thing
left to do is to figure out how to set the SelectedIndex property of any
DropDownLists in the grid to the correct value when the user clicks the Edit
button so that they default to the current value from the record. I would
appreciate any help!
 
J

JV

I think you're going to need to put code into the DataGrid's ItemDataBound
event for this. You can find samples of using this event in the DataGrid
online help.
 
N

NancyA

JV - Thanks for the suggestion, but that won't do it as the fields don't seem
to be accessible since they are dynamic. Any other good suggestions out
there?
 

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