Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8991923
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T22:50:19+00:00 2026-06-15T22:50:19+00:00

In my WP7 project i’m using nested Observable collection. However, my problem is sorting

  • 0

In my WP7 project i’m using nested Observable collection. However, my problem is sorting this nested collection by with its nested collection in descending order.

Data Structure of Collection:

public class SubCategory : INotifyPropertyChanged
{
    private string _catName;
    public string CatName
    {
        get { return _catName; }
        set
        {
            _catName = value; NotifyPropertyChanged("CatName");
        }
    }

    private ObservableCollection<ToDoList> _lists;
    public ObservableCollection<ToDoList> Lists
    {
        get { return _lists; }
        set
        {

            if (_lists != value)
            {
                _lists = value;
                NotifyPropertyChanged("lists");
            }
        }
    }

And this is the nested collection

public class ToDoList : INotifyPropertyChanged//, INotifyPropertyChanging
{
    #region NotifyPropertyChanged Members
    public event PropertyChangedEventHandler PropertyChanged;

    private void NotifyPropertyChanged(string propertyName)
    {
        if (PropertyChanged != null)
            PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
    }
    #endregion

    #region NotifyPropertyChanging Members

   // public event PropertyChangingEventHandler PropertyChanging;
   /* private void NotifyPropertyChanging(string propertyName)
    {
        if (PropertyChanging != null)
            PropertyChanging(this, new PropertyChangingEventArgs(propertyName));
    }*/
    #endregion

    [Column(IsVersion = true)]
    private Binary _version;

    private int _ItemId;
    [Column(IsPrimaryKey = true, IsDbGenerated = true, DbType = "INT NOT NULL Identity", CanBeNull = false, AutoSync = AutoSync.OnInsert)]
    public int ItemId
    {
        get { return _ItemId; }
        set
        {
            if (_ItemId != value)
            {
                //NotifyPropertyChanging("ItemdId");
                _ItemId = value;
                NotifyPropertyChanged("ItemId");
            }
        }
    }

    private string _ItemTitle;
    [Column]
    public string ItemTitle
    {
        get { return _ItemTitle; }
        set
        {
            if (_ItemTitle != value)
            {
                //NotifyPropertyChanging("ItemTitle");
                _ItemTitle = value;
                NotifyPropertyChanged("ItemTitle");
            }
        }
    }

    private double _ItemLatitude;
    [Column]
    public double ItemLatitude
    {
        get { return _ItemLatitude; }
        set
        {
            if (_ItemLatitude != value)
            {
                //NotifyPropertyChanging("ItemLatitude");
                _ItemLatitude = value;
                NotifyPropertyChanged("ItemLatitude");
            }
        }
    }

    private string _ItemAddress;
    [Column]
    public string ItemAddress
    {
        get { return _ItemAddress; }
        set
        {
            if (_ItemAddress != value)
            {
                //NotifyPropertyChanging("ItemAddress");
                _ItemAddress = value;
                NotifyPropertyChanged("ItemAddress");
            }
        }
    }

    private double _ItemLongtitude;
    [Column]
    public double ItemLongtitude
    {
        get { return _ItemLongtitude; }
        set
        {
            if (_ItemLongtitude != value)
            {
                //NotifyPropertyChanging("ItemLongtitude");
                _ItemLongtitude = value;
                NotifyPropertyChanged("ItemLongtitude");
            }
        }
    }

    private string _ItemDescription;
    [Column]
    public string ItemDescription
    {
        get { return _ItemDescription; }
        set
        {
            if (_ItemDescription != value)
            {
                //NotifyPropertyChanging("ItemDescription");
                _ItemDescription = value;
                NotifyPropertyChanged("ItemDescription");
            }
        }
    }

    private bool isScheduled;
    [Column]
    public bool IsScheduled
    {
        get { return isScheduled; }
        set
        {
            if (isScheduled != value)
            {
                //NotifyPropertyChanging("IsScheduled");
                isScheduled = value;
                NotifyPropertyChanged("IsScheduled");
            }
        }
    }

    private string _reminderId;
    [Column]
    public String ReminderId
    {
        get { return _reminderId; }
        set
        {
            if (_reminderId != value)
            {
                //NotifyPropertyChanging("ReminderId");
                _reminderId = value;
                NotifyPropertyChanged("ReminderId");
            }
        }
    }

    private String _ItemTime;
    [Column]
    public String ItemTime
    {
        get { return _ItemTime; }
        set
        {
            if (_ItemTime != value)
            {
                //NotifyPropertyChanging("ItemTime");
                _ItemTime = value;
                NotifyPropertyChanged("ItemTime");
            }
        }
    }
    private bool _isComplete;
    [Column]
    public bool IsComplete
    {
        get { return _isComplete; }
        set
        {
            if (_isComplete != value)
            {
                //NotifyPropertyChanging("IsComplete");
                _isComplete = value;
                NotifyPropertyChanged("IsComplete");
            }
        }
    }
    private char _importance;
    [Column]
    public char Importance
    {
        get { return _importance; }
        set
        {
            if (_importance != value)
            {
                //NotifyPropertyChanging("Importance");
                _importance = value;
                NotifyPropertyChanged("Importance");
            }
        }
    }
    [Column]
    internal int _categoryId;

    private EntityRef<Category> _category;
    public Category ToDoCategory
    {
        get { return _category.Entity; }
        set
        {
            //NotifyPropertyChanging("ToDoCategory");
            _category.Entity = value;
            if (value != null)
            {
                _categoryId = value.CategoryId;
            }
            //NotifyPropertyChanging("ToDoCategory");
        }
    }
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T22:50:20+00:00Added an answer on June 15, 2026 at 10:50 pm

    I solved by changing the get method. Here is how i did.

    public ObservableCollection<ToDoList> Lists
        {
            get
            {
                var l = from ToDoList lis in _lists
                        orderby lis.ItemId descending
                        select lis;
                return new ObservableCollection<ToDoList>(l);
            }
            set
            {
    
                if (_lists != value)
                {
                    _lists = value;
                    NotifyPropertyChanged("lists");
                }
            }
        }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've downloaded a zipped project from https://github.com/slodge/face . This project is a wp7 realization
In my WP7 project I am trying to obtain data from the GPS device.
I have problem with adding resources to my wp7 project. I have added <resources:LocalizedStrings
I have a WP7 project where I am using the below code. It normally
I am trying to use performance progressbar in a WP7 project but I have
I have several xaml pages in a WP7 MVVM project. I want to take
i'm studying wp7 app changing app on https://github.com/slodge/face . I want to change this
I am new to WP7. I followed this tutorial to read and write a
I created a low-fidelity prototype for an app for WP7. This was done in
I have 3 assemblies, a WP7 app (targeting 7.0), a Web Services project (running

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.