DataGridViewCell.GetInheritedStyle Metod
Definition
Viktigt
En del information gäller för förhandsversionen av en produkt och kan komma att ändras avsevärt innan produkten blir allmänt tillgänglig. Microsoft lämnar inga garantier, uttryckliga eller underförstådda, avseende informationen som visas här.
Hämtar formatet som tillämpas på cellen.
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
Parametrar
- inheritedCellStyle
- DataGridViewCellStyle
A DataGridViewCellStyle som ska fyllas i med det ärvda cellformatet.
- rowIndex
- Int32
Indexet för cellens överordnade rad.
- includeColors
- Boolean
trueför att inkludera ärvda färger i det returnerade cellformatet; annars . false
Returer
A DataGridViewCellStyle som innehåller formatinställningarna för cellen som ärvts från cellens överordnade rad, kolumn och DataGridView.
Undantag
Cellen har ingen associerad DataGridView.
-eller-
ColumnIndex är mindre än 0, vilket indikerar att cellen är en radrubrikcell.
rowIndex är mindre än 0 eller större än eller lika med antalet rader i den överordnade DataGridView.
Kommentarer
Den här metoden returnerar en DataGridViewCellStyle som ärver inställningarna från objekten i DataGridViewCellStyle cellens överordnade rad, kolumn och DataGridView. Mer information finns i cellstilar i Windows Forms DataGridView Control.