|
-
Jul 20th, 2007, 08:38 AM
#1
Thread Starter
Addicted Member
[2005] DataGridViewImageColumn Sort
Hi,
I have an image column in my DataGridView, in the cellformatting event I bind the image which can only be one of two tick.jpg or cross.jpg.
Is there anyway I can sort on this column, I imagine the only way to do it would be on the filename?
Any help appreciated
Thanks
-
Jul 20th, 2007, 09:24 AM
#2
Re: [2005] DataGridViewImageColumn Sort
You can sort it any way you like. You would normally just check whether the Image object display 'Is' a particular Image.
-
Jul 20th, 2007, 09:43 AM
#3
Thread Starter
Addicted Member
Re: [2005] DataGridViewImageColumn Sort
Okay, so do I set the sort mode to Programmatic for that column?
I'm presuming then I need to catch a sort event, is that correct?
Cheers
-
Jul 20th, 2007, 09:48 AM
#4
Re: [2005] DataGridViewImageColumn Sort
Have you read the documentation for the SortMode property?
-
Jul 20th, 2007, 09:57 AM
#5
Thread Starter
Addicted Member
Re: [2005] DataGridViewImageColumn Sort
I have read this
http://msdn2.microsoft.com/en-us/library/95scxcdy.aspx
I know I need to handle the Sort method of the grid, but the next step is unclear, also in the notes section it says that the method will not work on unbound columns, which my imagecolumn is. It gets its value from a checkbox column which is hidden. So do I need to involve the hidden column somehow?
Thanks
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
|