Flexgrid filter filter.activeEditor is null

Posted by: mfujiwara on 11 July 2019, 5:03 am EST

    • Post Options:
    • Link

    Posted 11 July 2019, 5:03 am EST

    Hi Dear.

    Now…Im Struggling with Flexgrid filter.

    please solve with me.

    WjFlexgridFilter.filterChanging event is able to edit filter’s template right?

    Official document reference says.

    I want to edit columnFilter template HTML dynamicaly.

    But,filterchanging’s activeEditor property is null.

    Even though the filter editor is open on the screen.

    here is example.

    
    // Angular template binding filterChanging event.
    // Like, (filterChanging)="filterChanging(filter,$event)"
    function filterChanging(filter,events){
    	var ed=filter.activeEditor;
    	ed.hostElement.innerHTML='<h1>The-New-World-Filter-Template</h1>'
    	// ed is exists. but,activeEditor is null!! sadness.
    }
    
    

    also,please reference this pages.

    https://www.grapecity.com/forums/wijmo/flexgrid-multi-filter

    https://www.grapecity.com/wijmo/api/classes/wijmo_grid_filter.flexgridfilter.html#activeeditor

    The above StackBlitz works well,

    but version upgrade with Dependency will make ActiveEditor null.

    In the new Wijmo version (5.20183.550 or later), was this part changed to a null specification?

    If so, is there a new way to customize the filter template?

    Also, when is it a defect due to a destructive change, when will it be fixed?

    using:@grapecity/wijmo.all@5.20191.605

    using:@angular/core@7.1.0 and more 7.1.x

    Thank you for your all efforts and passion…

  • Posted 12 July 2019, 7:41 am EST

    Hi Motohisa,

    We are still investigating the issue of why activeEditor is null. We will provide you with an update as soon as possible. In the meantime, you use the setTimeout method to get the active editor. Please refer to the code snippet below:

    function filterChanging(filter,events){
         setTimeout(() => {
                   var ed=filter.activeEditor;
                   ed.hostElement.innerHTML='<h1>The-New-World-Filter-Template</h1>'
         })
    }
    

    Also, if you wish to customize the filter template, I would suggest you use the controlTemplate property of ColumnFilterEditor class. Please refer to the sample below:

    https://stackblitz.com/edit/angular-u4chni

  • Posted 17 July 2019, 11:12 pm EST

    Hi ashwin.

    gratefull thanks for your reply.

    its second solution is,

    For the time being, it worked.

    thanks all.

    (in the filterChanging event, controlTemplate property overwrite.)

    but,overwrote template is,not works Angular binding.

    For that matter,

    i proberbly will post another topics.

    anyway,i was really helped.

    i wish light for all over the world.

  • Posted 17 July 2019, 11:25 pm EST

    Hi again,

    Glad to be able to help. Let us know if you face any further issue.

Need extra support?

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

Learn More

Forum Channels