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
15
Pivot Grid Update Data
posted

Hello,

is it possible to udpate the data of a Pivot Grid after it is generated? 

In our use case, we want to use Pivot Grid as a simple Cross-Table, with "showPivotConfigurationUI" as "false". The data, which is bound to the Pivot Grid, will be changed by components outside of the Pivot Grid. We want to update the Pivot Grid once the data is changed. Is is possible? Thanks in advance.

 

Add an example to explain what I want to do.

Suppose I get this data. 

[
    {fact: F1, market: Market1, product: Prod1, value: 1},
    {fact: F1, market: Market1, product: Prod2, value: 2},
    {fact: F2, market: Market1, product: Prod1, value: 3},
    {fact: F2, market: Market1, product: Prod2, value: 4},
]

I want to create such a table. Once the product is changed, the table should be changed accordingly. Is there any way to do that? Many thanks.

regards

CC

Parents
  • 640
    Offline posted

    Hello Clever Click,

    Thank you for posting in our Community!

    I believe you will find the Pivot Grid Remote Operations topic in our official documentation very helpful. There you can find more information regarding how to feed the pivot grid with already aggregated data. Please keep in mind that as stated in this topic, it is essential for the data to match the configuration of the pivot grid. For the best results no additional fields should be included into the aggregated data and no fields from the provided data should be left undeclared as rows or columns. The IgxPivotGrid component builds its data based on the PivotConfiguration and it is expected for the configuration and aggregated data to match accordingly.

    Please let me know if you need any further information.

    Regards,
    Viktor Kombov
    Entry Level Software Developer
    Infragistics, Inc.

Reply
  • 15
    Offline posted in reply to Viktor Kombov

    Hello Viktor Kombov,

    thank you very much for your answer. 

    I have tried with Pivot Grid Remote Operations. It looks good, but I have some questions. It would be easier if I show you my test. 

    I have these data:

    • export const DATA = [
    •     { Product: 'Clothing', Seller: 'Stanley Brooker',   Value: '94.2652032683907' },
    •     { Product: 'Clothing', Seller: 'Elisa Longbottom', Value: '70.798922689072285'},
    •     { Product: 'Bikes', Seller: 'Lydia Burson', Value: '35.799331607203619' },
    •     { Product: 'Accessories', Seller: 'David Haley', Value: '41.411331268684627' },
    •     { Product: 'Components', Seller: 'John Smith', Value: '60.474313730594851' }
    • ];
    And the Pivot Grid looks good. You see two Buttons above the Grid, which filter the rows or columns.
    To filter the row, it works fine by filtering the DATA itself. And It is good.
    I have question how to filter the columns. It is possible to filter with the method "filter", like this. 
    • this.pivotGridComponent.filter("Product", "Accessories", IgxStringFilteringOperand.instance().condition("contains"));
    But I failed to figure out, how to filter multiple columns. The filter method seems to only accept one item. Do you have an idea? Many Thanks
    Regards,
    Clever Click
Children