DataGrid and DropDownlist

G

Guest

Hello

I've read several times the document called "Top Questions about the DataGrid Web Server Control" and the paragraph Displaying a DropDownList in Edit Mode but I still don't understand something

When I run the code, with EditItemIndex = 0 the DropDownlist appears where I want it to appear in the right colum of the first row. I choose a value and then click a button that increment the EditItemIndex but nothing changes and I'm still on the first row

Where is my mistake

I suppose that once an item is choosen it's possible for me to remove the selected item from the DropDownlist to avoid the ssame choice

Thank you for your help and/or pointers

I'm working with VS2003 in Web Forms mode and VB

Regard

Daniel
 
M

Martin Dechev

Hi, Daniel,

Most probably you have forgotten to call DataBind() on the DataGrid after
you increment the EditItemIndex.

Hope this helps
Martin
Daniel said:
Hello,

I've read several times the document called "Top Questions about the
DataGrid Web Server Control" and the paragraph Displaying a DropDownList in
Edit Mode but I still don't understand something.
When I run the code, with EditItemIndex = 0 the DropDownlist appears where
I want it to appear in the right colum of the first row. I choose a value
and then click a button that increment the EditItemIndex but nothing
changes and I'm still on the first row.
Where is my mistake ?

I suppose that once an item is choosen it's possible for me to remove the
selected item from the DropDownlist to avoid the ssame choice ?
 

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
474,430
Messages
2,571,676
Members
48,796
Latest member
Greg L.

Latest Threads

Top