autocomplete combobox extjs with remote ajax store
By : andrea pomente
Date : March 29 2020, 07:55 AM
wish helps you I want to add a combobox in my app with a remote store. I have a store that call a php script that returns data in json format and I linked it with my combobox. The store is autoLoaded but my combobox is still empty. Here's my store , Need to add displayField and valueField in combo config: code :
...
displayField: 'telaio',
valueField: 'telaio',
...
...
model: 'modelloAC',
...
|
ExtJS combobox set initial value dynamically from remote store on page load via PHP
By : C. Drum
Date : March 29 2020, 07:55 AM
this will help My current issue relates to showing an initial value in an ExtJS combobox relating to an employee's department in an employee detail page. , JsonStore: code :
var articleMain = new Ext.data.JsonStore({
model: 'ArticleMainGroup',
autoLoad: true,
proxy: {
type: 'ajax',
url: '<?php echo base_url() ?>dashboard/create',
extraParams: {
type: 'article_group_main'
},
reader: {
type: 'json',
root: 'articleMainGroup',
idProperty: 'ART_GROUP_ID'
}
}
});
Ext.define('ArticleMainGroup', {
extend: 'Ext.data.Model',
fields: [
{name: 'ART_GROUP_ID', type: 'int'},
{name: 'WHG', type: 'int'},
{name: 'WHG_BEZ', type: 'string'}
]
});
public function create()
{
$type = $this->input->get('type', TRUE);
// this parameter comes from ExtJS Extraparam
switch ($type)
{
case 'dnr_type':
$data = $this->dnr->get_dnr_type();
exit(json_encode($data));
case 'dnr_definition':
$para = $this->input->get('dnrtype', TRUE);
$data = $this->dnr->get_dnr_definition($para);
exit(json_encode($data));
case 'article_group_main':
$data = $this->dnr->get_article_group_main();
exit(json_encode($data));
public function get_article_group_main()
{
$sql = $this->db->query('SELECT ART_GROUP_ID, WHG, CONCAT_WS(" - ", WHG, WHG_BEZ) AS WHG_BEZ FROM MD_ARTICLE_GROUP GROUP BY WHG_BEZ ORDER BY WHG');
return array('articleMainGroup' => $sql->result_array());
}
{
fieldLabel:'Department',
xtype:'combo',
name:'Department',
forceSelection: true,
typeAhead: true,
allowBlank: false,
emptyText: 'Choose a Department',
store: deptStore,
displayField: 'Name',
valueField: 'Id',
id: 'cmb-department'
}
// Add a listener to the combobox before store load
var combo = Ext.getCmp('cmb-department');
var cmbStore = combo.store;
cmbStore.on('load', function() {
// setValue(777) // here, 777 is unique value that available in the store
combo.setValue(<?php echo $Employee->DepartmentId ?>)
})
|
ExtJs - Renderer for remote store combobox in grid editor
By : Connect-A-Tech
Date : March 29 2020, 07:55 AM
|
ExtJS 6 Filter Combobox Dropdownmenu with a remote store
By : user3614534
Date : March 29 2020, 07:55 AM
|
Extjs Combobox Autocomplete
By : exi
Date : March 29 2020, 07:55 AM
around this issue I am using Extjs 4 ComboBox with remote mode. but when i typed any character data is not filtered. and even focus is changed only for first 12 value. , As per my knowledge i think this will be helpful for you:
|