DataGridColumnStyle.ResetHeaderText Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Resets the HeaderText to its default value, null
.
public:
void ResetHeaderText();
public void ResetHeaderText ();
member this.ResetHeaderText : unit -> unit
Public Sub ResetHeaderText ()
Examples
The following code example demonstrates the use of this member.
private:
void SetHeaderText( Object^ /*sender*/, System::EventArgs^ /*e*/ )
{
// Set the HeaderText property.
myDataGridColumnStyle->HeaderText = "Emp ID";
myDataGrid->Invalidate();
}
void ResetHeaderText( Object^ /*sender*/, System::EventArgs^ /*e*/ )
{
// Reset the HeaderText property to its default value.
myDataGridColumnStyle->ResetHeaderText();
myDataGrid->Invalidate();
}
private void SetHeaderText(object sender, System.EventArgs e)
{
// Set the HeaderText property.
myDataGridColumnStyle.HeaderText = "Emp ID";
myDataGrid.Invalidate();
}
private void ResetHeaderText(object sender, System.EventArgs e)
{
// Reset the HeaderText property to its default value.
myDataGridColumnStyle.ResetHeaderText();
myDataGrid.Invalidate();
}
Private Sub SetHeaderText(ByVal sender As Object, ByVal e As EventArgs)
' Set the HeaderText property.
myDataGridColumnStyle.HeaderText = "Emp ID"
myDataGrid.Invalidate()
End Sub
Private Sub ResetHeaderText(ByVal sender As Object, ByVal e As EventArgs)
' Reset the HeaderText property to its default value.
myDataGridColumnStyle.ResetHeaderText()
myDataGrid.Invalidate()
End Sub
Remarks
You typically use this method if you are either creating a designer for the System.Windows.Forms.DataGrid, or creating your own control incorporating the System.Windows.Forms.DataGrid.
Applies to
שתף איתנו פעולה ב- GitHub
ניתן למצוא את המקור לתוכן זה ב- GitHub, שם ניתן גם ליצור ולסקור בעיות ולמשוך בקשות. לקבלת מידע נוסף, עיין במדריך התורמים שלנו.
משוב
https://aka.ms/ContentUserFeedback.
בקרוב: במהלך 2024, נפתור בעיות GitHub כמנגנון המשוב לתוכן ונחליף אותו במערכת משוב חדשה. לקבלת מידע נוסף, ראה:שלח והצג משוב עבור