DataGridViewCellStyle.Alignment Property
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.
Gets or sets a value indicating the position of the cell content within a DataGridView cell.
public:
property System::Windows::Forms::DataGridViewContentAlignment Alignment { System::Windows::Forms::DataGridViewContentAlignment get(); void set(System::Windows::Forms::DataGridViewContentAlignment value); };
public System.Windows.Forms.DataGridViewContentAlignment Alignment { get; set; }
member this.Alignment : System.Windows.Forms.DataGridViewContentAlignment with get, set
Public Property Alignment As DataGridViewContentAlignment
Property Value
One of the DataGridViewContentAlignment values. The default is NotSet.
Exceptions
The property value is not a valid DataGridViewContentAlignment value.
Examples
The following code example illustrates the use of this property.
this.dataGridView1.Columns["CustomerName"].DefaultCellStyle
.Alignment = DataGridViewContentAlignment.MiddleRight;
Me.dataGridView1.Columns("CustomerName").DefaultCellStyle _
.Alignment = DataGridViewContentAlignment.MiddleRight
Applies to
See also
שתף איתנו פעולה ב- GitHub
ניתן למצוא את המקור לתוכן זה ב- GitHub, שם ניתן גם ליצור ולסקור בעיות ולמשוך בקשות. לקבלת מידע נוסף, עיין במדריך התורמים שלנו.