Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Windows Forms / WinForm Controls / December 2006

Tip: Looking for answers? Try searching our database.

DataGridView and Multi-column sorting

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
roybrew@att.net - 04 Dec 2006 14:25 GMT
Anyone know of a way to perform Multi-column sorting with the
DataGridView?
Kevin Spencer - 05 Dec 2006 13:51 GMT
This is done via the underlying DataSource. If, for example, your
DataGridView is using a BindingSource linked to a DataView of a DataTable,
you can set the Sort property of the BindingSource. This property is a
string, which can contain a single column name, or a comma-delimited list of
column names. See:

http://msdn2.microsoft.com/en-us/library/system.windows.forms.bindingsource.sort.aspx

Signature

HTH,

Kevin Spencer
Microsoft MVP
Logostician
http://unclechutney.blogspot.com

There is a madness to my method.

> Anyone know of a way to perform Multi-column sorting with the
> DataGridView?
roybrew@att.net - 08 Dec 2006 00:41 GMT
Ok.  But if you don't have an underlying DataSource, you are hosed,
right?  I think I found another way.

http://www.windowsforms.com/FAQs/default.aspx?PageID=2&ItemID=688&CategoryID=3&t
abindex=3


Thanks for the response.

> This is done via the underlying DataSource. If, for example, your
> DataGridView is using a BindingSource linked to a DataView of a DataTable,
[quoted text clipped - 16 lines]
> > Anyone know of a way to perform Multi-column sorting with the
> > DataGridView?

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.