Hi,
Please provide us the solution for the following scenario.
we are having 2 combo boxes in our page as below
<telerik:RadComboBox Font-Names="Verdana" Skin="WebBlue" EmptyMessage="Select One" Height="200px"
AllowCustomText="true" Filter="contains" MarkFirstMatch="false" EnableScreenBoundaryDetection="false"
AutoPostBack="False" EnableLoadOnDemand="False" Width="95%" runat="server" CssClass="dropdown"
ID="cbo1" OnClientBlur="OnClientBlurAdd" OnClientKeyPressing="clientKeyPressingAdd"
OnClientDropDownOpening="ClientDropDownOpeningAdd">
</telerik:RadComboBox>
Second combo box:
<telerik:RadComboBox Font-Names="Verdana" Height="200px" Skin="WebBlue" EmptyMessage="Enter 3 or more characters to search"
AllowCustomText="true" Filter="contains" MarkFirstMatch="true" EnableScreenBoundaryDetection="false"
Width="350px" runat="server" CssClass="dropdown" ID="cboPatient" OnClientBlur="OnClientBlurPatient" HighlightTemplatedItems = "True"
OnClientKeyPressing="clientKeyPressingPatient" OnClientSelectedIndexChanged="ClientSelectedIndexChangedPatient"
OnClientDropDownOpening="ClientDropDownOpeningPatient" EnableLoadOnDemand="true">
<HeaderTemplate>
<table width = "100%">
<tr>
<td align = "left" style ="font-family: Arial, Verdana, Sans-Serif; font-size:12px; font-weight:bold; width:60%">
Clinic
</td>
<td align = "left" style ="font-family: Arial, Verdana, Sans-Serif; font-size:12px; font-weight:bold; width:40%">
Patient
</td>
</tr>
</table>
</HeaderTemplate>
<ItemTemplate>
<table width = "100%">
<td align = "left" style ="font-family: Arial, Verdana, Sans-Serif; font-size:11px;width:60%">
<%# DataBinder.Eval(Container.DataItem, "ClinicName") %>
</td>
<td align = "left" style ="font-family: Arial, Verdana, Sans-Serif; font-size:11px;width:40%">
<%# DataBinder.Eval(Container.DataItem, "PatientLastName") %>
</td>
</table>
</ItemTemplate>
</telerik:RadComboBox>
and the second will be filled based on the selected value of first one. And here we are always getting cbo1.SelectedValue is empty.
but i am able to get the value here on the "OnClientBlur" event of cbo1.
function OnClientBlurAdd(sender, eventArgs)
{
myMultipleParametersHandlerAdd(sender, eventArgs);
}
function myMultipleParametersHandlerAdd(combo, eventArgs)
{
var item=combo.get_highlightedItem();
if(item !=null)
{
combo.set_text(item.get_text());
combo.set_value(item.get_value()); ///i am able to get the value here
}
else
{
combo.clearSelection();
combo.set_emptyMessage("Select One");
}
}
what can be the issue?
Thank you,
Saranya.
Please provide us the solution for the following scenario.
we are having 2 combo boxes in our page as below
<telerik:RadComboBox Font-Names="Verdana" Skin="WebBlue" EmptyMessage="Select One" Height="200px"
AllowCustomText="true" Filter="contains" MarkFirstMatch="false" EnableScreenBoundaryDetection="false"
AutoPostBack="False" EnableLoadOnDemand="False" Width="95%" runat="server" CssClass="dropdown"
ID="cbo1" OnClientBlur="OnClientBlurAdd" OnClientKeyPressing="clientKeyPressingAdd"
OnClientDropDownOpening="ClientDropDownOpeningAdd">
</telerik:RadComboBox>
Second combo box:
<telerik:RadComboBox Font-Names="Verdana" Height="200px" Skin="WebBlue" EmptyMessage="Enter 3 or more characters to search"
AllowCustomText="true" Filter="contains" MarkFirstMatch="true" EnableScreenBoundaryDetection="false"
Width="350px" runat="server" CssClass="dropdown" ID="cboPatient" OnClientBlur="OnClientBlurPatient" HighlightTemplatedItems = "True"
OnClientKeyPressing="clientKeyPressingPatient" OnClientSelectedIndexChanged="ClientSelectedIndexChangedPatient"
OnClientDropDownOpening="ClientDropDownOpeningPatient" EnableLoadOnDemand="true">
<HeaderTemplate>
<table width = "100%">
<tr>
<td align = "left" style ="font-family: Arial, Verdana, Sans-Serif; font-size:12px; font-weight:bold; width:60%">
Clinic
</td>
<td align = "left" style ="font-family: Arial, Verdana, Sans-Serif; font-size:12px; font-weight:bold; width:40%">
Patient
</td>
</tr>
</table>
</HeaderTemplate>
<ItemTemplate>
<table width = "100%">
<td align = "left" style ="font-family: Arial, Verdana, Sans-Serif; font-size:11px;width:60%">
<%# DataBinder.Eval(Container.DataItem, "ClinicName") %>
</td>
<td align = "left" style ="font-family: Arial, Verdana, Sans-Serif; font-size:11px;width:40%">
<%# DataBinder.Eval(Container.DataItem, "PatientLastName") %>
</td>
</table>
</ItemTemplate>
</telerik:RadComboBox>
and the second will be filled based on the selected value of first one. And here we are always getting cbo1.SelectedValue is empty.
but i am able to get the value here on the "OnClientBlur" event of cbo1.
function OnClientBlurAdd(sender, eventArgs)
{
myMultipleParametersHandlerAdd(sender, eventArgs);
}
function myMultipleParametersHandlerAdd(combo, eventArgs)
{
var item=combo.get_highlightedItem();
if(item !=null)
{
combo.set_text(item.get_text());
combo.set_value(item.get_value()); ///i am able to get the value here
}
else
{
combo.clearSelection();
combo.set_emptyMessage("Select One");
}
}
what can be the issue?
Thank you,
Saranya.