private void setCondition() { //绑定表数据 ASPxGridView1.DataSource = StationSubFactory.GetAll(); ASPxGridView1.DataBind(); }
private void setCondition() { //绑定表数据 List <StationSubEntity> allEntity = StationSubFactory.GetAll(); List <string> plines = new List <string>(); foreach (var p in allEntity) { if ((!plines.Contains(p.PLINE_CODE)) && (!string.IsNullOrWhiteSpace(p.PLINE_CODE))) { plines.Add(p.PLINE_CODE); } } ASPxGridView1.DataSource = allEntity; GridViewDataComboBoxColumn colPline = ASPxGridView1.Columns["PLINE_CODE"] as GridViewDataComboBoxColumn; List <ProductLineEntity> plineEntities = ProductLineFactory.GetByIDs(plines.ToArray()); colPline.PropertiesComboBox.DataSource = plineEntities; colPline.PropertiesComboBox.ValueField = "RMES_ID"; colPline.PropertiesComboBox.TextField = "PLINE_NAME"; ASPxGridView1.DataBind(); }