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
30
Wingrid > implement a kind of combobox or dropdown to select values for a column representing objects from a datasource
posted

Hi!

Ive been trying to implement this with my ntities:

http://devcenter.infragistics.com/Support/KnowledgeBaseArticle.aspx?ArticleID=7841

For having "add item 1", "add item 2" for the value list I want to use a already populated list of objects that are of the same type as the field the column is representing.

Theres a few ways ive tried (with a combobox, a dropdown list and a comboeditor wich idk how top assign at all)

The best i could do was to get the data with the dropdown:

dropdown in list with censored name for dataprotection

This seems like it would work but after selecting an entry it writes the display name into the grid cell (wich seems to be good since it shows that it has selected the entry) but after i leave the cell it breaks:

The grid has as datasource a bdingin list of "Visitor" wich works well. (add update delete...)

theres the property contactID of type int and the property Contact of type contact on the Visitor.

I setup everything for the combolist like this:

this in the OnLoad:

        this.mitarbeiterADDataMainViewModelUltraDropDown.SetDataBinding(Contacts, null);
            this.mitarbeiterADDataMainViewModelUltraDropDown.ValueMember = nameof(MitarbeiterADDataMainViewModel.ID);
            this.mitarbeiterADDataMainViewModelUltraDropDown.DisplayMember = nameof(MitarbeiterADDataMainViewModel.DisplayName);

the Contacts is a List of Contact that gets populated in the constructor of the from

and in the grid initialize layout i do this:

            e.Layout.Bands[0].Columns["Kontakt"].ValueList = this.mitarbeiterADDataMainViewModelUltraDropDown;

I tried various variations with dropdown, and comboeditor, the uselistobjectasvalue constant and so on. im out of ideas.

I also tried with various settings like changing the style to different "dropdown" values or item matching mode to disallow convert data value but without any positive effect.

This should be very much more straight forward and the error message is sadly not really helpful in this case (except that it tells me that the thing tries to convert the simple name to the object wich only tells me that selecting an objectvalue does somehow not really work like that....)

im using infragistics 19.1.20191.82

Parents Reply Children
No Data