DataGridViewCell.GetInheritedStyle Methode
Definitie
Belangrijk
Bepaalde informatie heeft betrekking op een voorlopige productversie die aanzienlijk kan worden gewijzigd voordat deze wordt uitgebracht. Microsoft biedt geen enkele expliciete of impliciete garanties met betrekking tot de informatie die hier wordt verstrekt.
Hiermee wordt de stijl toegepast op de cel.
public:
virtual System::Windows::Forms::DataGridViewCellStyle ^ GetInheritedStyle(System::Windows::Forms::DataGridViewCellStyle ^ inheritedCellStyle, int rowIndex, bool includeColors);
public virtual System.Windows.Forms.DataGridViewCellStyle GetInheritedStyle(System.Windows.Forms.DataGridViewCellStyle inheritedCellStyle, int rowIndex, bool includeColors);
public virtual System.Windows.Forms.DataGridViewCellStyle GetInheritedStyle(System.Windows.Forms.DataGridViewCellStyle? inheritedCellStyle, int rowIndex, bool includeColors);
abstract member GetInheritedStyle : System.Windows.Forms.DataGridViewCellStyle * int * bool -> System.Windows.Forms.DataGridViewCellStyle
override this.GetInheritedStyle : System.Windows.Forms.DataGridViewCellStyle * int * bool -> System.Windows.Forms.DataGridViewCellStyle
Public Overridable Function GetInheritedStyle (inheritedCellStyle As DataGridViewCellStyle, rowIndex As Integer, includeColors As Boolean) As DataGridViewCellStyle
Parameters
- inheritedCellStyle
- DataGridViewCellStyle
Een DataGridViewCellStyle die moet worden gevuld met de overgenomen celstijl.
- rowIndex
- Int32
De index van de bovenliggende rij van de cel.
- includeColors
- Boolean
true overgenomen kleuren in de geretourneerde celstijl op te nemen; anders, false.
Retouren
Een DataGridViewCellStyle met de stijlinstellingen van de cel die is overgenomen van de bovenliggende rij, kolom en DataGridView.
Uitzonderingen
Er is geen gekoppelde DataGridViewcel.
– of –
ColumnIndex is kleiner dan 0, waarmee wordt aangegeven dat de cel een rijkopcel is.
rowIndex is kleiner dan 0 of groter dan of gelijk aan het aantal rijen in het bovenliggende DataGridViewitem.
Opmerkingen
Deze methode retourneert een DataGridViewCellStyle die de instellingen overneemt van de objecten van de DataGridViewCellStyle bovenliggende rij, kolom en DataGridView. Zie voor meer informatie Celstijlen in het Windows Forms DataGridView-besturingselement.