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

  • Home
  • SEARCH
  • 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 106839
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T01:39:36+00:00 2026-05-11T01:39:36+00:00

When I first load data into a Silverlight DataGrid control, how can I make

  • 0

When I first load data into a Silverlight DataGrid control, how can I make the screen look exactly as if the user had just clicked the header of the first column? In other words, the data should be sorted in ascending order according to that column’s values, AND the little sort arrow should be displayed in the first column’s header.

Assuming that’s possible, can I also make it look as if the user had clicked the first column and then shift-clicked the second? In other words, can I programatically apply a two-part sort and have the screen look as if the user had done it?

  • 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. 2026-05-11T01:39:36+00:00Added an answer on May 11, 2026 at 1:39 am

    I needed to do this as well, and looked hard and deep at whether the DataGrid could do this.

    There IS in fact an appropriate method on the DataGridColumnHeader class, namely InvokeProcessSort, but it’s internal and not surfaced anywhere else in the DataGrid classes.

    All I’ve been able to do is pre-sort the data just before I bind it. I’m using a custom data collection that implements ICollectionView as well as ObservableCollection<>, and this works OK – but it’s not optimal, and a load of work that’s not necessarily needed.

    Also, providing a pre-sorted collection means the grid doesn’t show the sort marker.

    I’ll raise this as an issue on the DataGrid bug-tracker – this is a fairly major omission that’d be quite easy to fix – MS just needs to expose appropriate methods on DataGridColumn and DataGrid classes.

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

Sidebar

Ask A Question

Stats

  • Questions 117k
  • Answers 117k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer I don't see anything particularly monstrous about your query. The… May 11, 2026 at 10:44 pm
  • Editorial Team
    Editorial Team added an answer Using launchctl bsexec is correct, but you need to launch… May 11, 2026 at 10:44 pm
  • Editorial Team
    Editorial Team added an answer check out this question on msdn forums: Name Vs. Static… May 11, 2026 at 10:44 pm

Related Questions

I have a Form in my application that displays some data. When I first
I want to load a list of records given a possibly lengthy list of
I have a JavaScript slideshow that pre-loads images out of a MySQL database and
I was getting advice from Rob Kennedy and one of his suggestions that greatly

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.