Hi,
Im using the 2007 Vol 1 CLR 1.x version of Infragistics, and am looking to set up custom sorting. Basically, I have an unbound column that I'm dynamically populating with a combination of three hidden columns (Salutation, Firstname, Surname - so the output on the unbound column looks like 'Mr Joe Bloggs'). When the user chooses to sort by this unbound column, I want to set the grid to actually sort by another column, but still show that its sorting by the visible column.
I managed to find the linked page (http://devcenter.infragistics.com/Support/KnowledgeBaseArticle.aspx?ArticleID=5208) which looks like it does pretty much exactly what im looking for. However, I'm trying to do this using the ultrawingrids on .Net 1, and I cant seem to find the two events used in the examples. Is there any way to do this in CLR 1?
Thanks
Fergal
Mike,
Thanks for your response. I'd actually noticed not long after posting my error, and saw the article about the Comparer class, just figured I would hold out, see if you guys had another solution.
The ICompare class should be suitable for us though. Thanks for your help.
Hi Fergal,
The article you linked here appears to be referring to UltraWebGrid, not UltraWinGrid. So it's no surprise that you can't find the events.
To acheive what you want in UltraWinGrid is pretty easy, though. What you would do is write a class that implement IComparer and set the SortComparer property of your combined column to an instance of this class.
The IComparer interface only has one method: Compare. It will pass in two grid cells to compare. So you can examine the text of the cells themselves, or if you like, you can look at the other cells in the same row to determine the order.