저는 devexpressgridcontrol 있습니다. 그리드의 하나의 컬럼 인 repositoryLookUpEdit에서 사용하고 싶다. 데이터베이스 질문으로 repositoryLookUpEdit를 채 웁니다. 이 질문은 IdPerson, Name 및 IdCity의 세 열을 반환합니다. Colum : IdPerson과 Name에는 데이터가 있지만 IdCity는 appication으로 설정해야합니다.그리드의 Devexpress RespositoryLookUpEdit, 값 disaper
그래서 - gridcontrol의 열 Idcity에는 fildename : IdCity 및 columnEdit : repositoryLookUpEdit가 있습니다. - repositoryLookUpEdit에는 DisplayValue : CityName 및 ValueMember : IdCity가 있습니다.
그리고 내 질문은 :나는 도시의 한 행 값 그리드에서 선택하고 내가 다른 행, 첫 번째 행의 disaper의 값에 갈 때.
내가 뭘 잘못하고 있니? 조언 좀 해줄 수 있니?
나는 Devexpress 9.2를 사용합니다.
this.gvPerson = new DevExpress.XtraGrid.Views.Grid.GridView();
this.replueCity = new DevExpress.XtraEditors.Repository.RepositoryItemLookUpEdit();
this.replueCity.Columns.AddRange(new DevExpress.XtraEditors.Controls.LookUpColumnInfo[] { new DevExpress.XtraEditors.Controls.LookUpColumnInfo("IdCity", "IdCity", 20, DevExpress.Utils.FormatType.None, "", false, DevExpress.Utils.HorzAlignment.Default), new DevExpress.XtraEditors.Controls.LookUpColumnInfo("CityName", "CityName")});
this.replueCity.DisplayMember = "CityName";
this.replueCity.Name = "replueCity";
this.replueCity.NullText = "[Choose city]";
this.replueCity.TextEditStyle = DevExpress.XtraEditors.Controls.TextEditStyles.Standard;
this.replueOceny.ValueMember = "IdCity";
// CityColumn this.CityColumn.AppearanceCell.Options.UseTextOptions = true;
this.CityColumn.AppearanceCell.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Center;
this.CityColumn.AppearanceCell.TextOptions.VAlignment = DevExpress.Utils.VertAlignment.Center;
this.CityColumn.Caption = "Ocena";
this.CityColumn.ColumnEdit = this.replueCity;
this.CityColumn.FieldName = "IdCity";
this.CityColumn.Name = "IdCityName";
this.CityColumn.Visible = true;
세 가지 경우 모두 "IdCity"문자열을 확인하십시오. 정확하게 동일하게 작성해야합니다 (대문자를 유의하십시오!) –
확인하지만 작동하지 않습니다. – Jola
그런 다음 몇 가지 코드를 붙여 넣으십시오 ... –