Hi All,
I am facing some issues:
1) I have a databound combobox which gets data from sql source from codebehind file. The combobox fills fine, but when Im trying to select an item, the items gets marked, but the box doesnt close. I have a masterpage with RadScriptManager and RadAjaxManager.
Thats how the combobox part of the aspx file looks like
<telerik:RadComboBox ID="rcbPLZ" Runat="server"
AppendDataBoundItems="True" EnableLoadOnDemand="True"
onclientselectedindexchanged="OnClientSelectedIndexChanged"
onclientselectedindexchanging="LoadOrt"
onitemsrequested="rcbPLZ_ItemsRequested" AllowCustomText="True"
ShowDropDownOnTextboxClick="False">
</telerik:RadComboBox>
the javascript function is
function OnClientSelectedIndexChanged(combo, eventArgs)
{
// alert("OnClientSelectedIndexChanged");
OrtCombo.set_text("");
var PLZstring = combo.get_text();
combo.set_text(PLZstring.substring(0,5));
OrtCombo.set_text(PLZstring.substring(6,PLZstring.length-1)); //
LoadStrasse(combo, eventArgs);
}
Also, and that the second issue, at onload I want to set certain strings for two comboboxes and it has worked, but it is not and Im not sure what I did wrong:
<script language="javascript" type="text/javascript" >
var PLZCombo;
var OrtCombo;
var StrassenCombo;
function onload()
{
PLZCombo =$find("<%= rcbPLZ.ClientID %>");
OrtCombo =$find("<%= rcbOrt.ClientID %>");
StrassenCombo =$find("<%= rcbStrasse.ClientID %>");
StrassenCombo.set_text("a");
PLZCombo.set_text("b");
}
Maybe Im putting the javascript into the wrong place, I just put it below a table...
Any hints are very much appreciated..
Best wishes
iandi
I am facing some issues:
1) I have a databound combobox which gets data from sql source from codebehind file. The combobox fills fine, but when Im trying to select an item, the items gets marked, but the box doesnt close. I have a masterpage with RadScriptManager and RadAjaxManager.
Thats how the combobox part of the aspx file looks like
<telerik:RadComboBox ID="rcbPLZ" Runat="server"
AppendDataBoundItems="True" EnableLoadOnDemand="True"
onclientselectedindexchanged="OnClientSelectedIndexChanged"
onclientselectedindexchanging="LoadOrt"
onitemsrequested="rcbPLZ_ItemsRequested" AllowCustomText="True"
ShowDropDownOnTextboxClick="False">
</telerik:RadComboBox>
the javascript function is
function OnClientSelectedIndexChanged(combo, eventArgs)
{
// alert("OnClientSelectedIndexChanged");
OrtCombo.set_text("");
var PLZstring = combo.get_text();
combo.set_text(PLZstring.substring(0,5));
OrtCombo.set_text(PLZstring.substring(6,PLZstring.length-1)); //
LoadStrasse(combo, eventArgs);
}
Also, and that the second issue, at onload I want to set certain strings for two comboboxes and it has worked, but it is not and Im not sure what I did wrong:
<script language="javascript" type="text/javascript" >
var PLZCombo;
var OrtCombo;
var StrassenCombo;
function onload()
{
PLZCombo =$find("<%= rcbPLZ.ClientID %>");
OrtCombo =$find("<%= rcbOrt.ClientID %>");
StrassenCombo =$find("<%= rcbStrasse.ClientID %>");
StrassenCombo.set_text("a");
PLZCombo.set_text("b");
}
Maybe Im putting the javascript into the wrong place, I just put it below a table...
Any hints are very much appreciated..
Best wishes
iandi