i am trying to get the text that i have typed into my radcombobox.
The combobox is defined as :
now, every time i type something into the box, the 'handleKeyPress' javascript function runs - as you can see in the above code.
this javascript function is defined as:
this is almost ok.
The point that is confusing me is that the 'combo._filterText' gives me my text that i have typed, and this would look like it works.
e.g:
the radcombobox has an item 'david'. i type in 'da' and the radcomobobx autocompletes it to 'david' but combo._filtertext gives me 'da'.
this is correct and how i would expect it to work.
now, if i typed 'daa' (which doesn't exist in the combobox), the combobox stops me from adding this extra 'a' and will autocomplete it to 'david'.
this is also correct. unfortunately, and this is the problem, 'combo._filtertext' shows 'daa'.
is it possible to get just 'da'. that is, only the text i have entered, and that i am allowed to enter?
The combobox is defined as :
cmb =
New
RadComboBox
cmb.ID =
"cmbSearch"
cmb.ShowDropDownOnTextboxClick =
False
cmb.MarkFirstMatch =
True
cmb.DataTextField =
"TextField"
cmb.DataValueField =
"ValueField"
cmb.ShowToggleImage =
False
' cmb.AutoPostBack = True
cmb.Attributes(
"onkeyup"
) =
"handleKeyPress();"
If
Not
Page.IsPostBack
Then
cmb.DataSource = _recipe.getAllStockItems(_security.UserID, _security.DivisionId)
ViewState(
"cmbDataSource"
) = cmb.DataSource
cmb.DataBind()
End
If
Master.Menubar.Add(cmb)
now, every time i type something into the box, the 'handleKeyPress' javascript function runs - as you can see in the above code.
this javascript function is defined as:
function
handleKeyPress()
{
var
combo = $find(
'<%=cmb.ClientID%>'
);
// alrt('error');
document.getElementById(
'<%=hidAutoComplete.ClientID%>'
).value = combo._filterText;
document.getElementById(
'<%=hidAutoComplete.ClientID%>'
).blur();
// alrt('error');
<%=Page.ClientScript.GetPostBackEventReference(hidAutoComplete,
"Change"
)%>
}
this is almost ok.
The point that is confusing me is that the 'combo._filterText' gives me my text that i have typed, and this would look like it works.
e.g:
the radcombobox has an item 'david'. i type in 'da' and the radcomobobx autocompletes it to 'david' but combo._filtertext gives me 'da'.
this is correct and how i would expect it to work.
now, if i typed 'daa' (which doesn't exist in the combobox), the combobox stops me from adding this extra 'a' and will autocomplete it to 'david'.
this is also correct. unfortunately, and this is the problem, 'combo._filtertext' shows 'daa'.
is it possible to get just 'da'. that is, only the text i have entered, and that i am allowed to enter?