DataGrid and DropDownlist

  • Thread starter Thread starter Guest
  • Start date Start date
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
 
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 ?
 
Back
Top