English 中文(简体)
Deva表达式 LookupEdit 不显示单元素, 而是从列表中删除
原标题:Devexpress LookupEdit drops down the list rather than displaying a single element

令我惊讶的是,Devamodes LookupEdit不断下降(播放列表,而不是仅仅显示默认的编辑值[一个元素] )。什么属性在干扰我?

以下是我如何设置属性的 :

lkTest.Properties.DataSource=MyDataSource;
        lkTest.Properties.ValueMember = "TypeID" ;
        lkTest.Properties.DisplayMember = "pType";
        lkTest.EditValue=1;

谢谢 谢谢

问题回答

您没有遗漏任何 < 强/ 强 > 。

这是 LookupEdit 的默认行为。 如果您只想显示仅显示显示成员列表, 那么您必须在 lookupEdit 中显示该特定列 。

要做到这一点, 在查找编辑中创建自定义列, 然后它只显示您创建的列, 如网格视图 。

first thing, 您何时使用 LookupEdit ?? ??

当您想要显示特定项目的细节时, 您可以使用它。 如果您想要像行为一样消耗组合框, 请使用 < code> ComboBoxEdit control

检查这些代码片段, 当我指定数据源和编辑值时, 它不会显示默认的下降 。

添加到网格视图时 。

lookupEdit = new RepositoryItemLookUpEdit();
lookupEdit.DataSource = dtResult;
lookupEdit.ValueMember = "Marks";
lookupEdit.DisplayMember = "Subject";        
gridView1.Columns[0].ColumnEdit = lookupEdit;

在表格: 上收看的LookUpEdit

lookUpEdit1.Properties.DataSource = dtResultType;
lookUpEdit1.Properties.ValueMember = "ID";
lookUpEdit1.Properties.DisplayMember = "ResultSubject";
lookUpEdit1.EditValue = 1;

Reference these links and Search result to get that what have you made wrong.
preferably i like you look at this - lookupedit editvalue after databinding

http://community.dev表达式.com/forums/t/95240.aspx" rel=“no follow'>在数据源位置改变时显示的LookupEdit 下调项目

如果您只想要在 LookupEdit 控件中有一列,请做以下操作:

lkTest.Properties.DataSource=MyDataSource;
lkTest.Properties.ValueMember = "TypeID" ;
lkTest.Properties.DisplayMember = "pType";
lkTest.EditValue=1;  
LookUpColumnInfoCollection colType = lkTest.Columns;
if (colType.VisibleCount == 0)
   colType.Add(new LookUpColumnInfo("TypeID", "Type"));
lkTest.BestFitMode = BestFitMode.BestFitResizePopup;

确保您的数据源 MyData 源来源 拥有等于 1 的类型ID

在手动设置编辑value后, 我遇到了同样的问题, 并用“ ClosePopup () ” 的方法给它打电话, 解决了这个问题 。





相关问题
How to do word wrap in a DevExpress TcxGrid?

I ve got a long line of text that would be a lot easier to view if it would just word wrap around multiple lines, but I can t seem to find the option for it. Does anyone know how to enable word-wrap ...

XtraPivotGrid dynamic dataset creation

I already have a dynamic XtraPivotGrid creation, but the table adapter and the dataset are 1(one) table specific. I want to be able to get data from a table specified by user, but I can t see a way of ...

WPF Devexpress ComboBoxEdit Items

i use devexpress comboBoxEdit component in my WPF app. I assign values for it like this: private void Users1_Load() { DataTable dtCat = SqlHelper.GetTable("base_UserCategory_Select", new string[] ...

WPF comboBoxEdit

i Have problem with WPF comboBoxEdit. I load values it it like this: comboBoxEdit1.ItemsSource = dtCat.DefaultView; Values are loaded, everything works good, but when i select some value from ...

How to get row index of the selected cell in WPF grid

Does anyone knows how to get row index of the selected cell in DevExpress WPF grid? In WinForms it was something like that: dataGridViewControll.SelectedCells[0].RowIndex;

Recommended ASP.NET Grid and UI tools [closed]

We are building a web application using C# and SQL server. We are thinking about buying the DevExpress ASP.NET controls. Anybody have any opinions about this tool or have any they would recommend?

TextBoxColumn in DevexpressGridControl (WPF)

In Windows grid is sucha a thing like DataGridViewTextBoxColumn col = new DataGridViewTextBoxColumn(); Is something like that in DevExpress GridControll for WPF?Or maybe is possible to do some ...

热门标签