Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
155
how to by-pass the issue where using custom "Add new row", it hides the newly added record
posted

Hello:

    it was previously from this issue raised here: https://ko.infragistics.com/community/forums/f/ignite-ui-for-angular/127165/how-to-programmatically-add-rows-to-a-datagrid-thru-button-click-without-reload?ReplySortBy=CreatedDate&ReplySortOrder=Ascending

    However,

1) if i apply the filter, eg. go to Product-id and filter to show only "1"

2) click "Add new row", then it won't show it

3) until the filter is removed, eg. go to Product-id and select "All"

<igx-grid
      #grid
      [allowFiltering]="true"
      filterMode="excelStyleFilter"
      [data]="data"
      width="100%"
      height="500px"
      [primaryKey]="'ProductID'"
      [rowEditable]="true"
    

    Any idea to by-pass this? Modified version: stackblitz.com/.../q2zkrdvm-rndm4osi

Parents
No Data
Reply
  • 2800
    Offline posted

    Hello Gan,

    Thank you for contacting Infragistics Developer Support.

    I have been looking into your question and the provided sample and what I can say is that this behavior is expected and is simply how filtered data works. If the grid is filtered by “ProductID” being equal to “1”, then in case the newly added row’s “ProductID” prop is not equal to “1”, it will not be shown in the data – it will get filtered out. This is the correct behavior.

    To further demonstrate it, please, observe the following gif, where I have changed the “ProductID” column filter to “Contains”. At the moment the auto-incremented id contains “1”, it will be shown in the filtered data:

     

    If you have any other questions regarding the IgxGrid usage, please, let me know.

    Best regards,
    Bozhidara Pachilova
    Software Developer

Children