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 434745
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T20:18:20+00:00 2026-05-12T20:18:20+00:00

I have a Silverlight 2.0 DataGrid that contains a list of items that needs

  • 0

I have a Silverlight 2.0 DataGrid that contains a list of items that needs to be refreshed in an interval to display the up-to-the-minute information. There are items in this grid that may be added and may be removed while the screen is being displayed to the current user. For Example:

If grid looks like the following, then after a minute the data needs to be refreshed because another user has added a 4th entry. (notice the sort is assending by Last Name)

Data Grid http://img16.imageshack.us/img16/1667/datagrid.jpg

Then when I get the new data set and set it to the datagrid’s DataSource property, it resorts the array based on my first column like so:

Data Grid2 http://img19.imageshack.us/img19/1294/datagridb.jpg

Is there any way to reapply the sort after the data source has been updated? I’d like to save the fact that the data grid is sorted by last name, then update the data source, and then reapply the sort to the data grid. So, in the end the datagrid would look like the following:

Data Grid3 http://img13.imageshack.us/img13/4636/datagrid2.jpg

These screen shots are of course not a Silverlight data grid, but this is for simplicity in explaining the situation.

  • 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-05-12T20:18:20+00:00Added an answer on May 12, 2026 at 8:18 pm

    After researching how to do this, I have figured it out. I tried to implement what the others said to try, but could not get it to work in Silverlight 2.0. Thus, I searched StackOverflow and Google for more answers. ScottLogic and CodeProject seemed to be what I was looking for but I couldn’t get them to work fully. So with a bit of frustration and playing around with code, I finally arrived on the solution.

    If the collection that you’re using for your DataGrid’s ItemsSource is ObservableCollection(Of T), you can get the ability of sorting for the object, plus you can update the collection dynamically at runtime, causing the grid to refresh with the item you insert. I’ve created a Google Code project that is GPL for you to checkout and download. Please note that I’m using the Microsoft Silverlight 2.0 DataGrid December 2008 Release for this project. I have linked to this download on the project page as well. (The dll’s required are referenced from within a lib folder inside the project).

    Enjoy!

    Silverlight 2.0 DataGrid Sort Project on Google Code

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a Silverlight DataGrid that contains a single template column which displays a
I have followed this tutorial which allowed me to create a Silverlight DataGrid that
I have a Silverlight 4 application that uses a DataGrid. This DataGrid is bound
I have a Silverlight DataGrid that contains a RowDetailsTemplate. The RowDetailsTemplate contains a TabControl
I have a Silverlight DataGrid that's being populated with different types of data for
I have a Silverlight application that is using a DataGrid. Inside of that DataGrid
I have a Silverlight 5 Datagrid that has a checkbox in the first column.
I am working in a Silverlight 4 application. I have a datagrid that I
I have found that datagrid columns can be dynamically created and bound in Silverlight.
I have a Silverlight application that gets a list of contacts and displays them

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.