protected void grid_HtmlDataCellPrepared(object sender, ASPxGridViewTableDataCellEventArgs e)
 {
     if (e.DataColumn.FieldName == "empid")
     {
         ASPxLabel lblEmp = grid.FindRowCellTemplateControl(e.VisibleIndex, e.DataColumn, "lblEmp") as ASPxLabel;
         if (objEmployees.GetEmployees(Int32.Parse(e.CellValue.ToString())) != null)
         {
             lblEmp.Text = objEmployees.GetEmployees(Int32.Parse(e.CellValue.ToString())).fullname;
         }
     }
     if (e.DataColumn.FieldName == "officeid")
     {
         Philip.Modules.Office.OfficeController objOffice = new Philip.Modules.Office.OfficeController();
         ASPxLabel lblOffice = grid.FindRowCellTemplateControl(e.VisibleIndex, e.DataColumn, "lblOffice") as ASPxLabel;
         if (objOffice.GetOffice(Int32.Parse(e.CellValue.ToString())) != null)
         {
             lblOffice.Text = objOffice.GetOffice(Int32.Parse(e.CellValue.ToString())).name;
         }
     }
     if (e.DataColumn.FieldName == "statemanagementid")
     {
         VNPT.Modules.StateManagement.StateManagementController objSate = new VNPT.Modules.StateManagement.StateManagementController();
         ASPxLabel lblState = grid.FindRowCellTemplateControl(e.VisibleIndex, e.DataColumn, "lblState") as ASPxLabel;
         if (objSate.GetStateManagement(Int32.Parse(e.CellValue.ToString())) != null)
         {
             lblState.Text = objSate.GetStateManagement(Int32.Parse(e.CellValue.ToString())).name;
         }
     }
 }
        protected void cboOffice_Load(object sender, System.EventArgs e)
        {
            ASPxComboBox cboOffice = sender as ASPxComboBox;

            Philip.Modules.Office.OfficeController objOffice = new Philip.Modules.Office.OfficeController();
            cboOffice.Items.Clear();
            foreach (Philip.Modules.Office.OfficeInfo p in objOffice.GetOffices(0))
            {
                cboOffice.Items.Add(new DevExpress.Web.ASPxEditors.ListEditItem(p.name, p.id.ToString()));
            }

            if (GetText("officeid") != null && GetText("officeid").Trim() != "")
            {
                int          id   = Int32.Parse(GetText("officeid"));
                ListEditItem item = cboOffice.Items.FindByValue(id.ToString().Trim());
                if (item != null)
                {
                    item.Selected = true;
                }
            }
        }