[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
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.
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
Re: [2005] DataGridViewImageColumn Sort
Have you read the documentation for the SortMode property?
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