本文整理汇总了C#中System.Windows.Forms.DataGridViewColumnEventArgs类的典型用法代码示例。如果您正苦于以下问题:C# DataGridViewColumnEventArgs类的具体用法?C# DataGridViewColumnEventArgs怎么用?C# DataGridViewColumnEventArgs使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
DataGridViewColumnEventArgs类属于System.Windows.Forms命名空间,在下文中一共展示了DataGridViewColumnEventArgs类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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
示例16: OnColumnPreRemovedInternal
internal void OnColumnPreRemovedInternal (DataGridViewColumnEventArgs e)
{
// The removed column should be removed from the selection too.
if (selected_columns != null)
SetSelectedColumnCore (e.Column.Index, false);
if (Columns.Count - 1 == 0) {
MoveCurrentCell (-1, -1, true, false, false, true);
rows.ClearInternal ();
} else if (currentCell != null && CurrentCell.ColumnIndex == e.Column.Index) {
int nextColumnIndex = e.Column.Index;
if (nextColumnIndex >= Columns.Count - 1)
nextColumnIndex = Columns.Count - 1 - 1;
MoveCurrentCell (nextColumnIndex, currentCell.RowIndex, true, false, false, true);
if (hover_cell != null && hover_cell.ColumnIndex >= e.Column.Index)
hover_cell = null;
}
}
开发者ID:vnan122,项目名称:mono,代码行数:18,代码来源:DataGridView.cs
示例17: OnColumnPostRemovedInternal
private void OnColumnPostRemovedInternal (DataGridViewColumnEventArgs e)
{
if (e.Column.CellTemplate != null) {
int index = e.Column.Index;
foreach (DataGridViewRow row in Rows)
row.Cells.RemoveAt (index);
}
AutoResizeColumnsInternal ();
PrepareEditingRow (false, true);
OnColumnRemoved (e);
}
开发者ID:vnan122,项目名称:mono,代码行数:14,代码来源:DataGridView.cs
示例18: dgv_ColumnWidthChanged
/// <summary>
/// 当改变dataGridView的列宽时,合计的列宽也跟随改变
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
void dgv_ColumnWidthChanged(object sender, DataGridViewColumnEventArgs e)
{
this.dgv.HorizontalScrollingOffset = this.dgvSum.HorizontalScrollingOffset;
this.dgvSum.Columns[e.Column.Index].Width = e.Column.Width;
//if (IsShowScroll(this.dgvSum))
//{
// //if (this.dgvSum.Height != ROW_HEIGHT + 20)
// //this.dgvSum.Height = ROW_HEIGHT + 20;
// this.dgv.Height -= 20;
//}
//else
//{
// //if (this.dgvSum.Height != ROW_HEIGHT)
// //this.dgvSum.Height = ROW_HEIGHT;
// this.dgv.Height += 20;
//}
SetDataGridViewLocation();
}
开发者ID:caocf,项目名称:workspace-kepler,代码行数:23,代码来源:DataGridViewTotal.cs
示例19: OnColumnWidthChanged
protected internal virtual void OnColumnWidthChanged (DataGridViewColumnEventArgs e)
{
DataGridViewColumnEventHandler eh = (DataGridViewColumnEventHandler)(Events [ColumnWidthChangedEvent]);
if (eh != null)
eh (this, e);
}
开发者ID:vnan122,项目名称:mono,代码行数:6,代码来源:DataGridView.cs
示例20: dgv_ColumnDisplayIndexChanged
/// <summary>
/// 当DataGridView的列顺序改变时,同时改变合计行的列序号
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
void dgv_ColumnDisplayIndexChanged(object sender, DataGridViewColumnEventArgs e)
{
if (this.dgv.Columns.Count != dgvSum.Columns.Count)
return;
this.dgvSum.Columns[e.Column.Index].DisplayIndex = e.Column.DisplayIndex;
}
开发者ID:caocf,项目名称:workspace-kepler,代码行数:11,代码来源:DataGridViewTotal.cs
注:本文中的System.Windows.Forms.DataGridViewColumnEventArgs类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论