Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
220
Custom Sorting on .Net 1.0
posted

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 

Parents
No Data
Reply
  • 469350
    Verified Answer
    Offline posted

    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.Smile

         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.  

Children