Angular 4 Reactive Form + Flexgrid + WjComboBox

Posted by: frederic.jammes on 16 February 2018, 3:09 am EST

    • Post Options:
    • Link

    Posted 16 February 2018, 3:09 am EST

    Hello,

    I’m trying to make a FlexGrid in which each line has to be validated with some custom validators.

    To do so, I used a formgroup in which there is a FormArray, in which there is a FormGroup for each row containing the FormControls for each collumn.

    This flexgrid must be able to be filtered, so I used the wj-flex-grid-filter to do so.

    The first collumn is a wjFlexGridCellTemplate in which I have a wj-combo-box.

    The itemsSource of the WjFlexGrid is made with a CollectionView from an array of object, and can contain values for that first collumn that don’t exist in itemsSource of the WjComboBox.

    When I’m doing the code to do so, I’m getting the following error and the printed datas are wrong:

    errors.ts:42 ERROR TypeError: Cannot read property ‘children’ of null

    at t.getDisplayText (wijmo.input.js:13)

    at WjComboBox.t.getDisplayText (wijmo.input.js:13)

    at WjComboBox.t.indexOf (wijmo.input.js:13)

    at WjComboBox.t._setText (wijmo.input.js:13)

    at WjComboBox.set [as text] (wijmo.input.js:13)

    at WjValueAccessor._updateDirective (wijmo.angular2.directiveBase.js:388)

    at eval (wijmo.angular2.directiveBase.js:371)

    at eval (event_emitter.ts:117)

    at ZoneDelegate.invokeTask (zone.js:398)

    at Object.onInvokeTask (ng_zone.ts:253)

    at ZoneDelegate.invokeTask (zone.js:397)

    at Zone.runTask (zone.js:165)

    at ZoneTask.invoke (zone.js:460)

    at timer (zone.js:1540)

    Can you help me please ?

    Attachement : FlexGridComboBoxReactiveForm.zip

  • Posted 18 February 2018, 10:27 pm EST

    Hi,

    Can you explain the steps to reproduce this issue in your sample?

    ~nilay

  • Posted 19 February 2018, 12:18 am EST

    Hello,

    You don’t have to do anything actually, the error appears as the screen is loading.

    Frédéric

  • Posted 20 February 2018, 12:33 am EST

    Hi,

    Although I cannot see the error you have reported, I see lot of build errors. That may be due to angular version mismatch with my machine. I will try to rectify this.

    ~nilay

  • Posted 21 February 2018, 5:39 am EST

    Hi,

    Although I can build your sample, I still cannot reproduce the issue. My console shows no error.

    ~nilay

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels