Results 1 to 3 of 3

Thread: Populating editor grid from combo drop down?

  1. #1

    Default Populating editor grid from combo drop down?

    Hi everyone,

    Plz help me out i hv an editor grid with one field as combo drop down when a value is selected from the drop down i want the related fields to populate automatically.
    for eg the combo field is supplier name once the supplier name is selected the other related fields such as contact name,phone number would be populated .

    Is there a way or ecxample which shows how to achieve this.

  2. #2
    Sencha User Condor's Avatar
    Join Date
    Mar 2007
    The Netherlands


    You could use the complete event of the GridEditor, e.g.
    editor: new Ext.grid.GridEditor(new Ext.form.ComboBox({
    	// your combobox config goes here
    }), {
    	listeners: {
    		complete: function(editor, newValue, oldValue){
    			var field = editor.field.valueField || editor.field.displayField;
    			var record = editor.field.findRecord(field, newValue);
    			editor.record.set('name', record.get('name'));
    			editor.record.set('phone', record.get('phone'));

  3. #3


    Thanks a lot that worked out

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts