我有一个网格,其中一个单元格是RepositoryItemGridLookUpEdit和datasource。当我从RepositoryItemGridLookUpEdit中选择项目,然后从行中丢失焦点(例如,通过在其他行上单击鼠标),然后将鼠标悬停在已更改的行上 - 使用RepositoryItemGridLookUpEdit的单元格中的值消失并显示“Value is empty”。但是当我再次点击该行时,会出现值。知道如何阻止消失吗?
GridLookUpEdit glue = new GridLookUpEdit();
glue.Properties.TextEditStyle = DevExpress.XtraEditors.Controls.TextEditStyles.Standard;
MyGridLookupDataSourceHelper(glue.Properties, GetMaterialyDataView(), "Kod", "Kod");
elementsEditThings.gvView.Columns[ColName].ColumnEdit = glue.Properties;
public MyGridLookupDataSourceHelper(RepositoryItemGridLookUpEdit edit, ITypedList dataSource, string displayMember, string valueMember)
{
this.edit = edit;
edit.DataSource = dataSource;
edit.DisplayMember = displayMember;
edit.ValueMember = valueMember;
edit.ProcessNewValue += edit_ProcessNewValue;
}
public MyGridLookupDataSourceHelper(RepositoryItemGridLookUpEdit edit, ITypedList dataSource, string displayMember, string valueMember)
{
this.edit = edit;
edit.DataSource = dataSource;
edit.DisplayMember = displayMember;
edit.ValueMember = valueMember;
edit.ProcessNewValue += edit_ProcessNewValue;
}
// DONE我将GridLookUpEdit更改为RepositoryItemGridLookUpEdit,现在它可以正常工作。
答案 0 :(得分:1)
RepositoryItemLookUpEdit类包含特定于的设置 GridLookUpEdit控件。您可以通过编辑器访问这些设置 GridLookUpEdit.Properties对象。请参阅GridLookUpEdit主题 有关控制的详细信息。
您只需要将存储库项创建为独立对象 为容器控件指定inplace编辑器(例如XtraGrid, XtraTreeList等)
devexpress GridLookUpEdit into RepositoryItemGridLookUpEdit, or GridLookUpEdit into column cell