Hi I am testing autocomplete inside a grid, it appear ok inside a column but I don't know how select a row that appear in autocomplete and set this value to the column in the grid, any help please.
I am doing that:
acAddressType = new Ext.form.ComboBox({
store: ds,
displayField:'Description',
//valueField:'Description',
typeAhead: false,
loadingText: 'Searching...',
width: 570,
pageSize:5,
hideTrigger:true,
tpl: resultTpl,
allowBlank:false,
forceSelection: true,
selectOnFocus: true,
onSelect: function(record){ // override default onSelect to do redirect
currentAddressSelected.data["ContactAddressType_ExternalId"] = record.data.ExternalId;
currentAddressSelected.data["Description"] = record.data.Description;
}
});
I am doing that:
acAddressType = new Ext.form.ComboBox({
store: ds,
displayField:'Description',
//valueField:'Description',
typeAhead: false,
loadingText: 'Searching...',
width: 570,
pageSize:5,
hideTrigger:true,
tpl: resultTpl,
allowBlank:false,
forceSelection: true,
selectOnFocus: true,
onSelect: function(record){ // override default onSelect to do redirect
currentAddressSelected.data["ContactAddressType_ExternalId"] = record.data.ExternalId;
currentAddressSelected.data["Description"] = record.data.Description;
}
});

#2
![]() |
![]() Sorry I send the message for error before complete it.
I did it Hi I am testing autocomplete inside a grid, it appear ok inside a column but I don't know how select a row that appear in autocomplete and set this value to the column in the grid, any help please. I am doing that: acAddressType = new Ext.form.ComboBox({ store: ds, displayField:'Description', //valueField:'Description', typeAhead: false, loadingText: 'Searching...', width: 570, pageSize:5, hideTrigger:true, tpl: resultTpl, allowBlank:false, forceSelection: true, selectOnFocus: true, onSelect: function(record){ // override default onSelect to do redirect currentAddressSelected.data["ContactAddressType_ExternalId"] = record.data.ExternalId; currentAddressSelected.data["Description"] = record.data.Description; } }); the column in grid ....... cm = new Ext.grid.ColumnModel([ {header: "Address1", dataIndex: 'Address1', width: 120, sortable: true, locked: true, editor: new Ed(new fm.TextField({allowBlank: false})) }, {header: "AddressType", dataIndex: 'ContactAddressType.Description', width: 220, sortable: true, editor: new Ed(acAddressType) }, kind regards Frank ![]() |
#3
![]() |
![]() I don't know if is right it but now I can select an item from autocomplete and it appear in the column in the grid, I did it
onSelect: function(record){ // override default onSelect to do redirect //debugger; currentAddressSelected.data["ContactAddressType_ExternalId"] = record.data.ExternalId; // currentAddressSelected.data["Description"] = record.data.Description; acAddressType.setValue(record.data[acAddressType.displayField]); acAddressType.collapse(); } the other trouble now is when I add a new record in the column where is the autocomplete appear it <DIV class="x-grid-col-1 x-grid-cell-inner"><DIV class=x-grid-cell-text unselectable="on"></DIV></DIV> is something wrong? kind regards Frank ![]() |
#4
![]() |
![]() Do you have a page that i can goto to see it. It would really help to see all your code to figure out what might be causing this problem.
Jon
__________________
Jon Web Application Developer - Indianapolis Motor Speedway bombdiggity.net ![]() |