Wigging
asked on
find dropdownlist inside gridview and fill list
is this correct? i am getting this error
Error=Object reference not set to an instance of an object., Timestamp=2/10/2011 3:33:46 PM
Dim itemWhse As New System.Web.UI.WebControls.
itemWhse = CType(e.Item.Cells(9).Find
itemWhse.Items.Add(New ListItem("GA", "GA"))
itemWhse.Items.Add(New ListItem("MO", "MO"))
itemWhse.Items.Add(New ListItem("NY", "NY"))
itemWhse.Items.Add(New ListItem("OR", "OR"))
itemWhse.Items.Add(New ListItem("SALE", "SALE"))
itemWhse.Items.Add(New ListItem("123", "123"))
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
also if the item is supposed to show on edit
in which even should i add this code?
item created or datagrid1EditCommand or datagrid1ItemDataBound
in which even should i add this code?
item created or datagrid1EditCommand or datagrid1ItemDataBound
DataGrid.EditCommand Event
Occurs when the Edit button is clicked for an item in the DataGrid control.
http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.datagrid.editcommand.aspx
Occurs when the Edit button is clicked for an item in the DataGrid control.
http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.datagrid.editcommand.aspx
itemWhse = DirectCast(e.Item.Cells(9)
and make sure the control you are looking for inside that cell, remember index start with 0 (try 8 or 10)