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
650
Multi-select UltraComboEditor within UltraGrid : display texts and data values
posted

Normal 0 21 false false false FR-BE X-NONE X-NONE

Hi,

I’m using v10.3 for Windows.

I added a multi-select UltraComboEditor to a column of my UltraGrid which is bound with a DataSet. I did this using UltraComboEditor.CheckedListSettings properties and UltraGrid.EditorComponent.

Now, imagine my UltraCombo contains 2 items (ID – Text):

  • ·         1 – Item 1
  • ·         2 – Item 2

If I check both items, the cell displays “Item 1, Item 2”. Fine!

But when I save the DataSet, the saved value is “Item 1, Item 2” and that’s my problem. I want to save the identifiers of my selected items like “1, 2”.

 

How could I do this?

Is it possible to have a displayed text different from the data value for a cell when using an UltraComboEditor for this cell?

 

Thank you in advance

Parents
  • 48586
    Verified Answer
    posted

    Hello,

     

    When UltraCombo is in multiselect mode, then it returns its value as an array of objects and if the DataType of the source column in the UltraGrid is different than Object, then the Cell gets the string representation of  the value from the  UltraCombo. In the attached sample you could see one simple approach of how to avoid this behavior. Please run the sample and select several values from IDUn column, leave the column in order to commit the changes and see how the actual values in column ID gets changed.

     

    I hope this help.

    WinGridMultyListCombo.zip
Reply Children
No Data