May 17, 2016, 9:58 PM
[CLOSED] Combobox editor in TreePanel
Hi,
I need an editable column in a TreePanel.
The following code works property:
It seems that are not recognized properly the listitem couple ID, Value
Exactly the same code works perfectly in Grid Panels.
Has anyone had the same problem?
Thanks
I need an editable column in a TreePanel.
The following code works property:
<ext:Column ID="Column16" runat="server" Width="140" Text="Type" DataIndex="TYPE" Align="Left" MenuDisabled="true" Reorderable="false" Resizable="false" Sortable="false">
<Renderer Handler="return StatusRenderer(value, #{StoreAssessmentTypes});" />
<Editor>
<ext:ComboBox ID="cmbAssessmentTYPE" runat="server" ValueField="ID" DisplayField="Value" Width="140" MaxWidth="140" Editable="false" QueryMode="Local">
<Items>
<ext:ListItem Value="SA" Text="SA - Self assessment" />
<ext:ListItem Value="V" Text="V - Validated" />
<ext:ListItem Value="PC" Text="PC - Precess check" />
</Items>
</ext:ComboBox>
</Editor>
<EditorOptions CompleteOnEnter="true" CancelOnEsc="true" RevertInvalid="true" />
</ext:Column>
while in codebehind
protected void Page_Load(object sender, EventArgs e)
{
if (!X.IsAjaxRequest)
{
cmbAssessmentTYPE.Items.Add(new Ext.Net.ListItem("SA - Self assessment", "SA"));
cmbAssessmentTYPE.Items.Add(new Ext.Net.ListItem("V - Validated", "V"));
cmbAssessmentTYPE.Items.Add(new Ext.Net.ListItem("PC - Precess check", "PC"));
}
}
<ext:Column ID="Column16" runat="server" Width="140" Text="Type" DataIndex="TYPE" Align="Left" MenuDisabled="true" Reorderable="false" Resizable="false" Sortable="false">
<Renderer Handler="return StatusRenderer(value, #{StoreAssessmentTypes});" />
<Editor>
<ext:ComboBox ID="cmbAssessmentTYPE" runat="server" ValueField="ID" DisplayField="Value" StoreID="StoreAssessmentTypes" Width="140" MaxWidth="140" Editable="false" QueryMode="Local">
</ext:ComboBox>
</Editor>
<EditorOptions CompleteOnEnter="true" CancelOnEsc="true" RevertInvalid="true" />
</ext:Column>
<Bin>
<ext:Model ID="ID_ModelGenericComboBox" Name="ModelGenericComboBox" runat="server" IDProperty="ID">
<Fields>
<ext:ModelField Name="ID" />
<ext:ModelField Name="Value" />
</Fields>
</ext:Model>
<ext:Store ID="StoreAssessmentTypes" runat="server" AutoLoad="true" ModelName="ModelGenericComboBox" />
<ext:Store ID="StoreSubCategoryScores" runat="server" AutoLoad="true" ModelName="ModelGenericComboBox" />
<ext:Store ID="StoreSubCategoryStatus" runat="server" AutoLoad="true" ModelName="ModelGenericComboBox" />
</Bin>
i get a generic javascript error.It seems that are not recognized properly the listitem couple ID, Value
Exactly the same code works perfectly in Grid Panels.
Has anyone had the same problem?
Thanks
Last edited by fabricio.murta; May 29, 2016 at 3:49 PM.