edititemtemplate datagrid problem

M

marty.overdear

I have a datagrid being populated by a datasource. I decided to change
one of the of the display fields in the datagrid to a dropdownlist. I
am trying to do it using edititemtemplate. The data for this row no
longer gets populated like it did for the regular datagrid.
What do I have to do extra to get it to populate??
 
S

Scott Mitchell [MVP]

I have a datagrid being populated by a datasource. I decided to change
one of the of the display fields in the datagrid to a dropdownlist. I
am trying to do it using edititemtemplate. The data for this row no
longer gets populated like it did for the regular datagrid.
What do I have to do extra to get it to populate??

You have to write code to populate the DDL with the list of applicable
choices AND to assign the DDL's SelectedIndex to the correct value for
the record being edited. It's not a trivial task, unfortunately.
However, this article may help:
http://aspnet.4guysfromrolla.com/articles/080702-1.aspx

Another, easier, option is to use MetaBuilder.com's *free*
BoundLookupColumn control:
http://metabuilders.com/Tools/BoundLookupColumn.aspx

hth
 

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

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top