Getting Started with Adobe After Effects - Part 6: Motion Blur
A collection of quick technology learning tips from what people around you learn every day

WPF - DataGrid can be sorted based on Multiple columns also

Dec 14 2011 8:13AM by Anand Bohra   

I have seen & worked on datagrids in winform applications as well webform applications (ASP Dot Net) but, while watching training video for WPF i found a very good feature for WPF Datagrid that is multisort.

Generally when we click on a column, it sorts data based on that column only but what if we want to sort by 2 or more critierias say firstname then lastname & so on which till date i didn't found any datagrid but in WPF you can achieve the same by Holding Shift & click that column

For example, first sort by Firstname (normal click) then hold Shift button & click Last name it will sort all data by firstname then last name.

Read More..   [32134 clicks]

Published under: Microsoft .NET Tips ·  ·  ·  · 

Anand Bohra
604 · 0% · 60



  • You have any information about silverlight, whether this works in silverlight also or not??

    commented on Dec 14 2011 6:39AM
    3 · 40% · 12972
  • Yes in Silverlight as well. I quickly build a new project in Dotnet framework 3.5 using Silverlight 5 with WCF RIA Services & when grid loaded it allowed me for Multicolumn Sorting.

    so its a great new feature of Datagrid in WPF & Silverlight

    commented on Dec 14 2011 6:52AM
    Anand Bohra
    604 · 0% · 60
  • Thanks Anand.. Its a nice feature...

    commented on Dec 14 2011 8:15AM
    3 · 40% · 12972
  • And what about the users who will never know this? What use is it to them.

    commented on Dec 15 2011 12:34AM
    391 · 0% · 105
  • before this grid feature myself & I am sure almost everyone use to take grid data in Excel & do sorting but now because of this feature the same can be achieved on page level / form level only and with this you can sort your data for all columns displayed.

    until Excel 2003 you can sort data for 3 column only (unless and until you build your own macro) & Excel 2007 onward there is no limit

    For those who don't know this is the duty / responsibility of programmer / programmer analyst to make their user understand about new technologies their uses & features, and for those learning curvature we all are here to share and grow.


    Anand M. Boha

    commented on Dec 15 2011 2:32AM
    Anand Bohra
    604 · 0% · 60
  • So what training video were you watching?

    commented on Dec 15 2011 6:31AM
    327 · 0% · 132
  • on Microsoft official websites there are lots of free online & offline (to download media files) videos available for Silverlight, WPF, ASP Dot net along with source codes to study.

    e.g to name a few

    commented on Dec 15 2011 6:53AM
    Anand Bohra
    604 · 0% · 60
  • Silverlight is new cross-browser plug-in for richer web experiences to end-users,including video and animations.Silverlight is generating buzz not only inside the traditional Microsoft developer community, but also among designers and web developers who have long relied on other tools such as Macromedia Flash to get their jobs done you can see more detail on dapfor. com

    commented on Nov 5 2012 12:45AM
    Annie Calvert
    3162 · 0% · 2

Your Comment

Sign Up or Login to post a comment.

"WPF - DataGrid can be sorted based on Multiple columns also" rated 5 out of 5 by 4 readers
WPF - DataGrid can be sorted based on Multiple columns also , 5.0 out of 5 based on 4 ratings
    Copyright © Rivera Informatic Private Ltd Contact us      Privacy Policy      Terms of use      Report Abuse      Advertising      [ZULU1097]