Example #1
0
        private void PopulateAmenities()
        {
            dtAme = new DataTable();
            dtAme = ProjectInfoDL.SelectAmenities(i_CostCentreId, m_sType);
            grdAmenities.DataSource = dtAme;
            grdAmenitiesView.PopulateColumns();
            grdAmenitiesView.Columns["AmenityId"].Visible = false;
            grdAmenitiesView.Columns["AmenityName"].OptionsColumn.AllowEdit         = false;
            grdAmenitiesView.Columns["Sel"].AppearanceHeader.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Center;

            ChkEditAmenities.CheckedChanged += (sender, e) =>
            {
                if (Convert.ToBoolean(ChkEditAmenities.Editable) == true)
                {
                    ChkEditAmenities.ValueChecked = true;
                }
            };
            grdAmenitiesView.Appearance.HeaderPanel.Font      = new Font(grdAmenitiesView.Appearance.HeaderPanel.Font, FontStyle.Bold);
            grdAmenitiesView.Appearance.FocusedCell.BackColor = Color.Teal;
            grdAmenitiesView.Appearance.FocusedCell.ForeColor = Color.White;
            grdAmenitiesView.Appearance.FocusedRow.ForeColor  = Color.Teal;
            grdAmenitiesView.Appearance.FocusedRow.BackColor  = Color.White;

            grdAmenitiesView.OptionsSelection.EnableAppearanceHideSelection = false;
        }
Example #2
0
 public static DataTable SelectAmenities(int argCCID, string argType)
 {
     return(ProjectInfoDL.SelectAmenities(argCCID, argType));
 }