Retarian
Mar 09, 2021, 10:07 AM
Hello friends,
I have another problem again. I'm trying to make a grid which has a row with dropdown (ComboBox), but i's not working. We didn't find a good solution to make the <ext-Column> (from the grid) as <ext-ComboBox> (which is working in a normal field, but seems not in the grid, more exactly in <Columns> section)
Here is Code for the Grid:
<ext-gridPanel title="ComboBox Field Grid" id="Grid" header="false" frame="true" scrollable="true" minHeight="350">
<store>
<ext-store id="Store" data="Model.MyData" autoLoad="true">
<fields>
<ext-integerDataField name="ID" />
<ext-stringDataField name="Field1" />
<ext-stringDataField name="Field2" />
<ext-numberDataField name="Field3" />
<ext-numberDataField name="Field4" />
<ext-dateDataField name="Field5" />
<ext-stringDataField name="Field6" />
<ext-stringDataField name="Field7" />
</fields>
</ext-store>
</store>
<plugins>
<ext-cellEditingPlugin clicksToEdit="1" editing="true" id="edit">
<listeners>
<edit fn="edit" />
</listeners>
</ext-cellEditingPlugin>
</plugins>
<columns>
<ext-column text="ID" dataIndex="ID" width="65" disabled="true" />
<ext-column text="Description" dataIndex="Field1" flex="1" editor="textfield" />
<ext-column text="Long Description" dataIndex="Field2" width="705" editor="textarea" />
<ext-column text="Min" dataIndex="Field3" flex="1" editor="numberfield" />
<ext-column text="Max" dataIndex="Field4" flex="1" editor="numberfield" />
<ext-column text="Date" formatter="date('d.M.y')" width="130" editor="datefield" dataIndex="Field5" />
<ext-column text="DropDown" dataIndex="Field6" flex="1" editor="combobox" />
<ext-column text="Result" dataIndex="Field7" width="170" editor="textfield" />
</columns>
</ext-gridPanel>
I need that "Field6" to be a dropdown list, the thing is that it's showing the arrow for the dropdown, but is not working. And i was wondering how can make this working well or eventually to add something like this to my Grid?:
<ext-comboBox displayField="name"
valueField="id"
typeAhead="true"
queryMode="local"
value="@Model.MyData.Field6"
emptyText="Select an item...">
<store>
<ext-store data="@Model.MyData.Field6">
<model>
<ext-model>
<fields>
<ext-dataField name="id" />
<ext-dataField name="name" />
</fields>
</ext-model>
</model>
</ext-store>
</store>
</ext-comboBox>
But if i will put this line of code in <Columns> then i will have a column dropdown, and that is working, but i need a cell dropdown, not from the title of the column.
Thanks in advance!
I have another problem again. I'm trying to make a grid which has a row with dropdown (ComboBox), but i's not working. We didn't find a good solution to make the <ext-Column> (from the grid) as <ext-ComboBox> (which is working in a normal field, but seems not in the grid, more exactly in <Columns> section)
Here is Code for the Grid:
<ext-gridPanel title="ComboBox Field Grid" id="Grid" header="false" frame="true" scrollable="true" minHeight="350">
<store>
<ext-store id="Store" data="Model.MyData" autoLoad="true">
<fields>
<ext-integerDataField name="ID" />
<ext-stringDataField name="Field1" />
<ext-stringDataField name="Field2" />
<ext-numberDataField name="Field3" />
<ext-numberDataField name="Field4" />
<ext-dateDataField name="Field5" />
<ext-stringDataField name="Field6" />
<ext-stringDataField name="Field7" />
</fields>
</ext-store>
</store>
<plugins>
<ext-cellEditingPlugin clicksToEdit="1" editing="true" id="edit">
<listeners>
<edit fn="edit" />
</listeners>
</ext-cellEditingPlugin>
</plugins>
<columns>
<ext-column text="ID" dataIndex="ID" width="65" disabled="true" />
<ext-column text="Description" dataIndex="Field1" flex="1" editor="textfield" />
<ext-column text="Long Description" dataIndex="Field2" width="705" editor="textarea" />
<ext-column text="Min" dataIndex="Field3" flex="1" editor="numberfield" />
<ext-column text="Max" dataIndex="Field4" flex="1" editor="numberfield" />
<ext-column text="Date" formatter="date('d.M.y')" width="130" editor="datefield" dataIndex="Field5" />
<ext-column text="DropDown" dataIndex="Field6" flex="1" editor="combobox" />
<ext-column text="Result" dataIndex="Field7" width="170" editor="textfield" />
</columns>
</ext-gridPanel>
I need that "Field6" to be a dropdown list, the thing is that it's showing the arrow for the dropdown, but is not working. And i was wondering how can make this working well or eventually to add something like this to my Grid?:
<ext-comboBox displayField="name"
valueField="id"
typeAhead="true"
queryMode="local"
value="@Model.MyData.Field6"
emptyText="Select an item...">
<store>
<ext-store data="@Model.MyData.Field6">
<model>
<ext-model>
<fields>
<ext-dataField name="id" />
<ext-dataField name="name" />
</fields>
</ext-model>
</model>
</ext-store>
</store>
</ext-comboBox>
But if i will put this line of code in <Columns> then i will have a column dropdown, and that is working, but i need a cell dropdown, not from the title of the column.
Thanks in advance!