Aug 20, 2013, 11:44 AM
[CLOSED] GridPanel - ComponentColumn - ComboBox: How to bind data??
Hi and thank you in advance for your responses.
I'm trying to show a combobox in a gridpanel using ComponentColumn. The thing is that I'm not able to bind data. Data are not shown or the gridpanel is not shown.
I'm trying it in 2 ways:
1.
Any help??
Thanks again.
I'm trying to show a combobox in a gridpanel using ComponentColumn. The thing is that I'm not able to bind data. Data are not shown or the gridpanel is not shown.
I'm trying it in 2 ways:
1.
<ext:ComponentColumn ID="ComponentColumn1"
runat="server"
DataIndex="ESTADO"
Flex="1"
Text="Estado"
Editor="true">
<Component>
<ext:ComboBox ID="comboEstadoAsignacionIndividual" runat="server" DisplayField="Descripcion" ValueField="Valor"
QueryMode="Local" TypeAhead="true">
<Store>
<ext:Store ID="storeEstadoAsignacionIndividual" runat="server" Data="<%# Estados %>" AutoDataBind="true">
<Model>
<ext:Model ID="Model4" runat="server" IDProperty="Valor">
<Fields>
<ext:ModelField Name="Descripcion" Type="String" ServerMapping="Descripcion" />
<ext:ModelField Name="Valor" Type="Int" ServerMapping="Valor" />
</Fields>
</ext:Model>
</Model>
<Reader>
<ext:ArrayReader />
</Reader>
</ext:Store>
</Store>
</ext:ComboBox>
</Component>
</ext:ComponentColumn>
Where "Estados" return correctly a list (it is used correctly by another combobox outside the gridpanel):Protected ReadOnly Property Estados() As List(Of ElementosEnumerados)
Get
Dim lista As List(Of ElementosEnumerados) = Enumerados.RecuperarEstadosAbonos()
Return lista
End Get
End Property
2. <ext:ComboBox ID="comboEstadoAsignacionIndividual" runat="server" AllowBlank="false" Editable="false">
</ext:ComboBox>
andDim lista As List(Of ElementosEnumerados) = Enumerados.RecuperarEstadosAbonos()
For Each estado In lista
comboEstadoAsignacionIndividual.Items.Add(New Ext.Net.ListItem(estado.Descripcion, estado.Valor))
Next
Any help??
Thanks again.
Last edited by Daniil; Aug 20, 2013 at 5:27 PM.
Reason: [CLOSED]