當前位置: 首頁>>代碼示例>>C#>>正文


C# Forms.DataGridViewColumnEventArgs類代碼示例

本文整理匯總了C#中System.Windows.Forms.DataGridViewColumnEventArgs的典型用法代碼示例。如果您正苦於以下問題:C# DataGridViewColumnEventArgs類的具體用法?C# DataGridViewColumnEventArgs怎麽用?C# DataGridViewColumnEventArgs使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


DataGridViewColumnEventArgs類屬於System.Windows.Forms命名空間,在下文中一共展示了DataGridViewColumnEventArgs類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

示例1: keyDataGridView_ColumnAdded

 void keyDataGridView_ColumnAdded(object sender, DataGridViewColumnEventArgs e)
 {
     e.Column.AutoSizeMode = DataGridViewAutoSizeColumnMode.AllCells;
       if (e.Column.DataPropertyName == "Confirm" || e.Column.DataPropertyName == "Lifetime") {
     e.Column.Visible = false;
       }
 }
開發者ID:dlech,項目名稱:SshAgentLib,代碼行數:7,代碼來源:KeyPicker.cs

示例2: dataGridView_ColumnRemoved

 private void dataGridView_ColumnRemoved(object sender, DataGridViewColumnEventArgs e)
 {
     if ((e.Column != null) && !e.Column.IsDataBound)
     {
         e.Column.DisplayIndex = -1;
     }
 }
開發者ID:pritesh-mandowara-sp,項目名稱:DecompliedDotNetLibraries,代碼行數:7,代碼來源:DataGridViewDesigner.cs

示例3: OnColumnAdded

        protected override void OnColumnAdded(DataGridViewColumnEventArgs e)
        {
            base.OnColumnAdded(e);

            e.Column.HeaderCell.ContextMenuStrip = menuColumnHeader;
            MenuOpening(null, new CancelEventArgs());
        }
開發者ID:atan888,項目名稱:MMS,代碼行數:7,代碼來源:ExtendedDataGridView.ContextMenu.cs

示例4: dgv_ColumnWidthChanged

        private void dgv_ColumnWidthChanged(object sender, DataGridViewColumnEventArgs e)
        {
            int index = dgv.Columns.IndexOf(e.Column);
            if (index == -1)
                return;

            var col = _schema[index];
            col.Width = e.Column.Width;
        }
開發者ID:robpaveza,項目名稱:dbcexplorer,代碼行數:9,代碼來源:Form1.cs

示例5: AuditGridView_ColumnAdded

        //Makes the print column selectable, and keeps other columns readonly
        private void AuditGridView_ColumnAdded(object sender, DataGridViewColumnEventArgs e)
        {
            DataGridViewColumn column = e.Column;
            column.ReadOnly = true;
            if (column.Name == "print")
            {
                column.ReadOnly = false;
            }

        }
開發者ID:joe-williams-cccu,項目名稱:OSIRTv2,代碼行數:11,代碼來源:OsirtGridView.cs

示例6: connectionsDataGridView_ColumnDisplayIndexChanged

 private void connectionsDataGridView_ColumnDisplayIndexChanged(object sender, DataGridViewColumnEventArgs e)
 {
     if (!m_start)
     {
         m_Settings["connectionsIconIndex"] = connectionsDataGridView.Columns["Icon"].DisplayIndex.ToString();
         m_Settings["connectionsIPAddressIndex"] = connectionsDataGridView.Columns["IPAddress"].DisplayIndex.ToString();
         m_Settings["connectionsPortIndex"] = connectionsDataGridView.Columns["Port"].DisplayIndex.ToString();
         m_Settings["connectionsSentIndex"] = connectionsDataGridView.Columns["Sent"].DisplayIndex.ToString();
         m_Settings["connectionsReceivedIndex"] = connectionsDataGridView.Columns["Received"].DisplayIndex.ToString();
         m_Settings["connectionsSentCommandsIndex"] = connectionsDataGridView.Columns["SentCommands"].DisplayIndex.ToString();
         m_Settings["connectionsReceivedCommandsIndex"] = connectionsDataGridView.Columns["ReceivedCommands"].DisplayIndex.ToString();
         m_Settings["connectionsEnqueuedCommandsIndex"] = connectionsDataGridView.Columns["EnqueuedCommands"].DisplayIndex.ToString();
     }
 }
