Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    the linkage of two select items

    Code:
    var _year = "0";
    var dFormOption = isc.DynamicForm.create({
    	fields:[
    		{name:"FirstName", title:"year", type:"select", optionDataSource:"optionDS", optionOperationId:"FirstName", 
    			changed:function(){
    				_year = this.getSelectedRecord().PK;
    
    			}
    		},
    		{name:"SecondName", title:"course", type:"select",
    			optionDataSource:"optionDS", optionOperationId:"SecondName", optionCriteria: {FirstID: _year}
    		}
    	]
    });
    
    var layOutOption = isc.VLayout.create({
    	width:"100%",
    	height:"100%",
    	autoDraw:true,
    	members:[dFormOption]	
    })
    The SecondName will fetchData by _year,
    when the FirstName changed, _year will change too
    I want to update the field of SecondName immediately.
    How can I do it?

    #2
    changed:functin(form, item, value){
    _year = this.getSelectedRecord().PK;
    form.getField('SecondName').pickListCriteria= {FirstID: _year};
    }

    Comment


      #3
      Great!
      Thank you very much!

      Comment

      Working...
      X