0

Jquery easyui I want to change customer_name when changing combo box limitid field,

here is my datagrid fields

first field with combo box : 'limitid'

th  data-options="field:'limitid', 
width:250,sortable:'true',
formatter:limitidFormatter,

 editor:{                        
type:'combobox',
 options:{

valueField:'limitid',

textField:'name',

data:limitidlist,

required:true

}

}">Limit ID</th>

second field with : customer name

th   data-options="field:'customer_name',

sortable:'true',

width:250">

Customer Name'/th>'

I want to know how to trigger onchange function and fill customer name field

BizApps
  • 6,048
  • 9
  • 40
  • 62
Lanka
  • 27
  • 3
  • 11
  • u can use onselect function of combobox to get the customer name.... the qesution is bit confusing as it is not formatted properly... can u do it... so that i can help u out – bipen Nov 26 '12 at 06:34

1 Answers1

0

use onselect function of combobox ...

Try this..

editor:{
      type:'combobox',
      options:{
                valueField:'limitid',
                textField:'name',
                data:limitidlist,
                required:true
        },
      onSelect:function(record){
                   console.log(record); //this is called whn user select the combobox
                  //do your stuff here///
            }
   }
bipen
  • 36,319
  • 9
  • 49
  • 62
  • let me know if u having problem – bipen Nov 26 '12 at 06:57
  • Thanks for your help. really appreciate it.(you saved my hours) – Lanka Nov 26 '12 at 07:00
  • @bipen : Hi! I am having somewhat similar problem. I need to edit the value in text field which is the third editor when i select the item in combobox. var codeEditor = editors[2]; $(costEditor.target).text('setValue', '5.00'); But it's not working. Is there anything i might be doing wrong? – Bijay Thapa Feb 15 '13 at 07:03
  • can u post this as a question... and give me some code .. since i am not getting you and i think its better and will be easy to me to solve this if i get your codes too... let me know... – bipen Feb 15 '13 at 07:07
  • @bipen Please see the answer section. – Bijay Thapa Feb 15 '13 at 08:47