Ask a Question related to ASP.NET General, Design and Development.
-
lucy #1
dropdown list can't selected.
I have a EditItemTemplate in a datagrid that contain a
dropdown that bound to a dataset. In that grid I have a
ItemCreated to handle the dropdow created. But the
selected item is not work. I tried 3 ways. see code.
Thanks.
Private Sub dgFundList_ItemCreated(ByVal sender As
Object, ByVal e As
System.Web.UI.WebControls.DataGridItemEventArgs) Handles
dgFundList.ItemCreated
Dim elemType As ListItemType
elemType = e.Item.ItemType
If elemType = ListItemType.EditItem Then
Dim ddlUserName As DropDownList = CType
(e.Item.FindControl("ddlUserName"), DropDownList)
ddlUserName.DataSource = dtUser
ddlUserName.DataTextField = "FullName"
ddlUserName.DataValueField = "UserID"
ddlUserName.DataBind()
'ddlUserName.SelectedItem.Selected = False
'ddlUserName.Items.FindByValue
("11111").Selected = true
'ddlUserName.Items.FindByText
("mytext").Selected = True
ddlUserName.SelectedIndex =
ddlUserName.Items.IndexOf(ddlUserName.Items.FindBy Value
("11111"))
End If
lucy Guest
-
Dropdown list
I would like to display 15 items (lines) in the dropdown list, but by default the list displays only 11 lines. How can I have all the 15 items... -
Dropdown Property List??
I'm writing an aspx server control and I need to have a property that displays a dropdown list of things I have in an arraylist. I'm trying to do... -
Tool Tip for DropDown list
Hi, I have a dropwnlist of fixed width. The item names in the dropdown list are quite big. The Tooltip property for a dropdownlist control... -
Why dropdown list created in ItemCreated can't selected
I have datagrid, in ItemCreated event, I created a dropdown list link to a datatable, now I can't selected a item I want. I try lots of way, ... -
Binded DropDown list
Hi I'm using a datagrid with a dropdown list in it. The dropdown list is filled with values from SQL database, it's autopostback property is set to...



Reply With Quote

