-
May 4th, 2009, 12:33 AM
#1
Sorting GridView control
How can i sort the GridView control by clicking the column header?
-
May 4th, 2009, 11:20 AM
#2
Re: Sorting GridView control
Are you using DataGridView, or is GridView a seperate control?
The DataGridView should sort itself when clicking the headers, if it doesn't try looking for an event for "column header click" or something similar and put your code in there. Try looking at the properties of the DataGridView control to see if you have sorting turned off, or clickable headers turned off.
Thanks,
- pgrammer
-
May 4th, 2009, 08:55 PM
#3
Re: Sorting GridView control
Originally Posted by pgrammer
Are you using DataGridView, or is GridView a seperate control?
The DataGridView should sort itself when clicking the headers, if it doesn't try looking for an event for "column header click" or something similar and put your code in there. Try looking at the properties of the DataGridView control to see if you have sorting turned off, or clickable headers turned off.
i'm using GridView control, i have set those sorting property to true.... but when i click on the header it ask for handler of the sorting... i have create the handler but don't know what should write in the handler...
can anyone can provide me sample??
-
May 5th, 2009, 11:26 AM
#4
Re: Sorting GridView control
Originally Posted by lsy
i'm using GridView control, i have set those sorting property to true.... but when i click on the header it ask for handler of the sorting... i have create the handler but don't know what should write in the handler...
can anyone can provide me sample??
http://www.google.com/search?hl=en&q...q=sorting+data
http://www.google.com/search?hl=en&q...ly&btnG=Search
http://social.msdn.microsoft.com/Sea...ng%20c%23&ac=1
Thanks,
- pgrammer
-
May 5th, 2009, 01:33 PM
#5
Re: Sorting GridView control
Originally Posted by lsy
i'm using GridView control, i have set those sorting property to true.... but when i click on the header it ask for handler of the sorting... i have create the handler but don't know what should write in the handler...
can anyone can provide me sample??
Maybe you show your code reagrding that control se we can show you the adequat code for your grid
Jonny Poet
To be Alive is depending on the willingsness to help others and also to permit others to help you. So lets be alive. !
Using Code Tags makes the difference: Code is easier to read, so its easier to help. Do it like this: [CODE] Put Your Code here [/code]
If anyone felt he has got help, show it in rating the post.
Also dont forget to set a post which is fully answered to 'resolved'. For more details look to FAQ's about Forum Usage. BTW I'm using Framework 3.5 and you ?
My latest articles :
Creating a Dockable Panel-Controlmanager Using C#, Part 1 | Part 2 | Part 3 | Part 4 | Part 5 | Part 6 | Part 7
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|