This is a migrated thread and some comments may be shown as answers.

Replacing data within PivotGrid

13 Answers 172 Views
PivotGrid
This is a migrated thread and some comments may be shown as answers.
Rolf
Top achievements
Rank 1
Rolf asked on 08 Sep 2014, 12:49 PM
Hi all

I have to the following structure which I wanna use with Pivotgrid:

{
    "Name":  Ackermann,
    "First Name": Rolf,
    "Statistic": [
        {
            "Year": 2004,
            "Product": "Book",
            "Quantity": 10
        }, {
            "Year": 2005,
            "Product": "Booklet",
            "Quantity": 35
        }, {
            "Year": 2005,
            "Product": "Book",
            "Quantity": 18
        }
    ]
}

Now I have a interacive page where the user can search another customer. After the search I want to display the customers data in the PivotGrid. But for every customer the user searches an additional PivotGrid is added (1st time: 1 grid, 2nd time: 2 grids, 3th time: 3 grid etc.).

How can I avoid this?

13 Answers, 1 is accepted

Sort by
0
Georgi Krustev
Telerik team
answered on 09 Sep 2014, 01:30 PM
Hello Rolf,

It is not very clear how the widget is initialized and why it is added multiple times. Could you provide more information about your current implementation? A runnable Dojo demo will be great.

Regards,
Georgi Krustev
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
0
Georgi Krustev
Telerik team
answered on 09 Sep 2014, 01:34 PM
Hello,

Here is the correct link to the Dojo site.

Regards,
Georgi Krustev
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
0
Rolf
Top achievements
Rank 1
answered on 10 Sep 2014, 02:29 PM
Hi Georgi

Sorry for the delay, we are currently very busy.

Anyhow:
Imaging a form which is able to search for a customer (like a query form). The user can input a customer name and press the search button. If the customer could be found we fill up a PivotGrid with similar information like I wrote in this thread.

The problem is now that if you only exchange the data via the dataSource property it will show the old data (not replacing the data). If you build a new dataSource and assign it to $("pivotgrid").kendoPivotGrid({...}) it will add the whole data as a separate PivotTable (e.g. if you search 2 times you will have 2 PivotGrid, if you search 3 times you will have 3 PivotGrid etc.).

Regarding Dojo: I can build an example but I'm only working this week, next week I'm in vacation.

Best regards
Rolf
0
Georgi Krustev
Telerik team
answered on 11 Sep 2014, 02:03 PM
Hello Rolf,

I would suggest you use the widget's setDataSource method to change the data. Additional widget initialization is not supported and will lead to undesired behaviors, like the one you've mentioned.

Give it a try and let me know if this doesn't solve the problem.

Regards,
Georgi Krustev
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
0
Rolf
Top achievements
Rank 1
answered on 11 Sep 2014, 02:09 PM
Hello Georgi

Thanks for your reply. I already tried this but with no success. I've done the following:

a) setDataSource( newData );
b) refresh();

But the old data will be still shown. I have seen that you added a new version (2014.2.909). I will give this version a try and will reply later.

Thanks and bes regards
Rolf
0
Rolf
Top achievements
Rank 1
answered on 11 Sep 2014, 02:20 PM
BTW Georgi

The PivotGrid looks very nice but expanding / collapsing column categories (from the 2nd  column on) works only in 2014.2.716 (with some calculation errors) but neither before nor after this version (even not 2014.2.909).

Best regards
Rolf
0
Georgi Krustev
Telerik team
answered on 11 Sep 2014, 02:43 PM
Hi Rolf,

Find my comments below:

a) setDataSource( newData );
Here is a Dojo demo demonstrating how the setDataSource method affects PivotGrid widget.

b) refresh();

This will just re-draw widget.

There is a known issue regarding drill-down functionality (even though I am not sure if it is related to the one you mentioned). We will address the bugs for the upcoming official release of Kendo UI due the beginning of October.

Regards,
Georgi Krustev
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
0
Rolf
Top achievements
Rank 1
answered on 12 Sep 2014, 08:00 AM
Hi Georgi

Many thanks for that sample. Regarding this...

a) You're using the same data: products, only the rows/columns are exchanged (I have to try it that ways also)
b) Do the following steps and the data will not be loaded any longer (tested with Firefox, Chrome and IE)

  1) Expand the column under "Produce"
  2) Press "Change DS" button
      ==> The loading icon will stay remain and data are not longer shown

Regarding drill-down functionality:

a) Version 20014.2.716 of kendo.all.min.js the shifting / unshift of columns during expanding resp. collapsing the rows was working
     but the calculation on the last column is totally false.

I created a document with test cases where you can see the drill-down problem.

Best regards
Rolf
0
Georgi Krustev
Telerik team
answered on 16 Sep 2014, 07:29 AM
Hello Rolf,

Thank you for the detailed test cases.

Issue: Do the following steps and the data will not be loaded any longer (tested with Firefox, Chrome and IE)

This is a known bug, which is already addressed. You can try the next internal build of Kendo UI and let me know if the problem is still there. The build most probably will be release in the middle of this week.

​Issue: Version 20014.2.716 of kendo.all.min.js the shifting / unshift of columns during expanding resp. collapsing the rows was working, but the calculation on the last column is totally false.

This problem is related to the previous one and it's caused by the same bug in the rendering. Download the next internal build and should be addressed.

Regards,
Georgi Krustev
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
0
Rolf
Top achievements
Rank 1
answered on 24 Sep 2014, 08:04 AM
Hi Georgi

[quote]This problem is related to the previous one and it's caused by the same bug in the rendering. Download the next internal build and should be addressed.
[/quote]
Version 2014.2.923 doesn't solve the problem.

Kind regards
Rolf
0
Georgi Krustev
Telerik team
answered on 25 Sep 2014, 10:25 AM
Hello Rolf,

The fix was not included in production (last internal build) and that is why the problem still persists. Please excuse me for the incorrect information. The next one, scheduled for this Friday, will include the fix. 

Regards,
Georgi Krustev
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
0
Rolf
Top achievements
Rank 1
answered on 01 Oct 2014, 12:27 PM
Hi Georgi

I tested 2014.2.926 with different browsers (IE, Chrome, Firefox)

The best results (even not 100% perfect) we are getting with Chrome (collapse / expand looks great, but the numbers are not correct all the times). Firefox has still the problem that if you're expanding the second column it will be expanded but not collapsed. IE is not worth is explain (doesn't work properly at all).

Best regards
Rolf
0
Georgi Krustev
Telerik team
answered on 02 Oct 2014, 12:05 PM
Hello Rolf,

Thank you for the feedback. I was able to replicate the incorrect expand/collapse behavior in IE and Firefox.
We will fix it for the upcoming official release of Kendo UI due the mid of next week.

As to the incorrect calculation, could you share with us more information about the problem. I tested the Dojo demo, but the calculation seemed to be OK. Any additional code, demo or steps will be greatly appreciated.

Regards,
Georgi Krustev
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
Tags
PivotGrid
Asked by
Rolf
Top achievements
Rank 1
Answers by
Georgi Krustev
Telerik team
Rolf
Top achievements
Rank 1
Share this question
or