RepositoryItemSearchLookUpEdit 怎么使用,怎么得到选择值 5
RepositoryItemSearchLookUpEditri=newRepositoryItemSearchLookUpEdit();GridColumngc=new...
RepositoryItemSearchLookUpEdit ri = new RepositoryItemSearchLookUpEdit();
GridColumn gc = new GridColumn();
ri.DataSource = ds.Tables["dep"];
ri.AutoHeight = false;
ri.DisplayMember = "部门";
ri.Name = "ri";
ri.ValueMember = "id";
GridView rv;
rv = new GridView();
rv.FocusRectStyle = DevExpress.XtraGrid.Views.Grid.DrawFocusRectStyle.RowFocus;
rv.Name = "repositoryItemSearchLookUpEdit1View";
rv.OptionsSelection.EnableAppearanceFocusedCell = false;
rv.OptionsView.ShowGroupPanel = false;
ri.View = rv;
// ri.View.Columns.View.Columns["id"].Visible = false;
ri.NullText = "";
gridView1.Columns.Add(gc);
gc.Caption = "所属部门";
gc.ColumnEdit = ri;
gc.ColumnEdit = ri;
gc.FieldName = "所属部门";
gc.Name = "gridColumn1";
gc.Visible = true;
gc.VisibleIndex = 0;
/////////////////////////////
ri.View.Columns["id"].Visible = false; //这个话报错,请高手指教这是怎么回事?
///////////////
ri.View.GetFocusedRowCellValue("id").ToString() //选择好需要的数据后,始终得不到需要的值,不知道怎么回事,请高手指教 展开
GridColumn gc = new GridColumn();
ri.DataSource = ds.Tables["dep"];
ri.AutoHeight = false;
ri.DisplayMember = "部门";
ri.Name = "ri";
ri.ValueMember = "id";
GridView rv;
rv = new GridView();
rv.FocusRectStyle = DevExpress.XtraGrid.Views.Grid.DrawFocusRectStyle.RowFocus;
rv.Name = "repositoryItemSearchLookUpEdit1View";
rv.OptionsSelection.EnableAppearanceFocusedCell = false;
rv.OptionsView.ShowGroupPanel = false;
ri.View = rv;
// ri.View.Columns.View.Columns["id"].Visible = false;
ri.NullText = "";
gridView1.Columns.Add(gc);
gc.Caption = "所属部门";
gc.ColumnEdit = ri;
gc.ColumnEdit = ri;
gc.FieldName = "所属部门";
gc.Name = "gridColumn1";
gc.Visible = true;
gc.VisibleIndex = 0;
/////////////////////////////
ri.View.Columns["id"].Visible = false; //这个话报错,请高手指教这是怎么回事?
///////////////
ri.View.GetFocusedRowCellValue("id").ToString() //选择好需要的数据后,始终得不到需要的值,不知道怎么回事,请高手指教 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询