View Full Version : [CLOSED] Rendering Combobox dynamically in gridpanel

Dec 08, 2014, 4:42 PM

I have a requirement that I need render a combobox in a gridpanel dynamically depends on other column value.

Grid panel is

<ext:GridPanel ID="GridPanel2" runat="server" Title="" Frame="false" Scroll="Vertical"
AutoScroll="true" Header="false">
<ext:Store ID="Store2" runat="server" GroupField="XX">
<ext:Model ID="Model4" runat="server">
<ext:ModelField Name="Frequency" Type="Int" />
<ext:ModelField Name="DefaultFrequency" Type="String" />
<ColumnModel ID="ColumnModel2" runat="server">
<ext:Column ID="Column7" runat="server" Text="DefaultFrequency" Hidden="true" DataIndex="DefaultFrequency" />
<ext:ComponentColumn ID="ComponentColumn1" runat="server" Editor="true" DataIndex="Frequency"
<ext:ComboBox ID="cboFrequency" StoreID="storeFrequency" runat="server" EmptyText="Select" DisplayField="Type"

combobox cboFrequency Store contain following data
Id Type
1 Daily
2 Weekly
3 Monthly
4 Quarterly
5 Yearly

Format of store is

<ext:Store ID="storeFrequency" runat="server"> <Model>
<ext:Model ID="Model2" runat="server">
<ext:ModelField Name="Id" Type="Int">
<ext:ModelField Name="Type" Type="String">

If DefaultFrequency is "3,2,1" then combobox should bind respective items only to that combobox for that row

Please suggest me some solution on this requirement.

Thank you

Dec 10, 2014, 9:26 AM
Hi @iansriley,

You can configure a ComponentColumn's Component in a ComponentColumn's BeforeBind event handler.

There is an example of using a BeforeBind event.