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
585
Fast mapping of column values to display text
posted

We have a few columns which internally are stored as integers; they are essentially foreign keys in the database. To the user, we'd prefer to show a descriptive text instead of the value.

So far, we've accomplished this with an IEditorDataFilter, handling the OwnerToEditor conversion direction. This works, even for editing. There's just one catch: it's extremely slow. In particular, using the filter row on a column with this data filter, each typed in character can take tens of seconds to search.

In a branch, I've instead used an approach based on an unbound column. I.e., the original column is left as-is, and an additional column gets added that contains the user-friendly display texts. This is easily an order of magnitude faster. Still not quite as fast as I'd hoped, but a noticeable improvement. However, it presumably isn't what unbound columns were intended for, and there's probably a few kinks I'd have to work out, such as edit mode, and overriding the column chooser so the original column doesn't get shown.

Here, then, is my question:

is there A) something I'm missing to boost IEditorDataFilter? I assume it's calling Convert() for each and every row, comparing tons of values, when internally, I keep possible values in a dictionary; it'd be much more efficient to point the grid to that dict if I could.

or B) am I on the right track in eschewing it for an unbound column, which is faster but somewhat hackier?

  • 48586
    posted

    Hello, ­­­­­

     

    I am just checking about the progress of this issue. Let me know If you need my further assistance on this  issue?

     

     

    Thank you for using Infragistics Components.

  • 48586
    posted

    Hello,

     

    Have you consider to use ValueList, UltraCombo or UltraComboEditor component for editor of this column. All of this editors provide you with a ValueMember (Actual value of the cell, in your case it will be your foreign key ) and DisplayText (descriptive text for the corresponding value). So when you filter this column it could be configured to filter on the DislayText instead of the actual value. Also editing of that column could be done with simple selection of the dropdown portion. So I believe that this fits exact in your scenario, it is less efforts to implement and should satisfy your performance requirements. On the following link you will find simple tutorial of usage of ValueList with UltraGrid.  

     

    http://help.infragistics.com/doc/WinForms/2015.1/CLR4.0/?page=Infragistics4.Win.UltraWinGrid.v15.1~Infragistics.Win.UltraWinGrid.UltraGridColumn~ValueList.html

     

    Please let me know if you have any further questions or if I am missing something.