Hi, I'm trying to bind a RadComboBox with an ObjectDataSource (odsFuenteEmisionAlcance) that returns a List of Objects like these:
This is my ComboBox
I'm trying to use the DataTextField and DataValueField values from the Property FuenteEmision, but somehow is not getting it, this is what I get:
Like I show before the object FuenteEmisionAlcance does a have a FuenteEmision property, the combo is able to find it, i've tried using only DataTextField="FuenteEmision" and DataValueField="FuenteEmision" just to try and it does find it, but when it comes to find a property from the property it crashes, is this impossible? or there is another way I can acomplish this.
List<FuenteEmisionAlcance>
public
class
FuenteEmisionAlcance
{
private
FuenteEmision m_FuenteEmision;
private
Alcance m_Alcance;
public
FuenteEmision FuenteEmision
{
get
{
return
m_FuenteEmision; }
set
{ m_FuenteEmision = value; }
}
public
Alcance Alcance
{
get
{
return
m_Alcance; }
set
{ m_Alcance = value; }
}
}
This is my ComboBox
<
telerik:RadComboBox
ID
=
"rcbFuenteEmision"
runat
=
"server"
AutoPostBack
=
"True"
DataSourceID
=
"odsFuenteEmisionAlcance"
DataTextField
=
"FuenteEmision.Nombre"
DataValueField
=
"FuenteEmision.Id"
ZIndex
=
"100000" C
ausesValidation
=
"False" O
nSelectedIndexChanged
=
"rcbFuenteEmision_SelectedIndexChanged"
EmptyMessage
=
"--Seleccione--"
OnClientSelectedIndexChanged
=
"OnClientSelectedIndexChanged"
OnDataBinding
=
"rcbFuenteEmision_DataBinding">
</
telerik:RadComboBox
>
I'm trying to use the DataTextField and DataValueField values from the Property FuenteEmision, but somehow is not getting it, this is what I get:
[NotSupportedException: Object of type HUC.FuenteEmisionAlcance does not have a FuenteEmision.Nombre property.]
Like I show before the object FuenteEmisionAlcance does a have a FuenteEmision property, the combo is able to find it, i've tried using only DataTextField="FuenteEmision" and DataValueField="FuenteEmision" just to try and it does find it, but when it comes to find a property from the property it crashes, is this impossible? or there is another way I can acomplish this.