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:
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
Hello Helmut,
Thank you for contacting Infragistics Developer Support!
Can you attach your sample so we can run and debug it to see what may be happeing?
You can also see these docs for update to date info on using the value list or a combo as an editor for a column:
www.infragistics.com/.../wingrid-using-windropdown-inside-wingrid
www.infragistics.com/.../wingrid-using-wincomboeditor-inside-wingrid
thanks it worked. simply using the column that contains the foreign key worked