user975869
user975869

Reputation: 285

DevExpress Xpf how to add a LookUpEdit to a gridColumn in code

I've got code in WinForms which i need to convert to WPF DevExpress.

I need to create LookUpEdit in code and add it to a created gridColumn.

The code in winforms:

var editor = (RepositoryItemLookUpEdit) gridControl.RepositoryItems.Add("LookUpEdit");

editor.DataSource = CreateList(query);

for (int i = 0; i < ... < ....Count; i++)
                {
                    var columnInfo = new LookUpColumnInfo(parentTableColumns[i].Name)
                        {SortOrder = ColumnSortOrder.Ascending};
                    editor.Columns.Add(columnInfo);
                }

editor.BestFitMode = BestFitMode.BestFitResizePopup;

gridColumn.ColumnEdit = editor;
gridColumn.FilterMode = ColumnFilterMode.DisplayText;

RepositoryItemLookUpEdit, LookUpColumnInfo does not exist in Xpf not winforms, how do i do exact things in DevExpress WPF ?

Upvotes: 0

Views: 4677

Answers (1)

Dimitris Aimiliou
Dimitris Aimiliou

Reputation: 29

I was searching for almost the same thing and i found this link giving some information about my case . I added a sample project and the Dev express support edit it to help me implement the lookUpEdit in grid Column . the Solution is not perfect yet (for me ) but maybe your case is simpler and this is you solution .

the link to dev express page Grid and LookupEditSettings

Upvotes: 2

Related Questions