Filtered State & new rows Problem

Posted by: andreas.knuth on 2 October 2019, 10:34 am EST

    • Post Options:
    • Link

    Posted 2 October 2019, 10:34 am EST

    Hi,

    I’m using Angular8 und the actual version of wijmo grid.

    The desired goal is to add new empty rows to the grid while any Filter is switched on (e.g. on the country) and this item is not filtered out until an other command (e.g. commitNew) is used …

    There is a sample for it: https://stackblitz.com/edit/angular-wawupw

    According to the docs I added a new item to the collection using this.data.addNew() which is called on the “create new” button.

    The “save” button commits this item using this.data.commitNew()

    That works great - after pressing “save” the item disappears.

    But … if I click on any other row (after create new & before save) inside the grid, the new item also disappears even without calling commitNew().

    The same behaviour happens on a sorted state.

    I think that’s a bug and not a feature … do you have a solution for this problem ?

    thanks & best regards,

    Andreas

  • Posted 3 October 2019, 8:21 am EST

    Hi Andreas,

    You can prevent the sorting of the FlexGrid before saving by using the canSort property of the CollectionView class. To do this, simply set its value to false, when a new data is added and set its value to true again when the data is saved. Please refer to the code snippet below:

    createNewRow(){
    	this.data.addNew();
    	this.data.canSort = false;
    }
    save(){
    	this.data.commitNew();
    	this.data.canSort = true;
    	this.data.refresh();
    } 
    

    But this process will not work in the case of filtering, since it is a more complex process. We have asked the dev team to look into this with the internal tracking id 393401. We give you an update as soon as we hear from them.

    Regards,

    Ashwin

  • Posted 4 October 2019, 11:58 am EST

    Hi Ashwin,

    thanks for your quick reply. canSort works the way we need it.

    I am looking forward to your feedback for tracking id 393401 as this is already an important feature for our Application.

    best regards,

    Andreas

  • Posted 7 October 2019, 3:24 am EST

    Hi Andreas,

    This issue with the concerned developer and we will let you know as we get an update on this.

    Regards,

    Manish Gupta

  • Posted 29 October 2019, 7:31 am EST

    Hi Manish,

    are there any updates on this issue ?

    or do you have an estimated completion date ?

    best regards,

    Andreas

  • Posted 30 October 2019, 1:29 am EST

    Hi Andreas,

    I have asked the dev team to provide an ETA on this. I will update you as soon as I will hear from them.

    ~regards

  • Posted 18 November 2019, 11:54 am EST

    Hello everybody,

    as I’ve seen there is a new release of wijmo (5.20193.637) out.

    Do you know if the above issues has already been resolved ?

    best regards,

    Andreas

  • Posted 18 November 2019, 11:31 pm EST

    Hi Andreas,

    We are glad to inform that we have added the built-in support for On-Demand Sorting, Filtering and Grouping by adding the refreshOnEdit property which is true as default to mimic current behaviour.

    To make on-demand sorting/filtering, set it to false. Please refer to the following demo sample for reference:

    https://www.grapecity.com/wijmo/demos/Grid/FilteringSearching/On-demand/purejs

    Regards,

    Manish Gupta

  • Posted 19 November 2019, 6:13 am EST

    Hi Manish,

    that sounds great because it’s exactly my missing feature for the wijmo grid :slight_smile:

    I’ll try it and will report.

    best regards,

    Andreas

Need extra support?

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

Learn More

Forum Channels