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
15
Showing DropDownList displaytext value
posted

Hi, I'm using UltraGrid (Infragistics4.Win.UltraWinGrid.v15.2) in a .NET Framework 4.5 WinForms application.

For one of the columns, I have the column style set as DropDownList and the valuelist set as a small filtered list of values (containing the dataValue and displayText). We have a large list of values but don't want to expose them to our users and give them that option in the dropdown selection.

I have a scenario where the binded column value is not contained in the assigned valuelist and the dropdown text box shows the dataValue (which is currently a database ID) instead of the displayText. This is due to the binded value being contained in the large list of values, but not in the small filtered list that would show in the dropdown.

Is there a way to retain the displayText shown in the column even though it is not contained in the drop down list?

We would mainly need it to show users what the value was before they are about to make a change.

I've tried manually changing the value of the cell, but that would change the underlying dataValue and would break other components of our winforms application.

I just need a way for the column value to get the displayText from the large unfiltered list, but the dropdown should show only the small filtered list.

Any help would be appreciated.

  • 2155
    Offline posted

    Hello Dan,

    Unfortunately, you cannot show a displayText value that is not in the dropdown list in a cell.

    One possible approach would be to bind the list that has all possible items to the target column and change the list at UltraGrid's BeforeCellListDropDown event and AfterCellListCloseUp event.

    I have created a sample for your reference.
    The support for v15.2 is expired, so it uses the current latest version v22.1.

    UltraGrid_ValueList.zip