Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

Keep row at top of datagridview

Posted on 2006-03-21
3
Medium Priority
?
455 Views
Last Modified: 2010-10-05
I have a datagridview that has a few rows in it.  Is there a way to keep an item always at the top of the row even if the sort order gets changed?  For example...

ALL
Item1
Item2

ALL
Item2
Item1

Also, can I make the text "ALL" bold?
0
Comment
Question by:RySk8er30
3 Comments
 
LVL 14

Accepted Solution

by:
PockyMaster earned 1000 total points
ID: 16250686
You might want to use your own dataclass to fill your grid with, and implement your custom sorting class (implementing IComparer)
If you make sure that ALL always wins from your other elements , it will always be sorted first..
I never had to implement this kind of stuff, but it might just work :D
0
 
LVL 6

Expert Comment

by:hatem72
ID: 16261174


try 2 freeze the First row ... i didnt test it ...but i think it will work

DataGridViewRow.Frozen Property

http://msdn2.microsoft.com/en-US/library/system.windows.forms.datagridviewrow.frozen.aspx
0
 

Author Comment

by:RySk8er30
ID: 16262270
Freezing the row doesn't work.  I believe this is only for scrolling.
0

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This tutorial demonstrates one way to create an application that runs without any Forms but still has a GUI presence via an Icon in the System Tray. The magic lies in Inheriting from the ApplicationContext Class and passing that to Application.Ru…
Creating an analog clock UserControl seems fairly straight forward.  It is, after all, essentially just a circle with several lines in it!  Two common approaches for rendering an analog clock typically involve either manually calculating points with…
As many of you are aware about Scanpst.exe utility which is owned by Microsoft itself to repair inaccessible or damaged PST files, but the question is do you really think Scanpst.exe is capable to repair all sorts of PST related corruption issues?
The Relationships Diagram is a good way to get an overall view of what a database is keeping track of. It is also where relationships are defined. A relationship specifies how two tables connect to each other. As you build tables in Microsoft Ac…
Suggested Courses

575 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question