When specific condition met i am giving datasource to combobox and for the first time it binds and item are showing in the combox.. but the problem is when i am trying to bind again with different datasource it get stuck. Item are not showing in combobox.
asp code:
<
asp:Label
ID
=
"Label1"
runat
=
"server"
Text
=
""
Visible
=
"false"
><
img
src
=
"../../../Resources/images/dependent16x16(2).png"
alt
=
"dependent"
/></
asp:Label
>
<
telerik:RadToolTip
RenderMode
=
"Lightweight"
ID
=
"RadToolTip1"
runat
=
"server"
TargetControlID
=
"Label1"
Width
=
"320px"
RelativeTo
=
"Element"
Position
=
"MiddleRight"
HideEvent
=
"ManualClose"
EnableRoundedCorners
=
"true"
OffsetX
=
"2"
EnableShadow
=
"true"
ShowEvent
=
"OnMouseOver"
>
<
asp:Literal
ID
=
"Literal36"
runat
=
"server"
Text
=
"Dependents"
></
asp:Literal
>
<
telerik:RadComboBox
ID
=
"cmbDependent"
runat
=
"server"
MarkFirstMatch
=
"true"
RenderMode
=
"Lightweight"
AllowCustomText
=
"false"
Width
=
"220px"
EmptyMessage
=
"Select Dependent"
OnSelectedIndexChanged
=
"cmbDependent_SelectedIndexChanged"
AutoPostBack
=
"true"
ZIndex
=
"50001"
>
</
telerik:RadComboBox
>
</
telerik:RadToolTip
>
C# binding function
private
void
BindDependents()
{
cmbDependent.ClearSelection();
cmbDependent.DataSource = objMedicalInsuranceRepository.GetDependent(txtStaffNo.Text.Trim());
cmbDependent.DataValueField =
"VALUE"
;
cmbDependent.DataTextField =
"NAME"
;
cmbDependent.DataBind();
}
my query:
public
DataTable GetDependent(
string
pBadgeNo)
{
query =
"SELECT S_S_N VALUE,INITCAP(FIRST_NAME||' '||IFSAPP.COMPANY_PERSON_API.GET_NAME('990',PERSON_ID))||' - '||RELATIONSHIP_TYPE NAME FROM "
+
"IFSAPP.EMPLOYEE_DEPENDENT_TAB WHERE PERSON_ID ='"
+ pBadgeNo +
"'"
;
return
objDBHelper.ExecuteDataTable(query);
}
please help..