|
Este artigo foi traduzido por máquina. Coloque o ponteiro do mouse sobre as frases do artigo para ver o texto original. Mais informações.
|
Tradução
Original
|
Classe DataGridViewColumnCollection
.NET Framework 4
System.Object
System.MarshalByRefObject
System.Windows.Forms.BaseCollection
System.Windows.Forms.DataGridViewColumnCollection
System.MarshalByRefObject
System.Windows.Forms.BaseCollection
System.Windows.Forms.DataGridViewColumnCollection
Assembly: System.Windows.Forms (em System.Windows.Forms.dll)
O tipo DataGridViewColumnCollection expõe os membros a seguir.
| Nome | Descrição | |
|---|---|---|
![]() | DataGridViewColumnCollection |
| Nome | Descrição | |
|---|---|---|
![]() | Count | |
![]() | DataGridView | |
![]() | IsReadOnly | |
![]() | IsSynchronized | |
![]() | Item[Int32] | |
![]() | Item[String] | |
![]() | List | |
![]() | SyncRoot |
| Nome | Descrição | |
|---|---|---|
![]() | Add(DataGridViewColumn) | |
![]() | Add(String, String) | |
![]() | AddRange | |
![]() | Clear | |
![]() | Contains(DataGridViewColumn) | |
![]() | Contains(String) | |
![]() | CopyTo(Array, Int32) | |
![]() | CopyTo(DataGridViewColumn[], Int32) | |
![]() | CreateObjRef | |
![]() | Equals(Object) | |
![]() | Finalize | |
![]() | GetColumnCount | |
![]() | GetColumnsWidth | |
![]() | GetEnumerator | |
![]() | GetFirstColumn(DataGridViewElementStates) | |
![]() | GetFirstColumn(DataGridViewElementStates, DataGridViewElementStates) | |
![]() | GetHashCode | |
![]() | GetLastColumn | |
![]() | GetLifetimeService | |
![]() | GetNextColumn | |
![]() | GetPreviousColumn | |
![]() | GetType | |
![]() | IndexOf | |
![]() | InitializeLifetimeService | |
![]() | Insert | |
![]() | MemberwiseClone() | |
![]() | MemberwiseClone(Boolean) | |
![]() | OnCollectionChanged | |
![]() | Remove(DataGridViewColumn) | |
![]() | Remove(String) | |
![]() | RemoveAt | |
![]() | ToString |
| Nome | Descrição | |
|---|---|---|
![]() | AsParallel | |
![]() | AsQueryable | |
![]() | Cast<TResult> | |
![]() | OfType<TResult> |
| Nome | Descrição | |
|---|---|---|
![]() ![]() | ICollection.CopyTo | Infraestrutura. |
![]() ![]() | ICollection.Count | Infraestrutura. |
![]() ![]() | ICollection.IsSynchronized | Infraestrutura. |
![]() ![]() | ICollection.SyncRoot | Infraestrutura. |
![]() ![]() | IEnumerable.GetEnumerator | Infraestrutura. |
![]() ![]() | IList.Add | Infraestrutura. |
![]() ![]() | IList.Clear | Infraestrutura. |
![]() ![]() | IList.Contains | Infraestrutura. |
![]() ![]() | IList.IndexOf | Infraestrutura. |
![]() ![]() | IList.Insert | Infraestrutura. |
![]() ![]() | IList.IsFixedSize | Infraestrutura. |
![]() ![]() | IList.IsReadOnly | Infraestrutura. |
![]() ![]() | IList.Item | Infraestrutura. |
![]() ![]() | IList.Remove | Infraestrutura. |
![]() ![]() | IList.RemoveAt | Infraestrutura. |
private DataGridView dataGridView1 = new DataGridView(); private void AddColorColumn() { DataGridViewComboBoxColumn comboBoxColumn = new DataGridViewComboBoxColumn(); comboBoxColumn.Items.AddRange( Color.Red, Color.Yellow, Color.Green, Color.Blue); comboBoxColumn.ValueType = typeof(Color); dataGridView1.Columns.Add(comboBoxColumn); dataGridView1.EditingControlShowing += new DataGridViewEditingControlShowingEventHandler( dataGridView1_EditingControlShowing); } private void dataGridView1_EditingControlShowing(object sender, DataGridViewEditingControlShowingEventArgs e) { ComboBox combo = e.Control as ComboBox; if (combo != null) { // Remove an existing event-handler, if present, to avoid // adding multiple handlers when the editing control is reused. combo.SelectedIndexChanged -= new EventHandler(ComboBox_SelectedIndexChanged); // Add the event handler. combo.SelectedIndexChanged += new EventHandler(ComboBox_SelectedIndexChanged); } } private void ComboBox_SelectedIndexChanged(object sender, EventArgs e) { ((ComboBox)sender).BackColor = (Color)((ComboBox)sender).SelectedItem; }
Windows 7, Windows Vista SP1 ou posterior, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (Server Core não compatível), Windows Server 2008 R2 (Server Core não compatível com SP1 ou posterior), Windows Server 2003 SP2
O .NET Framework não oferece suporte a todas as versões de cada plataforma. Para obter uma lista das versões com suporte, consulte Requisitos de sistema do .NET Framework.

