/// <summary> /// /// </summary> /// <returns></returns> List <EntityPatUpload> GetLstRowObject() { List <EntityPatUpload> data = new List <EntityPatUpload>(); EntityPatUpload vo = null; string value = string.Empty; int[] rownumber = this.gvData.GetSelectedRows();//获取选中行号; for (int i = 0; i < rownumber.Length; i++) { vo = gvData.GetRow(rownumber[i]) as EntityPatUpload; data.Add(vo); } return(data); }
private void gvData_RowCellStyle(object sender, DevExpress.XtraGrid.Views.Grid.RowCellStyleEventArgs e) { if (e.Column == this.gvData.FocusedColumn && e.RowHandle == this.gvData.FocusedRowHandle) { e.Appearance.BackColor = Color.FromArgb(251, 165, 8); e.Appearance.BackColor2 = Color.White; } int hand = e.RowHandle; if (hand < 0) { return; } EntityPatUpload vo = this.gvData.GetRow(hand) as EntityPatUpload; if (vo.SZ == "已上传") { e.Appearance.ForeColor = Color.FromArgb(0, 0, 156); } this.gvData.Invalidate(); }