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

[Small suggestion] VirtualDataCollection.LoadItems() should check, if list already contains same sequence

4 Answers 30 Views
DataBoundListBox
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Vitalii
Top achievements
Rank 2
Vitalii asked on 20 Aug 2013, 01:34 AM
For example, if collection is inherited IEnumerable, then check SequenceEqual().

In my case, i'm facing with next problem: i'm reading, say, 3rd page from cache, and i'm sending server request for 3rd page (in case, server holds updated version). When getting answer, i do VirtualDataCollection.LoadItems(), that leads to screen blinking in all cases, even if elements are similar.

4 Answers, 1 is accepted

Sort by
0
Deyan
Telerik team
answered on 20 Aug 2013, 01:12 PM
Hi Vitalii,

Thanks for your suggestion.

According to MSDN SequenceEqual is not supported on Windows Phone:

http://msdn.microsoft.com/en-us/library/bb348567.aspx

Regards,
Deyan
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WINDOWS PHONE 7.
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
0
Vitalii
Top achievements
Rank 2
answered on 20 Aug 2013, 01:42 PM
Wut.. but i'm using it :)
Hm, i'll re-check - maybe msdn is just outdated.
0
Vitalii
Top achievements
Rank 2
answered on 20 Aug 2013, 01:48 PM
Just re-checked, it works fine

case AnswerDataServiceStatus.Ok:
                        status = string.Empty;
 
                        collectionsAnswer.Collections[0].name = "haha"; // Custom name (it is shown in the screen)
                        collectionsAnswer.Collections[0].id = "3"; // Custom id (it is used in Equals())
 
                        if ((_itemsList == null)
                            || !(_itemsList.SequenceEqual(collectionsAnswer.Collections))) // if not equal, update
                        {
                            _itemsList = new List<ProductSubCategoryItem>(collectionsAnswer.Collections);
 
                            DispatcherHelper.CheckBeginInvokeOnUI(() =>
                                RaisePropertyChanged("ItemsList", _itemsList, _itemsList, true));
                        }
 
                        break;
0
Deyan
Telerik team
answered on 23 Aug 2013, 08:09 AM
Hi Vitalii,

We will revisit this functionality and will update the component accordingly.

We will consider this thread closed for now.

Let us know should you have further questions or need assistance.

Regards,
Deyan
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WINDOWS PHONE 7.
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
Tags
DataBoundListBox
Asked by
Vitalii
Top achievements
Rank 2
Answers by
Deyan
Telerik team
Vitalii
Top achievements
Rank 2
Share this question
or