Exemplo n.º 1
0
        public HSGrid GetGid(string name)
        {
            HSGrid targetGrid = new HSGrid();

            foreach (HSGrid grid in _grids)
            {
                if (name == grid.Grid)
                {
                    targetGrid = grid;
                    break;
                }
            }

            return(targetGrid);
        }
Exemplo n.º 2
0
        public HSGridView(HSGrid hsGrid)
        {
            InitializeComponent();

            this._hsGrid  = hsGrid;
            this._columns = hsGrid.Columns;
            for (int i = 0, count = _columns.Count; i < count; i++)
            {
                _columnNameIndex[_columns[i].Name] = i;
            }

            this.AllowUserToAddRows          = false;
            this.AllowUserToDeleteRows       = false;
            this.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.AutoSize;

            AddColumns();

            this.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.DataGridView_CellContentClick);
        }