Hi,
I am trying to get the value for the currently selected item when the SelectedIndexChanged event is fired. Currently, The SelectedValue is "" and the SelectedIndex is -1. The text is not always unique (due to backwards compatibility) so this cannot be used reliably. There is also no useable information in the event object.
What gives? How am i supposed to use auto complete and get the selected value? Also, the whole point of this is for the user to not have to click a button to submit it.
As a side note i am quite surprised there is no SelectedValueChanged event (but this is an aside).
I am trying to get the value for the currently selected item when the SelectedIndexChanged event is fired. Currently, The SelectedValue is "" and the SelectedIndex is -1. The text is not always unique (due to backwards compatibility) so this cannot be used reliably. There is also no useable information in the event object.
What gives? How am i supposed to use auto complete and get the selected value? Also, the whole point of this is for the user to not have to click a button to submit it.
As a side note i am quite surprised there is no SelectedValueChanged event (but this is an aside).
<
telerik:RadComboBox
ID
=
"comboBoxGroupSelection"
runat
=
"server"
EmptyMessage
=
"Search for a group"
MarkFirstMatch
=
"True"
AllowCustomText
=
"False"
MaxHeight
=
"300"
OnSelectedIndexChanged="comboBoxGroupSelection_SelectedIndexChanged"
AutoPostBack
=
"True"
> </
telerik:RadComboBox
>
Private
Sub
bindGroups()
Dim
Group
As
New
Groups
Dim
resultSet
As
DataSet = Group.GetItems(xmlFile.DBConnect)
Dim
resultView
As
DataView = resultSet.Tables(0).AsDataView()
resultView.Sort =
"createdDt desc"
comboBoxGroupSelection.DataValueField =
"id"
comboBoxGroupSelection.DataTextField =
"name"
comboBoxGroupSelection.DataSource = Group.GetItems(xmlFile.DBConnect)
comboBoxGroupSelection.DataBind()
End
Sub
Protected
Sub
comboBoxGroupSelection_SelectedIndexChanged(
ByVal
Sender
As
Object
,
ByVal
e
As
Telerik.Web.UI.RadComboBoxSelectedIndexChangedEventArgs)
AddGroup(**SELECTEDVALUEHERE**)
End
Sub