I have a 5 column flexgrid. I want the user to click a column and get the grid sorted by that column. Works fine for non-date collumns. For date columns, I firstly loop through all rows changing them from dd/mm/yy to yy/mm/dd. But the sort doesn't do anything.

Thanks for your reply.

I looked at that link. Not sure it helped me a hell of a lot. If I have to do a bubble sort, then I can work that out. But why does the flexgrid sort work on non-dates. Does it use some other property other than my changed captions ?

Ok, sorry about that..... I looked a little deeper into the situation, and it seems that it's a known flaw (sorting dates) with the flexgrid control.... here is a workaround: http://www.freevbcode.com/ShowCode.asp?ID=5703

Basically, you use a hidden column to sort the data, and then repopulate..... let me know how this turns out for you, or if you need more help with this.

Excellent. Makes sense. Thanks for the update.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.