Inheritance: System.EventArgs
Exemple #1
0
        /// <summary>
        /// Fired before some rows are removed
        /// </summary>
        /// <param name="e"></param>
        protected virtual void OnRowsRemoving(IndexRangeEventArgs e)
        {
            if (RowsRemoving != null)
            {
                RowsRemoving(this, e);
            }

            //Grid.OnRowsRemoving(e);
        }
Exemple #2
0
        /// <summary>
        /// Fired when some columns are removed
        /// </summary>
        /// <param name="e"></param>
        protected virtual void OnColumnsRemoved(IndexRangeEventArgs e)
        {
            if (ColumnsRemoved != null)
            {
                ColumnsRemoved(this, e);
            }

            ColumnsChanged();
        }
Exemple #3
0
        /// <summary>
        /// Fired when some rows are removed
        /// </summary>
        /// <param name="e"></param>
        protected virtual void OnRowsRemoved(IndexRangeEventArgs e)
        {
            if (RowsRemoved != null)
            {
                RowsRemoved(this, e);
            }

            RowsChanged();
        }
Exemple #4
0
        /// <summary>
        /// Fired before some columns are removed
        /// </summary>
        /// <param name="e"></param>
        protected virtual void OnColumnsRemoving(IndexRangeEventArgs e)
        {
            if (ColumnsRemoving != null)
            {
                ColumnsRemoving(this, e);
            }

            //Grid.OnColumnsRemoving(e);
        }
Exemple #5
0
        /// <summary>
        /// Remove the RowInfo at the specified positions
        /// </summary>
        /// <param name="p_StartIndex"></param>
        /// <param name="p_Count"></param>
        public void RemoveRange(int p_StartIndex, int p_Count)
        {
            if (IsValidRange(p_StartIndex, p_Count) == false)
            {
                throw new SourceGridException("Invalid index");
            }

            IndexRangeEventArgs eventArgs = new IndexRangeEventArgs(p_StartIndex, p_Count);

            OnRowsRemoving(eventArgs);

            m_List.RemoveRange(p_StartIndex, p_Count);

            OnRowsRemoved(eventArgs);

            PerformLayout();
        }
Exemple #6
0
        private void m_Columns_ColumnsRemoved(object sender, IndexRangeEventArgs e)
        {
            //N.B. Uso m_Cells.GetLength(0) anziche' RowsCount e
            // m_Cells.GetLength(1) anziche' ColumnsCount per essere sicuro di lavorare sulle righe effetivamente allocate

            for (int c = (e.StartIndex + e.Count); c < CellsCols; c++)
            {
                for (int r = 0; r < CellsRows; r++)
                {
                    Cells.ICell tmp = m_Cells[r, c];
                    RemoveCell(r, c);
                    InsertCell(r, c - e.Count, tmp);
                }
            }

            RedimCellsMatrix(CellsRows, CellsCols - e.Count);
        }
Exemple #7
0
        private void m_Columns_ColumnsAdded(object sender, IndexRangeEventArgs e)
        {
            //N.B. Uso m_Cells.GetLength(0) anziche' RowsCount e
            // m_Cells.GetLength(1) anziche' ColumnsCount per essere sicuro di lavorare sulle righe effetivamente allocate

            RedimCellsMatrix(CellsRows, CellsCols + e.Count);

            //dopo aver ridimensionato la matrice sposto le celle in modo da fare spazio alla nuove righe
            for (int c = CellsCols - 1; c > (e.StartIndex + e.Count - 1); c--)
            {
                for (int r = 0; r < CellsRows; r++)
                {
                    Cells.ICell tmp = m_Cells[r, c - e.Count];
                    RemoveCell(r, c - e.Count);
                    InsertCell(r, c, tmp);
                }
            }
        }
		/// <summary>
		/// Remove the ColumnInfo at the specified positions
		/// </summary>
		/// <param name="p_StartIndex"></param>
		/// <param name="p_Count"></param>
		public virtual void RemoveRange(int p_StartIndex, int p_Count)
		{
			if (IsValidRange(p_StartIndex, p_Count)==false)
				throw new SourceGridException("Invalid index");

			IndexRangeEventArgs eventArgs = new IndexRangeEventArgs(p_StartIndex, p_Count);
			OnColumnsRemoving(eventArgs);

			m_List.RemoveRange(p_StartIndex, p_Count);

			OnColumnsRemoved(eventArgs);

			PerformLayout();
		}
		/// <summary>
		/// Fired before some columns are removed
		/// </summary>
		/// <param name="e"></param>
		protected virtual void OnColumnsRemoving(IndexRangeEventArgs e)
		{
			if (ColumnsRemoving!=null)
				ColumnsRemoving(this, e);

			//Grid.OnColumnsRemoving(e);
		}
		/// <summary>
		/// Fired when some columns are removed
		/// </summary>
		/// <param name="e"></param>
		protected virtual void OnColumnsRemoved(IndexRangeEventArgs e)
		{
			if (ColumnsRemoved!=null)
				ColumnsRemoved(this, e);

			ColumnsChanged();
		}