開發者ID:Steeslice,項目名稱:StealthNet-Alt,代碼行數:14,代碼來源:ConnectionsControl.cs

示例7: SpreadsheetView_ColumnWidthChanged

        void SpreadsheetView_ColumnWidthChanged(object sender, DataGridViewColumnEventArgs e)
        {
            int col = e.Column.Index;

            SpreadsheetModel model = spreadsheetModel;

            for (int i = 0; i < RowCount; i++)
            {
                Cell cell = model.Cells[i, col];

                if (cell == null)
                {
                    cell = new Cell();
                    model.Cells[i,col] = cell;
                }
                cell.CellFormat.CellWidth = this.Columns[col].Width;
            }
        }
開發者ID:nebenjamin,項目名稱:cpsc-431-project,代碼行數:18,代碼來源:SpreadsheetView.cs

示例8: ShipView_ColumnWidthChanged

        // 列のサイズ変更関連
        private void ShipView_ColumnWidthChanged( object sender, DataGridViewColumnEventArgs e )
        {
            if ( IsRowsUpdating )
                return;

            var group = CurrentGroup;
            if ( group != null ) {

                if ( !group.ViewColumns[e.Column.Name].AutoSize ) {
                    group.ViewColumns[e.Column.Name].Width = e.Column.Width;
                }
            }
        }
開發者ID:bllue78,項目名稱:ElectronicObserver,代碼行數:14,代碼來源:FormShipGroup.cs

示例9: ScannerViewColumnWidthChanged

 private void ScannerViewColumnWidthChanged(object sender, DataGridViewColumnEventArgs e)
 {
     ScannerViewUpdateHeaderCheckBoxPos();
 }
開發者ID:lkinsella,項目名稱:inSSIDer-2,代碼行數:4,代碼來源:ScannerView.cs

示例10: fDataPreview_ColumnWidthChanged

        private void fDataPreview_ColumnWidthChanged(object sender, DataGridViewColumnEventArgs e)
        {
            if (this.checkColumnsWidth && fDataPreview.Columns.Count > 0)
            {
                if (!this.justUpdated)
                {
                    int width = fDataPreview.Columns.GetColumnsWidth(DataGridViewElementStates.Visible);

                    if (width < 682)
                    {
                        this.justUpdated = true;
                        fDataPreview.Columns[fDataPreview.Columns.Count - 1].Width += 682 - width;
                    }
                }
                else
                {
                    this.justUpdated = false;
                }
            }
        }
開發者ID:Keeehi,項目名稱:Graunt,代碼行數:20,代碼來源:ImportCsvWindow.cs

示例11: DataGridView_ColumnSortModeChanged

 /// <summary>
 /// Throws an exception when the column sort mode is changed to Automatic.
 /// </summary>
 /// <param name="sender">The object that raised the event.</param>
 /// <param name="e">A DataGridViewColumnEventArgs that contains the event data.</param>
 private void DataGridView_ColumnSortModeChanged(object sender, DataGridViewColumnEventArgs e)
 {
     if (e.Column == OwningColumn &&
         e.Column.SortMode == DataGridViewColumnSortMode.Automatic)
     {
         throw new InvalidOperationException(
             "A SortMode value of Automatic is incompatible with " +
             "the DataGridViewAutoFilterColumnHeaderCell type. " +
             "Use the AutomaticSortingEnabled property instead.");
     }
 }
開發者ID:hol353,項目名稱:ApsimX,代碼行數:16,代碼來源:DataGridViewAutoFilterColumnHeaderCell.cs

