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
755
Custom Comboboxes in Grid
posted

Normal 0 21 false false false DE X-NONE X-NONE

We've got a problem using our custom comboxes in the ultra wingrid:

 

Situation:

We have an UltraWinGrid with several columns. Within 2 of those columns we want to use our own  combobox-solution as an editor component. At runtime, we have to deal with the following problems:

 1.)    Our combobox-solution is able to set the DisplayMember-Property to an internal column which contains a configurable string containing the desired information out of one to many dropdown-list-columns. In our solution, we need that string to be displayed in the grid which is computed out of 3 columns (name, firstname, shortname) of the selected dropdown row. Unfortunately, the grid uses the ValueMember property of the referenced editor component (an ID) instead of the DisplayMember property, so we would have to change our combobox-solution in a very unpleasant way. Is there another possibility to fix this?

2.)    To solve the problem described in 1.), we tried to set the gridcell-value to the desired string after a dropdown row has been selected by the user. This works, and everything seems to be fine until the user is pressing the dropdown button another time. In this moment, the initial value coming from the ValueMember-Property (an ID) is restored in the grid.

3.)    We tried to change the ValueMember-Property to one column used in the DisplayMember-String (a shortname). Unfortunately, when we press the dropdown button, the value which is restored according to the problem described in 2.) (in both cases ID and shortname) is not the one matching with the dropdown row we’ve selected before, but the one matching with one row above the selected. This should, however, be a problem which occurs due to our programming, for the value list we need for our workaround has no empty first row, our editor component, however, has.

  • 469350
    Offline posted

    Hi,

    I'm having trouble following the issue you are describing.What do you mean when you say "we want to use our own  combobox-solution as an editor component".

    What control are you referring to? What is custom about it?

    From the rest of your post, it sounds like you are using UltraCombo in a grid column. In that case, the ValueMember of the UltraCombo defines which column the grid will use as it's Value. The DisplayMember defines which value on the UltraCombo is used for the grid cell's DisplayText.

    What is the DataType of the column in the grid?