javascript - ExtJS TriggerField set value -
I created the SelectOne Component that expanded Triggerfield, Trigger set to trigger, click OK to open a new window with the grid My problem is that how to return
val = {id: "1234"), or
Text: "Selected value"}
">
You can create your custom trigger Wants to override the rawToValue
and getSubmitValue
methods And add a custom value to keep the information selected from your grid.
You will define your trigger like this:
Ext.define ('Ext.ux .CustomTrigger ', {extend:' Ext.form.field.Trigger ', nickname:' widget.customtrigger ', config: {option: null}, // override rawToValue method rawToValue: function () {return it. );}, // override getSubmitValue method getSubmitValue: function () {click the override trigger on this return.getOption ()} / click trigger: function () {....}}
On your grid, right button and item wclic handle R must use the triggerfield.setOption ()
method to capture the selected value and use triggerfield.setValue ('selected value')
so that your trigger field is " Selected value ".
Now, when you call triggerfield.getValue ()
, you will get the same values as triggerfield.getOption ()
this "selected value "Will display
I made this bela: so that you can understand it a bit better.
Comments
Post a Comment