示例12: dgvcallups_ColumnAdded

        private void dgvcallups_ColumnAdded(object sender, DataGridViewColumnEventArgs e)
        {


            //if (e.Column.Index == 9)
            //{
            //    _coladded = true;

            //    dgvcallups.Rows[_newAddedRowIndex].Cells[1].Value = " ";
            //    dgvcallups.Rows[_newAddedRowIndex].Cells[2].Value = " ";
            //    dgvcallups.Rows[_newAddedRowIndex].Cells[3].Value = " ";
            //    dgvcallups.Rows[_newAddedRowIndex].Cells[4].Value = " ";
            //    dgvcallups.Rows[_newAddedRowIndex].Cells[5].Value = false;
            //    dgvcallups.Rows[_newAddedRowIndex].Cells[6].Value = false;
            //    dgvcallups.Rows[_newAddedRowIndex].Cells[7].Value = false;
            //    dgvcallups.Rows[_newAddedRowIndex].Cells[8].Value = "";
            //    dgvcallups.Rows[_newAddedRowIndex].Cells[9].Value = true;

            //    dgvcallups.RefreshEdit();
            //    dgvcallups.Refresh();


            //}
        }
開發者ID:handsknight,項目名稱:rns,代碼行數:24,代碼來源:frmdatabase2.cs

示例13: OnColumnRemoved

		protected virtual void OnColumnRemoved (DataGridViewColumnEventArgs e)
		{
			DataGridViewColumnEventHandler eh = (DataGridViewColumnEventHandler)(Events [ColumnRemovedEvent]);
			if (eh != null)
				eh (this, e);
		}
開發者ID:vnan122,項目名稱:mono,代碼行數:6,代碼來源:DataGridView.cs

示例14: OnColumnWidthChanged

		/// ------------------------------------------------------------------------------------
		/// <summary>
		/// Raises the <see cref="E:System.Windows.Forms.DataGridView.ColumnWidthChanged"/>
		/// event.
		/// </summary>
		/// <param name="e">A <see cref="T:System.Windows.Forms.DataGridViewColumnEventArgs"/>
		/// that contains the event data.</param>
		/// <exception cref="T:System.ArgumentException">The column indicated by the
		/// <see cref="P:System.Windows.Forms.DataGridViewColumnEventArgs.Column"/> property of
		/// e does not belong to this <see cref="T:System.Windows.Forms.DataGridView"></see>
		/// control.</exception>
		/// ------------------------------------------------------------------------------------
		protected override void OnColumnWidthChanged(DataGridViewColumnEventArgs e)
		{
			base.OnColumnWidthChanged(e);

			if (e.Column.Width == DataGridViewControlColumn.kMinimumValue && m_fFullyInitialized &&
				((DataGridViewControlColumn)e.Column).IsCollapsible)
			{
				// user dragged the divider all the way to the left, so we will hide the column
				m_ColumnsAndRowsToHide.Add(e.Column);
			}
		}
開發者ID:bbriggs,項目名稱:FieldWorks,代碼行數:23,代碼來源:CollapsibleDataGridView.cs

示例15: dataGridViewHeader_ColumnWidthChanged

 /*************************************************************
  * データグリッドビュー(ヘッダー)の列幅変更に伴う処理
  *************************************************************/
 private new void dataGridViewHeader_ColumnWidthChanged(object sender, DataGridViewColumnEventArgs e)
 {
     base.DataGridView = this.dataGridView;
     base.DataGridViewTotal = this.dataGridViewTotal;
     base.DataGridViewHeader = this.dataGridViewHeader;
     base.dataGridViewHeader_ColumnWidthChanged(sender, e);
 }
開發者ID:takashi0419,項目名稱:CostAccounting,代碼行數:10,代碼來源:Form_CostMng_ActualTotal.cs


注:本文中的System.Windows.Forms.DataGridViewColumnEventArgs類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。