Forum Moderators: open
Go Here [developer.com] for the example.
Basically when you hit edit, you set the editItemIndex and retrieve that row of data. You do a findcontrol to get teh dropdown and then do a findbyvalue with the value from the non-edit row.
-=casey=-
Dim ddlSetIndex as DropDownList = E.Item.FindControl("ddlPicID")
Instead of:
Dim ddlSetIndex As DropDownList = CType(DBEditDataGrid.Items(DBEditDataGrid.EditItemIndex).FindControl("ddlPicID"), DropDownList)
Why was I getting an error? What is the difference between the two lines? I'm just wondering so I can learn a bit more.....thanks.......