Hi, I'm having a problem refreshing the XamPivotGrid (v.12.1) layout when I'm changing the value of an ItemSource object's property that is contained within a visible column area.
This is a bit complicated to explain, so I've attached sample files (modified from the StartupSolution) showing the problem:
I have a flat datasource with a Columns area set to "[Quarter].[Quarter],[IsDeleted].[IsDeleted]" and a Measure="Amount".
When I'm changing the "Amount" of the object and call FlatDataSource.RefreshGrid(), this change gets rendered correctly. However, when I change the "IsDeleted" property, I would expect the grid to render this change as well, moving the record from the "[IsDeleted].&[True]" column to the "[IsDeleted].&[False]" column, but it does not do that.
On the attached example, I have two buttons which simulate those events: one calls "Add_1000_Click" which adds 1000 to the existing amount (working), the other calls "Change_IsDeleted_Click_1" which switches the boolean IsDeleted value. The "Change_IsDeleted_Click_1" has no effect.
Can you please show me what I'm missing to make this work?
Thanks for your help,
Roman
Hello Roman,
Thank you for your feedback. I have logged this as a new product idea. Our product team chooses new product ideas for development based on popular feedback from our customer base. Infragistics continues to monitor application development for all of our products, so as trends appear in requested features, we can plan accordingly.
We value your input, and our philosophy is to enhance our toolset based on customer feedback. If your feature is chosen for development, you will be notified at that time. Your reference number for this product idea is PI13020141.
If you would like to follow up on your product idea at a later point, you may contact Developer Support management via email. Please include the reference number of your product idea in the subject and body of your email message. You can reach Developer Support management through the following email address: dsmanager@infragistics.com
Also, as a suggestion it might be good to be able to manually trigger the "live update feature" in a future release. What I found confusing was that the RefreshGrid() method updates measure values on existing processed cells but doesn't refresh the grid like the "live update feature" example does.
There are a couple of other forum posts where people had the same issue, so I think this is a common misunderstanding.
Thanks for your answer, but I think the xam pivot grid just can't do what I'm trying to achieve. Plamen's reply came closest by triggering the INotifyCollectionChanged event by replacing the modified object's instance with a clone, but this doesn't work on my application setup for various reasons as we need to keep the instance references and keep track of instance property updates on modified objects.
The only way this would work for us would be if we can manually trigger the method which gets executed on the XamPivotGrid when the INotifyCollectionChanged fires, but since this doesn't seem to be possible we'll probably have to use a different approach to representing our data set.
Thanks a lot for looking into this for me :)
FlatDataSource updates the UI automatically as the collection is changed. It tracks the INotifyCollectionChanged of the item source. You can have a look at this forum post as similar issue is discussed there: http://ko.infragistics.com/community/forums/t/46872.aspx?PageIndex=1
Please feel free to let us know if you have any questions.
thanks Plamen, I already thought of that but can't use this approach as the actual code I'm using uses a custom extended ObservableCollection which keeps track of changes and synchronizes with the datalayer.
Unfortunately, your example would result in a collection Remove+Add and I'd have to add various hacks down the line to convince the data layer that this was an update of an existing item rather than a remove and an add.
However, I assume the XamPivotGrid subscribes to the CollectionChanged event of the ObservableCollection in order to "re-process" the UI grid. Within this handler, I further assume that some method is called to "re-process" the grid. Do you know whether there is a way to manually call this method?