protected void listChiTiet_HtmlDataCellPrepared(object sender, DevExpress.Web.ASPxGridView.ASPxGridViewTableDataCellEventArgs e) { if (e.DataColumn.FieldName == "positionid") { ASPxLabel lblChucVu = listChiTiet.FindRowCellTemplateControl(e.VisibleIndex, e.DataColumn, "lblCV") as ASPxLabel; { VNPT.Modules.Position.PositionController objPosition = new VNPT.Modules.Position.PositionController(); if (e.CellValue != null) { position = objPosition.GetPosition(Int32.Parse(e.CellValue.ToString())); if (position != null) { if (lblChucVu != null) { lblChucVu.Text = position.name; } } } } } if (e.DataColumn.FieldName == "unitid") { ASPxLabel lbldonVi = listChiTiet.FindRowCellTemplateControl(e.VisibleIndex, e.DataColumn, "lblDV") as ASPxLabel; { if (e.CellValue != null) { unit = objUnit.GetUnit(Int32.Parse(e.CellValue.ToString())); if (unit != null) { if (lbldonVi != null) { UnitInfo parentUnit = objUnit.GetUnit(unit.parentid); lbldonVi.Text = unit.name + " -- " + parentUnit.name; } } } } } }