

| Type | Description | |||
| AlignmentEnum | An AlignmentEnum expression that indicates the column's alignment. |
Use the Alignment property to align cells in a column.By default the column is left aligned. Use the Alignment property to change the column's alignment. Use the HeaderAlignment property to align the column's caption inside the column's header. By default, all columns are aligned to left. If the column displays the hierarchy lines, and if the Alignment property is RightAlignment the hierarchy lines are painted from right to left side. Use the HasLines property to display the control's hierarchy lines. Use the CellHAlignment property to align a particular cell. Use the HeaderImageAlignment property to align the image in the column's header, if it exists. Use the HeaderImage property to attach an icon to the column's header. Use the Def( exCellDrawPartsOrder) property to specify the order of the drawing parts inside the cell. The RightToLeft property automatically flips the order of the columns.
The following VB sample shows how you can display the cell's check box after the text:With Grid1
With .Columns.Add("Column")
.Def(exCellHasCheckBox) = True
.Def(exCellDrawPartsOrder) = "caption,check"
End With
With .Items
.CellHasCheckBox(.AddItem("Caption 1"),0) = True
.CellHasCheckBox(.AddItem("Caption 2"),0) = True
End With
End With
The following VB.NET sample shows how you can display the cell's check box after the text:
With AxGrid1
With .Columns.Add("Column")
.Def(EXGRIDLib.DefColumnEnum.exCellHasCheckBox) = True
.Def(EXGRIDLib.DefColumnEnum.exCellDrawPartsOrder) = "caption,check"
End With
With .Items
.CellHasCheckBox(.AddItem("Caption 1"),0) = True
.CellHasCheckBox(.AddItem("Caption 2"),0) = True
End With
End With
The following C++ sample shows how you can display the cell's check box after the text:
/*
Copy and paste the following directives to your header file as
it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library'
#import <ExGrid.dll>
using namespace EXGRIDLib;
*/
EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
EXGRIDLib::IColumnPtr var_Column = ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Column")));
var_Column->PutDef(EXGRIDLib::exCellHasCheckBox,VARIANT_TRUE);
var_Column->PutDef(EXGRIDLib::exCellDrawPartsOrder,"caption,check");
EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems();
var_Items->PutCellHasCheckBox(var_Items->AddItem("Caption 1"),long(0),VARIANT_TRUE);
var_Items->PutCellHasCheckBox(var_Items->AddItem("Caption 2"),long(0),VARIANT_TRUE);
The following C# sample shows how you can display the cell's check box after the text:
EXGRIDLib.Column var_Column = (axGrid1.Columns.Add("Column") as EXGRIDLib.Column);
var_Column.set_Def(EXGRIDLib.DefColumnEnum.exCellHasCheckBox,true);
var_Column.set_Def(EXGRIDLib.DefColumnEnum.exCellDrawPartsOrder,"caption,check");
EXGRIDLib.Items var_Items = axGrid1.Items;
var_Items.set_CellHasCheckBox(var_Items.AddItem("Caption 1"),0,true);
var_Items.set_CellHasCheckBox(var_Items.AddItem("Caption 2"),0,true);
The following VFP sample shows how you can display the cell's check box after the text:
with thisform.Grid1
with .Columns.Add("Column")
.Def(0) = .T.
.Def(34) = "caption,check"
endwith
with .Items
.DefaultItem = .AddItem("Caption 1")
.CellHasCheckBox(0,0) = .T.
.DefaultItem = .AddItem("Caption 2")
.CellHasCheckBox(0,0) = .T.
endwith
endwith
The following Delphi sample shows how you can display the cell's check box after the text:
with AxGrid1 do
begin
with (Columns.Add('Column') as EXGRIDLib.Column) do
begin
Def[EXGRIDLib.DefColumnEnum.exCellHasCheckBox] := TObject(True);
Def[EXGRIDLib.DefColumnEnum.exCellDrawPartsOrder] := 'caption,check';
end;
with Items do
begin
CellHasCheckBox[TObject(AddItem('Caption 1')),TObject(0)] := True;
CellHasCheckBox[TObject(AddItem('Caption 2')),TObject(0)] := True;
end;
end