1011:
I have a column right-aligned. How can I display its check box aligned to the right, as it appears to the left of the cell's caption

Procedure OnCreate
	Forward Send OnCreate
	Send ComBeginUpdate
	Set ComColumnAutoResize to True
	Set ComDrawGridLines to OLEexVLines
	Variant voColumns
	Get ComColumns to voColumns
	Handle hoColumns
	Get Create (RefClass(cComColumns)) to hoColumns
	Set pvComObject of hoColumns to voColumns
		Variant voColumn
		Get ComAdd of hoColumns "Left" to voColumn
		Handle hoColumn
		Get Create (RefClass(cComColumn)) to hoColumn
		Set pvComObject of hoColumn to voColumn
			Set ComAllowSizing of hoColumn to False
			Set ComWidth of hoColumn to 96
			Set ComDef of hoColumn OLEexCellHasCheckBox to True
			Set ComFormatColumn of hoColumn to "0 pos `A-Z`"
		Send Destroy to hoColumn
		Variant voColumn1
		Get ComAdd of hoColumns "Center" to voColumn1
		Handle hoColumn1
		Get Create (RefClass(cComColumn)) to hoColumn1
		Set pvComObject of hoColumn1 to voColumn1
			Set ComHeaderAlignment of hoColumn1 to OLECenterAlignment
			Set ComAlignment of hoColumn1 to (ComHeaderAlignment(hoColumn1))
			Set ComAllowSizing of hoColumn1 to False
			Set ComWidth of hoColumn1 to 96
			Set ComDef of hoColumn1 OLEexCellHasCheckBox to True
			Set ComFormatColumn of hoColumn1 to "0 pos `A-Z`"
		Send Destroy to hoColumn1
		Variant voColumn2
		Get ComAdd of hoColumns "Right" to voColumn2
		Handle hoColumn2
		Get Create (RefClass(cComColumn)) to hoColumn2
		Set pvComObject of hoColumn2 to voColumn2
			Set ComHeaderAlignment of hoColumn2 to OLERightAlignment
			Set ComAlignment of hoColumn2 to (ComHeaderAlignment(hoColumn2))
			Set ComAllowSizing of hoColumn2 to False
			Set ComWidth of hoColumn2 to 96
			Set ComDef of hoColumn2 OLEexCellHasCheckBox to True
			Set ComFormatColumn of hoColumn2 to "0 pos `A-Z`"
			Set ComDef of hoColumn2 OLEexCellDrawPartsOrder to "caption,check,icon,icons,picture"
		Send Destroy to hoColumn2
		Get ComAdd of hoColumns "" to Nothing
	Send Destroy to hoColumns
	Variant voItems
	Get ComItems to voItems
	Handle hoItems
	Get Create (RefClass(cComItems)) to hoItems
	Set pvComObject of hoItems to voItems
		Set ComCellState of hoItems (ComAddItem(hoItems,"Item 1")) 3 to 1
		Set ComCellState of hoItems (ComAddItem(hoItems,"Item 2")) 2 to 1
		Set ComCellState of hoItems (ComAddItem(hoItems,"Item 3")) 1 to 1
	Send Destroy to hoItems
	Send ComEndUpdate
End_Procedure
1010:
Can I display the column's multiple-lines caption vertically oriented (method 2)

Procedure OnCreate
	Forward Send OnCreate
	Send ComBeginUpdate
	Set ComHeaderHeight to 48
	Set ComColumnAutoResize to True
	Variant voColumns
	Get ComColumns to voColumns
	Handle hoColumns
	Get Create (RefClass(cComColumns)) to hoColumns
	Set pvComObject of hoColumns to voColumns
		Get ComAdd of hoColumns "And others ..." to Nothing
		Variant voColumn
		Get ComAdd of hoColumns "" to voColumn
		Handle hoColumn
		Get Create (RefClass(cComColumn)) to hoColumn
		Set pvComObject of hoColumn to voColumn
			Set ComHTMLCaption of hoColumn to "First Column"
			Set ComHeaderVertical of hoColumn to True
			Set ComWidth of hoColumn to 36
			Set ComAllowSizing of hoColumn to False
			Set ComDef of hoColumn OLEexCellHasCheckBox to True
			Set ComDef of hoColumn OLEexCellPaddingLeft to 8
			Set ComPosition of hoColumn to 0
		Send Destroy to hoColumn
		Variant voColumn1
		Get ComAdd of hoColumns "" to voColumn1
		Handle hoColumn1
		Get Create (RefClass(cComColumn)) to hoColumn1
		Set pvComObject of hoColumn1 to voColumn1
			Set ComHTMLCaption of hoColumn1 to "<c><b>Second Column"
			Set ComHeaderVertical of hoColumn1 to True
			Set ComWidth of hoColumn1 to 36
			Set ComAllowSizing of hoColumn1 to False
			Set ComDef of hoColumn1 OLEexCellHasCheckBox to True
			Set ComDef of hoColumn1 OLEexCellPaddingLeft to 8
			Set ComPosition of hoColumn1 to 1
		Send Destroy to hoColumn1
		Variant voColumn2
		Get ComAdd of hoColumns "" to voColumn2
		Handle hoColumn2
		Get Create (RefClass(cComColumn)) to hoColumn2
		Set pvComObject of hoColumn2 to voColumn2
			Set ComHTMLCaption of hoColumn2 to "<r>Third Column"
			Set ComHeaderVertical of hoColumn2 to True
			Set ComWidth of hoColumn2 to 36
			Set ComAllowSizing of hoColumn2 to False
			Set ComDef of hoColumn2 OLEexCellHasCheckBox to True
			Set ComDef of hoColumn2 OLEexCellPaddingLeft to 8
			Set ComPosition of hoColumn2 to 2
		Send Destroy to hoColumn2
	Send Destroy to hoColumns
	Variant voItems
	Get ComItems to voItems
	Handle hoItems
	Get Create (RefClass(cComItems)) to hoItems
	Set pvComObject of hoItems to voItems
		Set ComCellState of hoItems (ComAddItem(hoItems,"Item 1")) 3 to 1
		Set ComCellState of hoItems (ComAddItem(hoItems,"Item 2")) 2 to 1
		Set ComCellState of hoItems (ComAddItem(hoItems,"Item 3")) 1 to 1
	Send Destroy to hoItems
	Send ComEndUpdate
End_Procedure
1009:
Can I display the column's multiple-lines caption vertically oriented (method 1)

Procedure OnCreate
	Forward Send OnCreate
	Send ComBeginUpdate
	Set ComHeaderHeight to 48
	Set ComHeaderSingleLine to False
	Set ComColumnAutoResize to True
	Variant voColumns
	Get ComColumns to voColumns
	Handle hoColumns
	Get Create (RefClass(cComColumns)) to hoColumns
	Set pvComObject of hoColumns to voColumns
		Get ComAdd of hoColumns "And others ..." to Nothing
		Variant voColumn
		Get ComAdd of hoColumns "First Column" to voColumn
		Handle hoColumn
		Get Create (RefClass(cComColumn)) to hoColumn
		Set pvComObject of hoColumn to voColumn
			Set ComHeaderVertical of hoColumn to True
			Set ComWidth of hoColumn to 36
			Set ComAllowSizing of hoColumn to False
			Set ComDef of hoColumn OLEexCellHasCheckBox to True
			Set ComDef of hoColumn OLEexCellPaddingLeft to 8
			Set ComPosition of hoColumn to 0
		Send Destroy to hoColumn
		Variant voColumn1
		Get ComAdd of hoColumns "Second Column" to voColumn1
		Handle hoColumn1
		Get Create (RefClass(cComColumn)) to hoColumn1
		Set pvComObject of hoColumn1 to voColumn1
			Set ComHeaderBold of hoColumn1 to True
			Set ComHeaderVertical of hoColumn1 to True
			Set ComWidth of hoColumn1 to 36
			Set ComAllowSizing of hoColumn1 to False
			Set ComDef of hoColumn1 OLEexCellHasCheckBox to True
			Set ComDef of hoColumn1 OLEexCellPaddingLeft to 8
			Set ComPosition of hoColumn1 to 1
		Send Destroy to hoColumn1
		Variant voColumn2
		Get ComAdd of hoColumns "Third Column" to voColumn2
		Handle hoColumn2
		Get Create (RefClass(cComColumn)) to hoColumn2
		Set pvComObject of hoColumn2 to voColumn2
			Set ComHeaderVertical of hoColumn2 to True
			Set ComWidth of hoColumn2 to 36
			Set ComAllowSizing of hoColumn2 to False
			Set ComDef of hoColumn2 OLEexCellHasCheckBox to True
			Set ComDef of hoColumn2 OLEexCellPaddingLeft to 8
			Set ComPosition of hoColumn2 to 2
		Send Destroy to hoColumn2
	Send Destroy to hoColumns
	Variant voItems
	Get ComItems to voItems
	Handle hoItems
	Get Create (RefClass(cComItems)) to hoItems
	Set pvComObject of hoItems to voItems
		Set ComCellState of hoItems (ComAddItem(hoItems,"Item 1")) 3 to 1
		Set ComCellState of hoItems (ComAddItem(hoItems,"Item 2")) 2 to 1
		Set ComCellState of hoItems (ComAddItem(hoItems,"Item 3")) 1 to 1
	Send Destroy to hoItems
	Send ComEndUpdate
End_Procedure
1008:
Can I display the column's caption vertically oriented (method 2)

Procedure OnCreate
	Forward Send OnCreate
	Send ComBeginUpdate
	Set ComHeaderHeight to 48
	Set ComColumnAutoResize to True
	Variant voColumns
	Get ComColumns to voColumns
	Handle hoColumns
	Get Create (RefClass(cComColumns)) to hoColumns
	Set pvComObject of hoColumns to voColumns
		Get ComAdd of hoColumns "And others ..." to Nothing
		Variant voColumn
		Get ComAdd of hoColumns "" to voColumn
		Handle hoColumn
		Get Create (RefClass(cComColumn)) to hoColumn
		Set pvComObject of hoColumn to voColumn
			Set ComHTMLCaption of hoColumn to "First"
			Set ComHeaderVertical of hoColumn to True
			Set ComWidth of hoColumn to 20
			Set ComAllowSizing of hoColumn to False
			Set ComDef of hoColumn OLEexCellHasCheckBox to True
			Set ComPosition of hoColumn to 0
		Send Destroy to hoColumn
		Variant voColumn1
		Get ComAdd of hoColumns "" to voColumn1
		Handle hoColumn1
		Get Create (RefClass(cComColumn)) to hoColumn1
		Set pvComObject of hoColumn1 to voColumn1
			Set ComHTMLCaption of hoColumn1 to "<c><b>Second"
			Set ComHeaderVertical of hoColumn1 to True
			Set ComWidth of hoColumn1 to 20
			Set ComAllowSizing of hoColumn1 to False
			Set ComDef of hoColumn1 OLEexCellHasCheckBox to True
			Set ComPosition of hoColumn1 to 1
		Send Destroy to hoColumn1
		Variant voColumn2
		Get ComAdd of hoColumns "" to voColumn2
		Handle hoColumn2
		Get Create (RefClass(cComColumn)) to hoColumn2
		Set pvComObject of hoColumn2 to voColumn2
			Set ComHTMLCaption of hoColumn2 to "<r>Third"
			Set ComHeaderVertical of hoColumn2 to True
			Set ComWidth of hoColumn2 to 20
			Set ComAllowSizing of hoColumn2 to False
			Set ComDef of hoColumn2 OLEexCellHasCheckBox to True
			Set ComPosition of hoColumn2 to 2
		Send Destroy to hoColumn2
	Send Destroy to hoColumns
	Variant voItems
	Get ComItems to voItems
	Handle hoItems
	Get Create (RefClass(cComItems)) to hoItems
	Set pvComObject of hoItems to voItems
		Set ComCellState of hoItems (ComAddItem(hoItems,"Item 1")) 3 to 1
		Set ComCellState of hoItems (ComAddItem(hoItems,"Item 2")) 2 to 1
		Set ComCellState of hoItems (ComAddItem(hoItems,"Item 3")) 1 to 1
	Send Destroy to hoItems
	Send ComEndUpdate
End_Procedure
1007:
Can I display the column's caption vertically oriented (method 1)

Procedure OnCreate
	Forward Send OnCreate
	Send ComBeginUpdate
	Set ComHeaderHeight to 48
	Set ComColumnAutoResize to True
	Variant voColumns
	Get ComColumns to voColumns
	Handle hoColumns
	Get Create (RefClass(cComColumns)) to hoColumns
	Set pvComObject of hoColumns to voColumns
		Get ComAdd of hoColumns "And others ..." to Nothing
		Variant voColumn
		Get ComAdd of hoColumns "First" to voColumn
		Handle hoColumn
		Get Create (RefClass(cComColumn)) to hoColumn
		Set pvComObject of hoColumn to voColumn
			Set ComHeaderVertical of hoColumn to True
			Set ComWidth of hoColumn to 20
			Set ComAllowSizing of hoColumn to False
			Set ComDef of hoColumn OLEexCellHasCheckBox to True
			Set ComPosition of hoColumn to 0
		Send Destroy to hoColumn
		Variant voColumn1
		Get ComAdd of hoColumns "Second" to voColumn1
		Handle hoColumn1
		Get Create (RefClass(cComColumn)) to hoColumn1
		Set pvComObject of hoColumn1 to voColumn1
			Set ComHeaderBold of hoColumn1 to True
			Set ComHeaderVertical of hoColumn1 to True
			Set ComWidth of hoColumn1 to 20
			Set ComAllowSizing of hoColumn1 to False
			Set ComDef of hoColumn1 OLEexCellHasCheckBox to True
			Set ComPosition of hoColumn1 to 1
		Send Destroy to hoColumn1
		Variant voColumn2
		Get ComAdd of hoColumns "Third" to voColumn2
		Handle hoColumn2
		Get Create (RefClass(cComColumn)) to hoColumn2
		Set pvComObject of hoColumn2 to voColumn2
			Set ComHeaderVertical of hoColumn2 to True
			Set ComWidth of hoColumn2 to 20
			Set ComAllowSizing of hoColumn2 to False
			Set ComDef of hoColumn2 OLEexCellHasCheckBox to True
			Set ComPosition of hoColumn2 to 2
		Send Destroy to hoColumn2
	Send Destroy to hoColumns
	Variant voItems
	Get ComItems to voItems
	Handle hoItems
	Get Create (RefClass(cComItems)) to hoItems
	Set pvComObject of hoItems to voItems
		Set ComCellState of hoItems (ComAddItem(hoItems,"Item 1")) 3 to 1
		Set ComCellState of hoItems (ComAddItem(hoItems,"Item 2")) 2 to 1
		Set ComCellState of hoItems (ComAddItem(hoItems,"Item 3")) 1 to 1
	Send Destroy to hoItems
	Send ComEndUpdate
End_Procedure
1006:
How do I automatically bold items being checked

// Fired after cell's state has been changed.
Procedure OnComCellStateChanged HITEM   llItem Integer   llColIndex
	Forward Send OnComCellStateChanged llItem llColIndex
End_Procedure

Procedure OnCreate
	Forward Send OnCreate
	Send ComBeginUpdate
	Set ComSelBackMode to OLEexTransparent
	Variant voConditionalFormats
	Get ComConditionalFormats to voConditionalFormats
	Handle hoConditionalFormats
	Get Create (RefClass(cComConditionalFormats)) to hoConditionalFormats
	Set pvComObject of hoConditionalFormats to voConditionalFormats
		Variant voConditionalFormat
		Get ComAdd of hoConditionalFormats "%CS0" "check" to voConditionalFormat
		Handle hoConditionalFormat
		Get Create (RefClass(cComConditionalFormat)) to hoConditionalFormat
		Set pvComObject of hoConditionalFormat to voConditionalFormat
			Set ComBold of hoConditionalFormat to True
		Send Destroy to hoConditionalFormat
	Send Destroy to hoConditionalFormats
	Variant voColumns
	Get ComColumns to voColumns
	Handle hoColumns
	Get Create (RefClass(cComColumns)) to hoColumns
	Set pvComObject of hoColumns to voColumns
		Variant voColumn
		Get ComAdd of hoColumns "Items" to voColumn
		Handle hoColumn
		Get Create (RefClass(cComColumn)) to hoColumn
		Set pvComObject of hoColumn to voColumn
			Set ComDef of hoColumn OLEexCellHasCheckBox to True
		Send Destroy to hoColumn
	Send Destroy to hoColumns
	Variant voColumns1
	Get ComColumns to voColumns1
	Handle hoColumns1
	Get Create (RefClass(cComColumns)) to hoColumns1
	Set pvComObject of hoColumns1 to voColumns1
Variant vColumnCaption
			Variant voConditionalFormats1
			Get ComConditionalFormats to voConditionalFormats1
			Handle hoConditionalFormats1
			Get Create (RefClass(cComConditionalFormats)) to hoConditionalFormats1
			Set pvComObject of hoConditionalFormats1 to voConditionalFormats1
				Variant voConditionalFormat1
				Get ComItem of hoConditionalFormats1 "check" to voConditionalFormat1
				Handle hoConditionalFormat1
				Get Create (RefClass(cComConditionalFormat)) to hoConditionalFormat1
				Set pvComObject of hoConditionalFormat1 to voConditionalFormat1
					Variant voConditionalFormat2
					Get ComItem of hoConditionalFormat1 "check" to voConditionalFormat2
					Handle hoConditionalFormat2
					Get Create (RefClass(cComConditionalFormat)) to hoConditionalFormat2
					Set pvComObject of hoConditionalFormat2 to voConditionalFormat2
						Get ComExpression of hoConditionalFormat2 to vColumnCaption
					Send Destroy to hoConditionalFormat2
				Send Destroy to hoConditionalFormat1
			Send Destroy to hoConditionalFormats1
				Variant voColumn1
		Get ComAdd of hoColumns1 vColumnCaption to voColumn1
		Handle hoColumn1
		Get Create (RefClass(cComColumn)) to hoColumn1
		Set pvComObject of hoColumn1 to voColumn1
			Variant v
				Variant voConditionalFormats2
				Get ComConditionalFormats to voConditionalFormats2
				Handle hoConditionalFormats2
				Get Create (RefClass(cComConditionalFormats)) to hoConditionalFormats2
				Set pvComObject of hoConditionalFormats2 to voConditionalFormats2
					Variant voConditionalFormat3
					Get ComItem of hoConditionalFormats2 "check" to voConditionalFormat3
					Handle hoConditionalFormat3
					Get Create (RefClass(cComConditionalFormat)) to hoConditionalFormat3
					Set pvComObject of hoConditionalFormat3 to voConditionalFormat3
						Variant voConditionalFormat4
						Get ComItem of hoConditionalFormat3 "check" to voConditionalFormat4
						Handle hoConditionalFormat4
						Get Create (RefClass(cComConditionalFormat)) to hoConditionalFormat4
						Set pvComObject of hoConditionalFormat4 to voConditionalFormat4
							Get ComExpression of hoConditionalFormat4 to v
						Send Destroy to hoConditionalFormat4
					Send Destroy to hoConditionalFormat3
				Send Destroy to hoConditionalFormats2
			Set ComFormatColumn of hoColumn1 to v
		Send Destroy to hoColumn1
	Send Destroy to hoColumns1
	Variant voItems
	Get ComItems to voItems
	Handle hoItems
	Get Create (RefClass(cComItems)) to hoItems
	Set pvComObject of hoItems to voItems
		Get ComAddItem of hoItems "Item 1" to Nothing
		Set ComCellState of hoItems (ComAddItem(hoItems,"Item 2")) 0 to 1
		Get ComAddItem of hoItems "Item 3" to Nothing
	Send Destroy to hoItems
	Send ComEndUpdate
End_Procedure
1005:
How can I use the CellState with ConditionalFormat/ComputedField/FormatColumn

// Fired after cell's state has been changed.
Procedure OnComCellStateChanged HITEM   llItem Integer   llColIndex
	Forward Send OnComCellStateChanged llItem llColIndex
End_Procedure

Procedure OnCreate
	Forward Send OnCreate
	Send ComBeginUpdate
	Set ComLinesAtRoot to OLEexGroupLinesInsideLeaf
	Set ComSelBackMode to OLEexTransparent
	Variant voColumns
	Get ComColumns to voColumns
	Handle hoColumns
	Get Create (RefClass(cComColumns)) to hoColumns
	Set pvComObject of hoColumns to voColumns
		Variant voColumn
		Get ComAdd of hoColumns "Items" to voColumn
		Handle hoColumn
		Get Create (RefClass(cComColumn)) to hoColumn
		Set pvComObject of hoColumn to voColumn
			Set ComDef of hoColumn OLEexCellHasCheckBox to True
			Set ComPartialCheck of hoColumn to True
		Send Destroy to hoColumn
	Send Destroy to hoColumns
	Variant voColumns1
	Get ComColumns to voColumns1
	Handle hoColumns1
	Get Create (RefClass(cComColumns)) to hoColumns1
	Set pvComObject of hoColumns1 to voColumns1
		Variant voColumn1
		Get ComAdd of hoColumns1 "Format" to voColumn1
		Handle hoColumn1
		Get Create (RefClass(cComColumn)) to hoColumn1
		Set pvComObject of hoColumn1 to voColumn1
			Set ComFormatColumn of hoColumn1 to "%CS0"
			Set ComCaption of hoColumn1 to (ComFormatColumn(hoColumn1))
			Set ComDef of hoColumn1 OLEexCellForeColor to 8421504
			Set ComDef of hoColumn1 OLEexHeaderForeColor to (ComDef(hoColumn1,OLEexCellForeColor))
		Send Destroy to hoColumn1
	Send Destroy to hoColumns1
	Variant voItems
	Get ComItems to voItems
	Handle hoItems
	Get Create (RefClass(cComItems)) to hoItems
	Set pvComObject of hoItems to voItems
		Variant h
		Get ComAddItem of hoItems "Root" to h
		Get ComInsertItem of hoItems h "Item 1" to Nothing
		Set ComCellState of hoItems (ComInsertItem(hoItems,h,"Item 2")) 0 to 1
		Set ComCellState of hoItems (ComInsertItem(hoItems,h,"Item 3")) 0 to 1
		Set ComExpandItem of hoItems h to True
	Send Destroy to hoItems
	Send ComEndUpdate
End_Procedure
1004:
How can I use the CellData with ConditionalFormat/ComputedField/FormatColumn

Procedure OnCreate
	Forward Send OnCreate
	Send ComBeginUpdate
	Variant voColumns
	Get ComColumns to voColumns
	Handle hoColumns
	Get Create (RefClass(cComColumns)) to hoColumns
	Set pvComObject of hoColumns to voColumns
		Get ComAdd of hoColumns "Items" to Nothing
	Send Destroy to hoColumns
	Variant voColumns1
	Get ComColumns to voColumns1
	Handle hoColumns1
	Get Create (RefClass(cComColumns)) to hoColumns1
	Set pvComObject of hoColumns1 to voColumns1
		Variant voColumn
		Get ComAdd of hoColumns1 "Format" to voColumn
		Handle hoColumn
		Get Create (RefClass(cComColumn)) to hoColumn
		Set pvComObject of hoColumn to voColumn
			Set ComFormatColumn of hoColumn to "%CD0"
			Set ComCaption of hoColumn to (ComFormatColumn(hoColumn))
			Set ComDef of hoColumn OLEexCellForeColor to 8421504
			Set ComDef of hoColumn OLEexHeaderForeColor to (ComDef(hoColumn,OLEexCellForeColor))
		Send Destroy to hoColumn
	Send Destroy to hoColumns1
	Variant voItems
	Get ComItems to voItems
	Handle hoItems
	Get Create (RefClass(cComItems)) to hoItems
	Set pvComObject of hoItems to voItems
		Set ComCellData of hoItems (ComAddItem(hoItems,"Item 1")) 0 to 1234
		Set ComCellData of hoItems (ComAddItem(hoItems,"Item 2")) 0 to "this is just an user data"
		Set ComCellData of hoItems (ComAddItem(hoItems,"Item 3")) 0 to "1/1/2001"
	Send Destroy to hoItems
	Send ComEndUpdate
End_Procedure
1003:
How can I use the CellValue/CellCaption with ConditionalFormat/ComputedField/FormatColumn

Procedure OnCreate
	Forward Send OnCreate
	Send ComBeginUpdate
	Variant voColumns
	Get ComColumns to voColumns
	Handle hoColumns
	Get Create (RefClass(cComColumns)) to hoColumns
	Set pvComObject of hoColumns to voColumns
		Variant voColumn
		Get ComAdd of hoColumns "Items" to voColumn
		Handle hoColumn
		Get Create (RefClass(cComColumn)) to hoColumn
		Set pvComObject of hoColumn to voColumn
			Variant voEditor
			Get ComEditor of hoColumn to voEditor
			Handle hoEditor
			Get Create (RefClass(cComEditor)) to hoEditor
			Set pvComObject of hoEditor to voEditor
				Set ComEditType of hoEditor to OLEDropDownListType
				Send ComAddItem of hoEditor 1 "Item 1" Nothing
				Send ComAddItem of hoEditor 2 "Item 2" Nothing
				Send ComAddItem of hoEditor 3 "Item 3" Nothing
			Send Destroy to hoEditor
		Send Destroy to hoColumn
	Send Destroy to hoColumns
	Variant voColumns1
	Get ComColumns to voColumns1
	Handle hoColumns1
	Get Create (RefClass(cComColumns)) to hoColumns1
	Set pvComObject of hoColumns1 to voColumns1
		Variant voColumn1
		Get ComAdd of hoColumns1 "Format" to voColumn1
		Handle hoColumn1
		Get Create (RefClass(cComColumn)) to hoColumn1
		Set pvComObject of hoColumn1 to voColumn1
			Set ComFormatColumn of hoColumn1 to "%0"
			Set ComCaption of hoColumn1 to (ComFormatColumn(hoColumn1))
			Set ComDef of hoColumn1 OLEexCellForeColor to 8421504
			Set ComDef of hoColumn1 OLEexHeaderForeColor to (ComDef(hoColumn1,OLEexCellForeColor))
			Set ComAllowSizing of hoColumn1 to False
		Send Destroy to hoColumn1
	Send Destroy to hoColumns1
	Variant voColumns2
	Get ComColumns to voColumns2
	Handle hoColumns2
	Get Create (RefClass(cComColumns)) to hoColumns2
	Set pvComObject of hoColumns2 to voColumns2
		Variant voColumn2
		Get ComAdd of hoColumns2 "Format" to voColumn2
		Handle hoColumn2
		Get Create (RefClass(cComColumn)) to hoColumn2
		Set pvComObject of hoColumn2 to voColumn2
			Set ComFormatColumn of hoColumn2 to "%C0"
			Set ComCaption of hoColumn2 to (ComFormatColumn(hoColumn2))
			Set ComDef of hoColumn2 OLEexCellForeColor to 8421504
			Set ComDef of hoColumn2 OLEexHeaderForeColor to (ComDef(hoColumn2,OLEexCellForeColor))
			Set ComAllowSizing of hoColumn2 to False
		Send Destroy to hoColumn2
	Send Destroy to hoColumns2
	Variant voItems
	Get ComItems to voItems
	Handle hoItems
	Get Create (RefClass(cComItems)) to hoItems
	Set pvComObject of hoItems to voItems
		Get ComAddItem of hoItems 1 to Nothing
		Set ComCellValue of hoItems (ComAddItem(hoItems,0)) 0 to 2
		Get ComAddItem of hoItems 2 to Nothing
	Send Destroy to hoItems
	Send ComEndUpdate
End_Procedure
1002:
Can I display the radio-button with a solid color

Procedure OnCreate
	Forward Send OnCreate
	Send ComBeginUpdate
	Set ComRadioImage False to 32699122
	Set ComRadioImage True to 16777216
	Variant voColumns
	Get ComColumns to voColumns
	Handle hoColumns
	Get Create (RefClass(cComColumns)) to hoColumns
	Set pvComObject of hoColumns to voColumns
		Variant voColumn
		Get ComAdd of hoColumns "Check" to voColumn
		Handle hoColumn
		Get Create (RefClass(cComColumn)) to hoColumn
		Set pvComObject of hoColumn to voColumn
			Set ComDef of hoColumn OLEexCellHasRadioButton to True
		Send Destroy to hoColumn
	Send Destroy to hoColumns
	Variant voItems
	Get ComItems to voItems
	Handle hoItems
	Get Create (RefClass(cComItems)) to hoItems
	Set pvComObject of hoItems to voItems
		Get ComAddItem of hoItems "Radio 1" to Nothing
		Set ComCellState of hoItems (ComAddItem(hoItems,"Radio 2")) 0 to 1
		Get ComAddItem of hoItems "Radio 1" to Nothing
	Send Destroy to hoItems
	Send ComEndUpdate
End_Procedure
1001:
Can I display the check-box with a solid color

Procedure OnCreate
	Forward Send OnCreate
	Send ComBeginUpdate
	Set ComCheckImage OLEUnchecked to 32699122
	Set ComCheckImage OLEChecked to 16777216
	Variant voColumns
	Get ComColumns to voColumns
	Handle hoColumns
	Get Create (RefClass(cComColumns)) to hoColumns
	Set pvComObject of hoColumns to voColumns
		Variant voColumn
		Get ComAdd of hoColumns "Check" to voColumn
		Handle hoColumn
		Get Create (RefClass(cComColumn)) to hoColumn
		Set pvComObject of hoColumn to voColumn
			Set ComDef of hoColumn OLEexCellHasCheckBox to True
		Send Destroy to hoColumn
	Send Destroy to hoColumns
	Variant voItems
	Get ComItems to voItems
	Handle hoItems
	Get Create (RefClass(cComItems)) to hoItems
	Set pvComObject of hoItems to voItems
		Get ComAddItem of hoItems "Check 1" to Nothing
		Set ComCellState of hoItems (ComAddItem(hoItems,"Check 2")) 0 to 1
		Get ComAddItem of hoItems "Check 3" to Nothing
	Send Destroy to hoItems
	Send ComEndUpdate
End_Procedure
1000:
It is possible to search for an item ( inside the Editor ), case insensitive

Procedure OnCreate
	Forward Send OnCreate
	Send ComBeginUpdate
	Variant voColumns
	Get ComColumns to voColumns
	Handle hoColumns
	Get Create (RefClass(cComColumns)) to hoColumns
	Set pvComObject of hoColumns to voColumns
		Variant voColumn
		Get ComAdd of hoColumns "DropDownList" to voColumn
		Handle hoColumn
		Get Create (RefClass(cComColumn)) to hoColumn
		Set pvComObject of hoColumn to voColumn
			Variant voEditor
			Get ComEditor of hoColumn to voEditor
			Handle hoEditor
			Get Create (RefClass(cComEditor)) to hoEditor
			Set pvComObject of hoEditor to voEditor
				Set ComEditType of hoEditor to OLEDropDownListType
				Send ComAddItem of hoEditor 1 "One" Nothing
				Send ComAddItem of hoEditor 2 "Two" Nothing
				Send ComAddItem of hoEditor 3 "Three" Nothing
			Send Destroy to hoEditor
		Send Destroy to hoColumn
	Send Destroy to hoColumns
	Variant voItems
	Get ComItems to voItems
	Handle hoItems
	Get Create (RefClass(cComItems)) to hoItems
	Set pvComObject of hoItems to voItems
		Variant vValue
			Variant voColumns1
			Get ComColumns to voColumns1
			Handle hoColumns1
			Get Create (RefClass(cComColumns)) to hoColumns1
			Set pvComObject of hoColumns1 to voColumns1
				Variant voColumn1
				Get ComItem of hoColumns1 0 to voColumn1
				Handle hoColumn1
				Get Create (RefClass(cComColumn)) to hoColumn1
				Set pvComObject of hoColumn1 to voColumn1
					Variant voColumn2
					Get ComItem of hoColumn1 0 to voColumn2
					Handle hoColumn2
					Get Create (RefClass(cComColumn)) to hoColumn2
					Set pvComObject of hoColumn2 to voColumn2
						Variant voEditor1
						Get ComEditor of hoColumn2 to voEditor1
						Handle hoEditor1
						Get Create (RefClass(cComEditor)) to hoEditor1
						Set pvComObject of hoEditor1 to voEditor1
							Get ComFindItem of hoEditor1 ">ONE" to vValue
						Send Destroy to hoEditor1
					Send Destroy to hoColumn2
				Send Destroy to hoColumn1
			Send Destroy to hoColumns1
		Get ComAddItem of hoItems vValue to Nothing
		Variant vValue1
			Variant voColumns2
			Get ComColumns to voColumns2
			Handle hoColumns2
			Get Create (RefClass(cComColumns)) to hoColumns2
			Set pvComObject of hoColumns2 to voColumns2
				Variant voColumn3
				Get ComItem of hoColumns2 0 to voColumn3
				Handle hoColumn3
				Get Create (RefClass(cComColumn)) to hoColumn3
				Set pvComObject of hoColumn3 to voColumn3
					Variant voColumn4
					Get ComItem of hoColumn3 0 to voColumn4
					Handle hoColumn4
					Get Create (RefClass(cComColumn)) to hoColumn4
					Set pvComObject of hoColumn4 to voColumn4
						Variant voEditor2
						Get ComEditor of hoColumn4 to voEditor2
						Handle hoEditor2
						Get Create (RefClass(cComEditor)) to hoEditor2
						Set pvComObject of hoEditor2 to voEditor2
							Get ComFindItem of hoEditor2 ">ThRee" to vValue1
						Send Destroy to hoEditor2
					Send Destroy to hoColumn4
				Send Destroy to hoColumn3
			Send Destroy to hoColumns2
		Get ComAddItem of hoItems vValue1 to Nothing
		Variant vValue2
			Variant voColumns3
			Get ComColumns to voColumns3
			Handle hoColumns3
			Get Create (RefClass(cComColumns)) to hoColumns3
			Set pvComObject of hoColumns3 to voColumns3
				Variant voColumn5
				Get ComItem of hoColumns3 0 to voColumn5
				Handle hoColumn5
				Get Create (RefClass(cComColumn)) to hoColumn5
				Set pvComObject of hoColumn5 to voColumn5
					Variant voColumn6
					Get ComItem of hoColumn5 0 to voColumn6
					Handle hoColumn6
					Get Create (RefClass(cComColumn)) to hoColumn6
					Set pvComObject of hoColumn6 to voColumn6
						Variant voEditor3
						Get ComEditor of hoColumn6 to voEditor3
						Handle hoEditor3
						Get Create (RefClass(cComEditor)) to hoEditor3
						Set pvComObject of hoEditor3 to voEditor3
							Get ComFindItem of hoEditor3 "ONE" to vValue2
						Send Destroy to hoEditor3
					Send Destroy to hoColumn6
				Send Destroy to hoColumn5
			Send Destroy to hoColumns3
		Get ComAddItem of hoItems vValue2 to Nothing
		Variant vValue3
			Variant voColumns4
			Get ComColumns to voColumns4
			Handle hoColumns4
			Get Create (RefClass(cComColumns)) to hoColumns4
			Set pvComObject of hoColumns4 to voColumns4
				Variant voColumn7
				Get ComItem of hoColumns4 0 to voColumn7
				Handle hoColumn7
				Get Create (RefClass(cComColumn)) to hoColumn7
				Set pvComObject of hoColumn7 to voColumn7
					Variant voColumn8
					Get ComItem of hoColumn7 0 to voColumn8
					Handle hoColumn8
					Get Create (RefClass(cComColumn)) to hoColumn8
					Set pvComObject of hoColumn8 to voColumn8
						Variant voEditor4
						Get ComEditor of hoColumn8 to voEditor4
						Handle hoEditor4
						Get Create (RefClass(cComEditor)) to hoEditor4
						Set pvComObject of hoEditor4 to voEditor4
							Get ComFindItem of hoEditor4 ">tWo" to vValue3
						Send Destroy to hoEditor4
					Send Destroy to hoColumn8
				Send Destroy to hoColumn7
			Send Destroy to hoColumns4
		Get ComAddItem of hoItems vValue3 to Nothing
	Send Destroy to hoItems
	Send ComEndUpdate
End_Procedure
999:
The text after the BR-tag is in same line as the text before the BR-tag (entire column)

Procedure OnCreate
	Forward Send OnCreate
	Send ComBeginUpdate
	Set ComDrawGridLines to OLEexHLines
	Variant voColumns
	Get ComColumns to voColumns
	Handle hoColumns
	Get Create (RefClass(cComColumns)) to hoColumns
	Set pvComObject of hoColumns to voColumns
		Variant voColumn
		Get ComAdd of hoColumns "Default" to voColumn
		Handle hoColumn
		Get Create (RefClass(cComColumn)) to hoColumn
		Set pvComObject of hoColumn to voColumn
			Set ComDef of hoColumn OLEexCellValueFormat to 1
			Set ComDef of hoColumn OLEexCellSingleLine to False
		Send Destroy to hoColumn
	Send Destroy to hoColumns
	Variant voItems
	Get ComItems to voItems
	Handle hoItems
	Get Create (RefClass(cComItems)) to hoItems
	Set pvComObject of hoItems to voItems
		Get ComAddItem of hoItems "This is the first line.<br>This is the second line." to Nothing
		Get ComAddItem of hoItems "This is the first line.<br>This is the second line." to Nothing
		Get ComAddItem of hoItems "This is the first line.<br>This is the second line." to Nothing
	Send Destroy to hoItems
	Send ComEndUpdate
End_Procedure
998:
The text after the BR-tag is in same line as the text before the BR-tag (individual)

Procedure OnCreate
	Forward Send OnCreate
	Send ComBeginUpdate
	Set ComDrawGridLines to OLEexHLines
	Variant voColumns
	Get ComColumns to voColumns
	Handle hoColumns
	Get Create (RefClass(cComColumns)) to hoColumns
	Set pvComObject of hoColumns to voColumns
		Get ComAdd of hoColumns "Default" to Nothing
	Send Destroy to hoColumns
	Variant voItems
	Get ComItems to voItems
	Handle hoItems
	Get Create (RefClass(cComItems)) to hoItems
	Set pvComObject of hoItems to voItems
		Set ComCellValueFormat of hoItems (ComAddItem(hoItems,"This is the first line.<br>This is the second line.")) 0 to OLEexHTML
		Variant h
		Get ComAddItem of hoItems "<b>This is the first line.<br>This is the second line.</b>" to h
		Set ComCellValueFormat of hoItems h 0 to OLEexHTML
		Set ComCellSingleLine of hoItems h 0 to False
		Set ComCellValueFormat of hoItems (ComAddItem(hoItems,"This is the first line.<br>This is the second line.")) 0 to OLEexHTML
	Send Destroy to hoItems
	Send ComEndUpdate
End_Procedure
997:
Can I disable an item once the user selects a new value into a different item

// Occurs when the user changes the cell's content.
Procedure OnComChange HITEM   llItem Integer   llColIndex Variant   llNewValue
	Forward Send OnComChange llItem llColIndex llNewValue
	Variant voItems
	Get ComItems to voItems
	Handle hoItems
	Get Create (RefClass(cComItems)) to hoItems
	Set pvComObject of hoItems to voItems
		Set ComEnableItem of hoItems (ComItemByIndex(hoItems,1)) to llNewValue
	Send Destroy to hoItems
End_Procedure

Procedure OnCreate
	Forward Send OnCreate
	Send ComFreezeEvents True
	Send ComBeginUpdate
	Set ComScrollBySingleLine to True
	Set ComDrawGridLines to OLEexRowLines
	Variant voColumns
	Get ComColumns to voColumns
	Handle hoColumns
	Get Create (RefClass(cComColumns)) to hoColumns
	Set pvComObject of hoColumns to voColumns
		Get ComAdd of hoColumns "Q" to Nothing
	Send Destroy to hoColumns
	Variant voColumns1
	Get ComColumns to voColumns1
	Handle hoColumns1
	Get Create (RefClass(cComColumns)) to hoColumns1
	Set pvComObject of hoColumns1 to voColumns1
		Get ComAdd of hoColumns1 "A" to Nothing
	Send Destroy to hoColumns1
	Variant voItems1
	Get ComItems to voItems1
	Handle hoItems1
	Get Create (RefClass(cComItems)) to hoItems1
	Set pvComObject of hoItems1 to voItems1
		Variant h1
		Get ComAddItem of hoItems1 "What's your gender?" to h1
		Variant voEditor
		Get ComCellEditor of hoItems1 h1 1 to voEditor
		Handle hoEditor
		Get Create (RefClass(cComEditor)) to hoEditor
		Set pvComObject of hoEditor to voEditor
			Set ComEditType of hoEditor to OLEDropDownListType
			Send ComAddItem of hoEditor 1 "Male" Nothing
			Send ComAddItem of hoEditor 0 "Female" Nothing
		Send Destroy to hoEditor
		Set ComCellValue of hoItems1 h1 1 to 1
		Variant h2
		Get ComAddItem of hoItems1 "What's pet name?" to h2
		Set ComCellValue of hoItems1 h2 1 to "This is my pet favorite long long long name, that shoul break the line in multiple pieces"
		Set ComCellSingleLine of hoItems1 h2 1 to False
	Send Destroy to hoItems1
	Send ComEndUpdate
	Send ComFreezeEvents False
End_Procedure
996:
How can I get a row expanded / enlarged to fit the cell's text (entire column)

Procedure OnCreate
	Forward Send OnCreate
	Send ComBeginUpdate
	Set ComScrollBySingleLine to True
	Set ComDrawGridLines to OLEexRowLines
	Variant voColumns
	Get ComColumns to voColumns
	Handle hoColumns
	Get Create (RefClass(cComColumns)) to hoColumns
	Set pvComObject of hoColumns to voColumns
		Get ComAdd of hoColumns "Q" to Nothing
	Send Destroy to hoColumns
	Variant voColumns1
	Get ComColumns to voColumns1
	Handle hoColumns1
	Get Create (RefClass(cComColumns)) to hoColumns1
	Set pvComObject of hoColumns1 to voColumns1
		Variant voColumn
		Get ComAdd of hoColumns1 "A" to voColumn
		Handle hoColumn
		Get Create (RefClass(cComColumn)) to hoColumn
		Set pvComObject of hoColumn to voColumn
			Set ComDef of hoColumn OLEexCellSingleLine to False
			Variant voEditor
			Get ComEditor of hoColumn to voEditor
			Handle hoEditor
			Get Create (RefClass(cComEditor)) to hoEditor
			Set pvComObject of hoEditor to voEditor
				Set ComEditType of hoEditor to OLEMemoType
				Set ComAppearance of hoEditor to OLESingleApp
			Send Destroy to hoEditor
		Send Destroy to hoColumn
	Send Destroy to hoColumns1
	Variant voItems
	Get ComItems to voItems
	Handle hoItems
	Get Create (RefClass(cComItems)) to hoItems
	Set pvComObject of hoItems to voItems
		Variant h1
		Get ComAddItem of hoItems "What's name?" to h1
		Set ComCellValue of hoItems h1 1 to "This is my pet favorite long long long name, that shoul break the line in multiple pieces"
		Variant h2
		Get ComAddItem of hoItems "What's your pet name?" to h2
		Set ComCellValue of hoItems h2 1 to "This is my pet favorite long long long name, that shoul break the line in multiple pieces"
	Send Destroy to hoItems
	Send ComEndUpdate
End_Procedure
995:
How can I get a row expanded / enlarged to fit the cell's text (individual cell)

Procedure OnCreate
	Forward Send OnCreate
	Send ComBeginUpdate
	Set ComScrollBySingleLine to True
	Set ComDrawGridLines to OLEexRowLines
	Variant voColumns
	Get ComColumns to voColumns
	Handle hoColumns
	Get Create (RefClass(cComColumns)) to hoColumns
	Set pvComObject of hoColumns to voColumns
		Get ComAdd of hoColumns "Q" to Nothing
	Send Destroy to hoColumns
	Variant voColumns1
	Get ComColumns to voColumns1
	Handle hoColumns1
	Get Create (RefClass(cComColumns)) to hoColumns1
	Set pvComObject of hoColumns1 to voColumns1
		Get ComAdd of hoColumns1 "A" to Nothing
	Send Destroy to hoColumns1
	Variant voItems
	Get ComItems to voItems
	Handle hoItems
	Get Create (RefClass(cComItems)) to hoItems
	Set pvComObject of hoItems to voItems
		Variant h1
		Get ComAddItem of hoItems "What's name?" to h1
		Set ComCellValue of hoItems h1 1 to "This is my pet favorite long long long name, that shoul break the line in multiple pieces"
		Variant h2
		Get ComAddItem of hoItems "What's your pet name?" to h2
		Variant voEditor
		Get ComCellEditor of hoItems h2 1 to voEditor
		Handle hoEditor
		Get Create (RefClass(cComEditor)) to hoEditor
		Set pvComObject of hoEditor to voEditor
			Set ComEditType of hoEditor to OLEMemoType
			Set ComAppearance of hoEditor to OLESingleApp
		Send Destroy to hoEditor
		Set ComCellValue of hoItems h2 1 to "This is my pet favorite long long long name, that shoul break the line in multiple pieces"
		Set ComCellSingleLine of hoItems h2 1 to False
	Send Destroy to hoItems
	Send ComEndUpdate
End_Procedure
994:
InsertControlItem / UserEditor / A2X:

Procedure OnCreate
	Forward Send OnCreate
	Send ComBeginUpdate
	Set ComBackColor to (RGB(240,240,240))
	Variant voConditionalFormats
	Get ComConditionalFormats to voConditionalFormats
	Handle hoConditionalFormats
	Get Create (RefClass(cComConditionalFormats)) to hoConditionalFormats
	Set pvComObject of hoConditionalFormats to voConditionalFormats
		Variant voConditionalFormat
		Get ComAdd of hoConditionalFormats "1 = 1" Nothing to voConditionalFormat
		Handle hoConditionalFormat
		Get Create (RefClass(cComConditionalFormat)) to hoConditionalFormat
		Set pvComObject of hoConditionalFormat to voConditionalFormat
			Set ComBold of hoConditionalFormat to True
		Send Destroy to hoConditionalFormat
	Send Destroy to hoConditionalFormats
	Variant voColumns
	Get ComColumns to voColumns
	Handle hoColumns
	Get Create (RefClass(cComColumns)) to hoColumns
	Set pvComObject of hoColumns to voColumns
		Variant voColumn
		Get ComAdd of hoColumns "Type" to voColumn
		Handle hoColumn
		Get Create (RefClass(cComColumn)) to hoColumn
		Set pvComObject of hoColumn to voColumn
			Set ComAlignment of hoColumn to OLERightAlignment
		Send Destroy to hoColumn
	Send Destroy to hoColumns
	Variant voItems
	Get ComItems to voItems
	Handle hoItems
	Get Create (RefClass(cComItems)) to hoItems
	Set pvComObject of hoItems to voItems
		Variant h
		Get ComAddItem of hoItems "1. A ProgID such as "MSCAL.Calendar.7"" to h
		Set ComItemDivider of hoItems h to 0
		Variant hX
		Get ComInsertControlItem of hoItems 0 "MSCAL.Calendar" "" to hX
		Variant voCalendar
		Get ComItemObject of hoItems hX to voCalendar
		Handle hoCalendar
		Get Create (RefClass(cComCalendar)) to hoCalendar
		Set pvComObject of hoCalendar to voCalendar
			Set ComBackColor of hoCalendar to (RGB(255,255,255))
		Send Destroy to hoCalendar
		Get ComAddItem of hoItems "2. A CLSID such as "{0036F83C-D892-4B7B-AA0B-BEDD8D16A738}"" to h
		Set ComItemDivider of hoItems h to 0
		Get ComInsertControlItem of hoItems 0 "{0036F83C-D892-4B7B-AA0B-BEDD8D16A738}" "" to hX
		Variant voHTML
		Get ComItemObject of hoItems hX to voHTML
		Handle hoHTML
		Get Create (RefClass(cComHTML)) to hoHTML
		Set pvComObject of hoHTML to voHTML
			Set ComBackColor of hoHTML to (RGB(255,255,255))
		Send Destroy to hoHTML
		Get ComAddItem of hoItems "3. A URL such as "http://www.exontrol.com"" to h
		Set ComItemDivider of hoItems h to 0
		Get ComInsertControlItem of hoItems 0 "http://www.exontrol.com" "" to hX
		Get ComAddItem of hoItems "4. A reference to an Active document such as "file://\\Documents\MyDoc.doc"" to h
		Set ComItemDivider of hoItems h to 0
		Get ComInsertControlItem of hoItems 0 "file://C:\empesting.xml" "" to hX
		Get ComAddItem of hoItems "5.A fragment of HTML such as "MSHTML:<HTML><BODY>This is a line of text</BODY></HTML>"" to h
		Set ComItemDivider of hoItems h to 0
		Get ComInsertControlItem of hoItems 0 "MSHTML:<HTML><BODY>This is a <b>line of</b> text</BODY></HTML>" "" to hX
		Set ComItemHeight of hoItems hX to 56
		Get ComAddItem of hoItems "6.Anything, if it is preffixed by "A2X:"" to h
		Set ComItemDivider of hoItems h to 0
		Get ComInsertControlItem of hoItems 0 "A2X:TOC24.Toc24Ctrl.1" "" to hX
	Send Destroy to hoItems
	Send ComEndUpdate
End_Procedure
993:
How do I add a RichTextBox editor
// Occurs when an user editor fires an event.
Procedure OnComUserEditorOleEvent Variant   llObject Variant   llEv Boolean   llCloseEditor HITEM   llItem Integer   llColIndex
	Forward Send OnComUserEditorOleEvent llObject llEv llCloseEditor llItem llColIndex
	Showln llEv
End_Procedure

Procedure OnCreate
	Forward Send OnCreate
	Send ComBeginUpdate
	Set ComDrawGridLines to OLEexAllLines
	Set ComDefaultItemHeight to 32
	Variant voColumns
	Get ComColumns to voColumns
	Handle hoColumns
	Get Create (RefClass(cComColumns)) to hoColumns
	Set pvComObject of hoColumns to voColumns
		Variant voColumn
		Get ComAdd of hoColumns "RICHTEXT" to voColumn
		Handle hoColumn
		Get Create (RefClass(cComColumn)) to hoColumn
		Set pvComObject of hoColumn to voColumn
			Variant voEditor
			Get ComEditor of hoColumn to voEditor
			Handle hoEditor
			Get Create (RefClass(cComEditor)) to hoEditor
			Set pvComObject of hoEditor to voEditor
				Set ComEditType of hoEditor to OLEUserEditorType
				Send ComUserEditor of hoEditor "RICHTEXT.RichtextCtrl" ""
				Variant voRichTextBox
				Get ComUserEditorObject of hoEditor to voRichTextBox
				Handle hoRichTextBox
				Get Create (RefClass(cComRichTextBox)) to hoRichTextBox
				Set pvComObject of hoRichTextBox to voRichTextBox
					Set ComAutoVerbMenu of hoRichTextBox to True
					Set ComTextRTF of hoRichTextBox to "{\rtf1\ansi{\fonttbl\f0\fswiss Helvetica;}\f0\pard\r\nThis is some {\b bold} text.\par\r\n}"
				Send Destroy to hoRichTextBox
			Send Destroy to hoEditor
		Send Destroy to hoColumn
	Send Destroy to hoColumns
	Variant voItems
	Get ComItems to voItems
	Handle hoItems
	Get Create (RefClass(cComItems)) to hoItems
	Set pvComObject of hoItems to voItems
		Get ComAddItem of hoItems "RICHTEXT.RichtextCtrl" to Nothing
	Send Destroy to hoItems
	Send ComEndUpdate
End_Procedure
992:
Is it possible to trap a double-click event on a specific cell and when that happens, to set the cell to a specific value
// Occurs when the user dblclk the left mouse button over an object.
Procedure OnComDblClick Short   llShift OLE_XPOS_PIXELS   llX OLE_YPOS_PIXELS   llY
	Forward Send OnComDblClick llShift llX llY
	Variant h
	Get ComItemFromPoint -1 -1 c hit to h
	Variant v
	Variant voItems
	Get ComItems to voItems
	Handle hoItems
	Get Create (RefClass(cComItems)) to hoItems
	Set pvComObject of hoItems to voItems
		Get ComCellValue of hoItems h c to v
	Send Destroy to hoItems
	Showln v
End_Procedure

Procedure OnCreate
	Forward Send OnCreate
	Send ComBeginUpdate
	Set ComHeaderAppearance to OLEEtched
	Set ComDrawGridLines to OLEexRowLines
	Variant voColumns
	Get ComColumns to voColumns
	Handle hoColumns
	Get Create (RefClass(cComColumns)) to hoColumns
	Set pvComObject of hoColumns to voColumns
		Get ComAdd of hoColumns "C1" to Nothing
	Send Destroy to hoColumns
	Variant voColumns1
	Get ComColumns to voColumns1
	Handle hoColumns1
	Get Create (RefClass(cComColumns)) to hoColumns1
	Set pvComObject of hoColumns1 to voColumns1
		Get ComAdd of hoColumns1 "C2" to Nothing
	Send Destroy to hoColumns1
	Variant voItems1
	Get ComItems to voItems1
	Handle hoItems1
	Get Create (RefClass(cComItems)) to hoItems1
	Set pvComObject of hoItems1 to voItems1
		Set ComCellValue of hoItems1 (ComAddItem(hoItems1,"Item 1")) 1 to "Item 2"
		Set ComCellValue of hoItems1 (ComAddItem(hoItems1,"Item 3")) 1 to "Item 4"
		Set ComCellValue of hoItems1 (ComAddItem(hoItems1,"Item 5")) 1 to "Item 6"
	Send Destroy to hoItems1
	Send ComEndUpdate
End_Procedure
991:
How can I display dates in DD/MM/YYYY format

Procedure OnCreate
	Forward Send OnCreate
	Send ComBeginUpdate
	Set ComScrollBySingleLine to False
	Variant voColumns
	Get ComColumns to voColumns
	Handle hoColumns
	Get Create (RefClass(cComColumns)) to hoColumns
	Set pvComObject of hoColumns to voColumns
		Get ComAdd of hoColumns "Date" to Nothing
	Send Destroy to hoColumns
	Variant voItems
	Get ComItems to voItems
	Handle hoItems
	Get Create (RefClass(cComItems)) to hoItems
	Set pvComObject of hoItems to voItems
		Set ComItemDivider of hoItems (ComAddItem(hoItems,"Different Date Formats")) to 0
		Set ComFormatCell of hoItems (ComAddItem(hoItems,"12/1/1971")) 0 to "((shortdateF(value) mid 4) left 2) + `/` + (shortdateF (value) left 2) + `/` + (shortdateF (value) right 4)"
		Set ComFormatCell of hoItems (ComAddItem(hoItems,"12/1/1971")) 0 to "(1 array (0:=(shortdateF(value) split `/`))) + `/` + (0 array (=:0) ) + `/` + (2 array (=:0) )"
		Set ComFormatCell of hoItems (ComAddItem(hoItems,"12/1/1971")) 0 to "((`0` + day(value) ) right 2) + `/` + ((`0` + month(value) ) right 2) + `/` + year(value)"
		Set ComFormatCell of hoItems (ComAddItem(hoItems,"12/1/1971")) 0 to "day(value) + `/` + month(value) + `/` + year(value)"
		Set ComFormatCell of hoItems (ComAddItem(hoItems,"12/1/1971")) 0 to "year(value) + ` - ` + day(value) + ` - ` + month(value)"
		Variant h
		Get ComAddItem of hoItems "12/1/1971" to h
		Set ComItemHeight of hoItems h to 24
		Set ComCellValueFormat of hoItems h 0 to OLEexHTML
		Set ComFormatCell of hoItems h 0 to "`<b>` + year(value) + `</b><off -4> ` + day(value) + ` - ` + month(value)"
		Set ComItemDivider of hoItems (ComAddItem(hoItems,"Predefined Date Formats")) to 0
		Set ComFormatCell of hoItems (ComAddItem(hoItems,"12/1/1971")) 0 to "value"
		Set ComFormatCell of hoItems (ComAddItem(hoItems,"12/1/1971")) 0 to "shortdateF(value)"
		Set ComFormatCell of hoItems (ComAddItem(hoItems,"12/1/1971")) 0 to "shortdate(value)"
		Set ComFormatCell of hoItems (ComAddItem(hoItems,"12/1/1971")) 0 to "longdate(value)"
	Send Destroy to hoItems
	Send ComEndUpdate
End_Procedure
990:
I have noticed that the column gets resized once I release the mouse. I have a column that displays multiple-lines cells, and the text gets wrapped only when user releases the mouse. Is it possible to get resized contiguously as I had before
Procedure OnCreate
	Forward Send OnCreate
	Send ComBeginUpdate
	Set ComScrollBySingleLine to False
	Set ComDrawGridLines to OLEexVLines
	Set ComColumnsAllowSizing to True
	Variant voColumns
	Get ComColumns to voColumns
	Handle hoColumns
	Get Create (RefClass(cComColumns)) to hoColumns
	Set pvComObject of hoColumns to voColumns
		Variant voColumn
		Get ComAdd of hoColumns "Column A (cont)" to voColumn
		Handle hoColumn
		Get Create (RefClass(cComColumn)) to hoColumn
		Set pvComObject of hoColumn to voColumn
			Set ComDef of hoColumn OLEexColumnResizeContiguously to True
		Send Destroy to hoColumn
	Send Destroy to hoColumns
	Variant voColumns1
	Get ComColumns to voColumns1
	Handle hoColumns1
	Get Create (RefClass(cComColumns)) to hoColumns1
	Set pvComObject of hoColumns1 to voColumns1
		Get ComAdd of hoColumns1 "Column 1" to Nothing
	Send Destroy to hoColumns1
	Variant voColumns2
	Get ComColumns to voColumns2
	Handle hoColumns2
	Get Create (RefClass(cComColumns)) to hoColumns2
	Set pvComObject of hoColumns2 to voColumns2
		Variant voColumn1
		Get ComAdd of hoColumns2 "Column B (cont)" to voColumn1
		Handle hoColumn1
		Get Create (RefClass(cComColumn)) to hoColumn1
		Set pvComObject of hoColumn1 to voColumn1
			Set ComDef of hoColumn1 OLEexColumnResizeContiguously to True
		Send Destroy to hoColumn1
	Send Destroy to hoColumns2
	Variant voColumns3
	Get ComColumns to voColumns3
	Handle hoColumns3
	Get Create (RefClass(cComColumns)) to hoColumns3
	Set pvComObject of hoColumns3 to voColumns3
		Get ComAdd of hoColumns3 "Column 2" to Nothing
	Send Destroy to hoColumns3
	Send ComEndUpdate
End_Procedure
989:
How do I get the column from cursor, when it hovers the empty portion of the items section
// Occurs when the user moves the mouse.
Procedure OnComMouseMove Short   llButton Short   llShift OLE_XPOS_PIXELS   llX OLE_YPOS_PIXELS   llY
	Forward Send OnComMouseMove llButton llShift llX llY
	Variant i
	Get ComItemFromPoint 0 -1 c hit to i
	Showln "Column" c
End_Procedure

Procedure OnCreate
	Forward Send OnCreate
	Send ComBeginUpdate
	Set ComDrawGridLines to OLEexVLines
	Variant voColumns
	Get ComColumns to voColumns
	Handle hoColumns
	Get Create (RefClass(cComColumns)) to hoColumns
	Set pvComObject of hoColumns to voColumns
		Get ComAdd of hoColumns "Column 0" to Nothing
	Send Destroy to hoColumns
	Variant voColumns1
	Get ComColumns to voColumns1
	Handle hoColumns1
	Get Create (RefClass(cComColumns)) to hoColumns1
	Set pvComObject of hoColumns1 to voColumns1
		Get ComAdd of hoColumns1 "Column 1" to Nothing
	Send Destroy to hoColumns1
	Variant voColumns2
	Get ComColumns to voColumns2
	Handle hoColumns2
	Get Create (RefClass(cComColumns)) to hoColumns2
	Set pvComObject of hoColumns2 to voColumns2
		Get ComAdd of hoColumns2 "Column 2" to Nothing
	Send Destroy to hoColumns2
	Send ComEndUpdate
End_Procedure
988:
How do I add items once the user clicks the empty area
// Occurs when the user presses and then releases the left mouse button over the grid control.
Procedure OnComClick 
	Forward Send OnComClick 
	Variant i
	Get ComItemFromPoint 0 -1 c hit to i
	Variant voItems
	Get ComItems to voItems
	Handle hoItems
	Get Create (RefClass(cComItems)) to hoItems
	Set pvComObject of hoItems to voItems
		Set ComCellValue of hoItems (ComAddItem(hoItems,i)) 1 to c
	Send Destroy to hoItems
End_Procedure

Procedure OnCreate
	Forward Send OnCreate
	Send ComBeginUpdate
	Variant voColumns
	Get ComColumns to voColumns
	Handle hoColumns
	Get Create (RefClass(cComColumns)) to hoColumns
	Set pvComObject of hoColumns to voColumns
		Get ComAdd of hoColumns "Number of Items to Add" to Nothing
	Send Destroy to hoColumns
	Variant voColumns1
	Get ComColumns to voColumns1
	Handle hoColumns1
	Get Create (RefClass(cComColumns)) to hoColumns1
	Set pvComObject of hoColumns1 to voColumns1
		Get ComAdd of hoColumns1 "Click on Column" to Nothing
	Send Destroy to hoColumns1
	Send ComEndUpdate
End_Procedure
987:
Is there any option to stop events
// Occurs after a new Item has been inserted to Items collection.
Procedure OnComAddItem HITEM   llItem
	Forward Send OnComAddItem llItem
	Showln "AddItem event is fired only if FreezeEvents(False) is called"
End_Procedure

Procedure OnCreate
	Forward Send OnCreate
	Send ComFreezeEvents True
	Send ComBeginUpdate
	Set ComDefaultItemHeight to 24
	Variant voColumns
	Get ComColumns to voColumns
	Handle hoColumns
	Get Create (RefClass(cComColumns)) to hoColumns
	Set pvComObject of hoColumns to voColumns
		Get ComAdd of hoColumns "Task" to Nothing
	Send Destroy to hoColumns
	Variant voItems
	Get ComItems to voItems
	Handle hoItems
	Get Create (RefClass(cComItems)) to hoItems
	Set pvComObject of hoItems to voItems
		Variant h1
		Get ComAddItem of hoItems "Task 1" to h1
		Variant h2
		Get ComAddItem of hoItems "Task 2" to h2
	Send Destroy to hoItems
	Send ComEndUpdate
	Send ComFreezeEvents False
End_Procedure
986:
How can I include the child items, when a filter is applied

Procedure OnCreate
	Forward Send OnCreate
	Send ComBeginUpdate
	Set ComColumnAutoResize to True
	Set ComContinueColumnScroll to False
	Set ComMarkSearchColumn to False
	Set ComSearchColumnIndex to 1
	Set ComIndent to 16
	Set ComLinesAtRoot to OLEexLinesAtRoot
	Set ComFilterBarPromptVisible to True
	Set ComFilterBarPromptPattern to "Nancy"
	Set ComFilterInclude to OLEexItemsWithChilds
	Variant voColumns
	Get ComColumns to voColumns
	Handle hoColumns
	Get Create (RefClass(cComColumns)) to hoColumns
	Set pvComObject of hoColumns to voColumns
		Variant voColumn
		Get ComAdd of hoColumns "Name" to voColumn
		Handle hoColumn
		Get Create (RefClass(cComColumn)) to hoColumn
		Set pvComObject of hoColumn to voColumn
			Set ComWidth of hoColumn to 96
		Send Destroy to hoColumn
		Variant voColumn1
		Get ComAdd of hoColumns "Title" to voColumn1
		Handle hoColumn1
		Get Create (RefClass(cComColumn)) to hoColumn1
		Set pvComObject of hoColumn1 to voColumn1
			Set ComWidth of hoColumn1 to 96
		Send Destroy to hoColumn1
		Get ComAdd of hoColumns "City" to Nothing
	Send Destroy to hoColumns
	Variant voItems
	Get ComItems to voItems
	Handle hoItems
	Get Create (RefClass(cComItems)) to hoItems
	Set pvComObject of hoItems to voItems
		Variant h0
		Get ComAddItem of hoItems "Nancy Davolio" to h0
		Set ComCellValue of hoItems h0 1 to "Sales Representative"
		Set ComCellValue of hoItems h0 2 to "Seattle"
		Get ComInsertItem of hoItems h0 "Andrew Fuller" to h0
		Set ComCellValue of hoItems h0 1 to "Vice President, Sales"
		Set ComCellValue of hoItems h0 2 to "Tacoma"
		Get ComInsertItem of hoItems h0 "Michael Suyama" to h0
		Set ComCellValue of hoItems h0 1 to "Sales Representative"
		Set ComCellValue of hoItems h0 2 to "London"
		Get ComAddItem of hoItems "Janet Leverling" to h0
		Set ComCellValue of hoItems h0 1 to "Sales Representative"
		Set ComCellValue of hoItems h0 2 to "Kirkland"
		Get ComInsertItem of hoItems h0 "Margaret Peacock" to h0
		Set ComCellValue of hoItems h0 1 to "Sales Representative"
		Set ComCellValue of hoItems h0 2 to "Redmond"
		Set ComExpandItem of hoItems 0 to True
	Send Destroy to hoItems
	Send ComApplyFilter
	Send ComEndUpdate
End_Procedure
985:
How do I prevent changing the cell's state ( check-box state )
// Fired before cell's state is about to be changed.
Procedure OnComCellStateChanging HITEM   llItem Integer   llColIndex Integer   llNewState
	Forward Send OnComCellStateChanging llItem llColIndex llNewState
	Variant voItems
	Get ComItems to voItems
	Handle hoItems
	Get Create (RefClass(cComItems)) to hoItems
	Set pvComObject of hoItems to voItems
		Get ComCellState of hoItems llItem llColIndex to NewState
	Send Destroy to hoItems
End_Procedure

Procedure OnCreate
	Forward Send OnCreate
	Send ComBeginUpdate
	Set ComLinesAtRoot to OLEexLinesAtRoot
	Variant voColumns
	Get ComColumns to voColumns
	Handle hoColumns
	Get Create (RefClass(cComColumns)) to hoColumns
	Set pvComObject of hoColumns to voColumns
		Variant voColumn
		Get ComAdd of hoColumns "P1" to voColumn
		Handle hoColumn
		Get Create (RefClass(cComColumn)) to hoColumn
		Set pvComObject of hoColumn to voColumn
			Set ComDef of hoColumn OLEexCellHasCheckBox to True
			Set ComPartialCheck of hoColumn to True
		Send Destroy to hoColumn
	Send Destroy to hoColumns
	Variant voColumns1
	Get ComColumns to voColumns1
	Handle hoColumns1
	Get Create (RefClass(cComColumns)) to hoColumns1
	Set pvComObject of hoColumns1 to voColumns1
		Variant voColumn1
		Get ComAdd of hoColumns1 "P2" to voColumn1
		Handle hoColumn1
		Get Create (RefClass(cComColumn)) to hoColumn1
		Set pvComObject of hoColumn1 to voColumn1
			Set ComDef of hoColumn1 OLEexCellHasCheckBox to True
			Set ComPartialCheck of hoColumn1 to True
		Send Destroy to hoColumn1
	Send Destroy to hoColumns1
	Variant voItems1
	Get ComItems to voItems1
	Handle hoItems1
	Get Create (RefClass(cComItems)) to hoItems1
	Set pvComObject of hoItems1 to voItems1
		Variant h
		Get ComAddItem of hoItems1 "Root" to h
		Get ComInsertItem of hoItems1 h "Child 1" to Nothing
		Get ComInsertItem of hoItems1 h "Child 2" to Nothing
		Set ComExpandItem of hoItems1 h to True
	Send Destroy to hoItems1
	Send ComEndUpdate
End_Procedure
984:
How do I get sorted the column as string, numeric, date, date and time. Also how can it be applied to drop down filter panel

Procedure OnCreate
	Forward Send OnCreate
	Send ComBeginUpdate
	Variant voColumns
	Get ComColumns to voColumns
	Handle hoColumns
	Get Create (RefClass(cComColumns)) to hoColumns
	Set pvComObject of hoColumns to voColumns
		Variant voColumn
		Get ComAdd of hoColumns "Date" to voColumn
		Handle hoColumn
		Get Create (RefClass(cComColumn)) to hoColumn
		Set pvComObject of hoColumn to voColumn
			Set ComSortType of hoColumn to OLESortDate
			Set ComDisplayFilterButton of hoColumn to True
			Set ComDisplayFilterPattern of hoColumn to False
			Set ComDisplayFilterDate of hoColumn to True
			Set ComFilterList of hoColumn to (OLEexShowFocusItem + OLEexShowCheckBox + OLEexSortItemsDesc)
		Send Destroy to hoColumn
	Send Destroy to hoColumns
	Variant voColumns1
	Get ComColumns to voColumns1
	Handle hoColumns1
	Get Create (RefClass(cComColumns)) to hoColumns1
	Set pvComObject of hoColumns1 to voColumns1
		Variant voColumn1
		Get ComAdd of hoColumns1 "DateTime" to voColumn1
		Handle hoColumn1
		Get Create (RefClass(cComColumn)) to hoColumn1
		Set pvComObject of hoColumn1 to voColumn1
			Set ComSortType of hoColumn1 to OLESortDateTime
			Set ComDisplayFilterButton of hoColumn1 to True
			Set ComDisplayFilterPattern of hoColumn1 to False
			Set ComFilterList of hoColumn1 to (OLEexShowFocusItem + OLEexShowCheckBox + OLEexSortItemsDesc)
		Send Destroy to hoColumn1
	Send Destroy to hoColumns1
	Variant voColumns2
	Get ComColumns to voColumns2
	Handle hoColumns2
	Get Create (RefClass(cComColumns)) to hoColumns2
	Set pvComObject of hoColumns2 to voColumns2
		Variant voColumn2
		Get ComAdd of hoColumns2 "Time" to voColumn2
		Handle hoColumn2
		Get Create (RefClass(cComColumn)) to hoColumn2
		Set pvComObject of hoColumn2 to voColumn2
			Set ComSortType of hoColumn2 to OLESortTime
			Set ComDisplayFilterButton of hoColumn2 to True
			Set ComDisplayFilterPattern of hoColumn2 to False
			Set ComFilterList of hoColumn2 to (OLEexShowFocusItem + OLEexShowCheckBox + OLEexSortItemsDesc)
			Set ComFormatColumn of hoColumn2 to "time(value)"
		Send Destroy to hoColumn2
	Send Destroy to hoColumns2
	Variant voColumns3
	Get ComColumns to voColumns3
	Handle hoColumns3
	Get Create (RefClass(cComColumns)) to hoColumns3
	Set pvComObject of hoColumns3 to voColumns3
		Variant voColumn3
		Get ComAdd of hoColumns3 "Numeric" to voColumn3
		Handle hoColumn3
		Get Create (RefClass(cComColumn)) to hoColumn3
		Set pvComObject of hoColumn3 to voColumn3
			Set ComSortType of hoColumn3 to OLESortNumeric
			Set ComDisplayFilterButton of hoColumn3 to True
			Set ComFilterList of hoColumn3 to (OLEexShowFocusItem + OLEexShowCheckBox + OLEexSortItemsDesc)
		Send Destroy to hoColumn3
	Send Destroy to hoColumns3
	Variant voColumns4
	Get ComColumns to voColumns4
	Handle hoColumns4
	Get Create (RefClass(cComColumns)) to hoColumns4
	Set pvComObject of hoColumns4 to voColumns4
		Variant voColumn4
		Get ComAdd of hoColumns4 "String" to voColumn4
		Handle hoColumn4
		Get Create (RefClass(cComColumn)) to hoColumn4
		Set pvComObject of hoColumn4 to voColumn4
			Set ComDisplayFilterButton of hoColumn4 to True
			Set ComFilterList of hoColumn4 to (OLEexShowFocusItem + OLEexShowCheckBox + OLEexSortItemsDesc)
		Send Destroy to hoColumn4
	Send Destroy to hoColumns4
	Variant voItems
	Get ComItems to voItems
	Handle hoItems
	Get Create (RefClass(cComItems)) to hoItems
	Set pvComObject of hoItems to voItems
		Variant h
		Get ComAddItem of hoItems "1/27/2010" to h
		Set ComCellValue of hoItems h 1 to "1/27/2010 10:00:00 AM"
		Set ComCellValue of hoItems h 2 to (ComCellValue(hoItems,h,1))
		Set ComCellValue of hoItems h 3 to 1
		Set ComCellValue of hoItems h 4 to (ComCellValue(hoItems,h,3))
		Get ComAddItem of hoItems "1/27/2011" to h
		Set ComCellValue of hoItems h 1 to "1/27/2011 9:00:00 AM"
		Set ComCellValue of hoItems h 2 to (ComCellValue(hoItems,h,1))
		Set ComCellValue of hoItems h 3 to 11
		Set ComCellValue of hoItems h 4 to (ComCellValue(hoItems,h,3))
		Get ComAddItem of hoItems "11/2/2010" to h
		Set ComCellValue of hoItems h 1 to "11/2/2010 9:00:00 AM"
		Set ComCellValue of hoItems h 2 to (ComCellValue(hoItems,h,1))
		Set ComCellValue of hoItems h 3 to 2
		Set ComCellValue of hoItems h 4 to (ComCellValue(hoItems,h,3))
	Send Destroy to hoItems
	Variant voColumns5
	Get ComColumns to voColumns5
	Handle hoColumns5
	Get Create (RefClass(cComColumns)) to hoColumns5
	Set pvComObject of hoColumns5 to voColumns5
		Variant voColumn5
		Get ComItem of hoColumns5 "DateTime" to voColumn5
		Handle hoColumn5
		Get Create (RefClass(cComColumn)) to hoColumn5
		Set pvComObject of hoColumn5 to voColumn5
			Set ComDisplayFilterDate of hoColumn5 to False
		Send Destroy to hoColumn5
	Send Destroy to hoColumns5
	Send ComEndUpdate
End_Procedure
983:
I am using Layout property to sort multiple columns at once. The problem is that all items get expanded. How do I prevent that

Procedure OnCreate
	Forward Send OnCreate
	Send ComBeginUpdate
	Set ComLinesAtRoot to OLEexLinesAtRoot
	Variant voColumns
	Get ComColumns to voColumns
	Handle hoColumns
	Get Create (RefClass(cComColumns)) to hoColumns
	Set pvComObject of hoColumns to voColumns
		Variant voColumn
		Get ComAdd of hoColumns "P1" to voColumn
		Handle hoColumn
		Get Create (RefClass(cComColumn)) to hoColumn
		Set pvComObject of hoColumn to voColumn
			Set ComDef of hoColumn OLEexCellHasCheckBox to True
			Set ComPartialCheck of hoColumn to True
		Send Destroy to hoColumn
	Send Destroy to hoColumns
	Variant voColumns1
	Get ComColumns to voColumns1
	Handle hoColumns1
	Get Create (RefClass(cComColumns)) to hoColumns1
	Set pvComObject of hoColumns1 to voColumns1
		Variant voColumn1
		Get ComAdd of hoColumns1 "P2" to voColumn1
		Handle hoColumn1
		Get Create (RefClass(cComColumn)) to hoColumn1
		Set pvComObject of hoColumn1 to voColumn1
			Set ComDef of hoColumn1 OLEexCellHasCheckBox to True
			Set ComPartialCheck of hoColumn1 to True
			Set ComFormatColumn of hoColumn1 to "1 index ``"
		Send Destroy to hoColumn1
	Send Destroy to hoColumns1
	Variant voItems
	Get ComItems to voItems
	Handle hoItems
	Get Create (RefClass(cComItems)) to hoItems
	Set pvComObject of hoItems to voItems
		Variant h
		Get ComAddItem of hoItems "Root" to h
		Get ComInsertItem of hoItems h "Child A" to Nothing
		Get ComInsertItem of hoItems h "Child B" to Nothing
		Get ComInsertItem of hoItems h "Child A" to Nothing
		Get ComInsertItem of hoItems h "Child B" to Nothing
		Get ComAddItem of hoItems "Root" to Nothing
		Get ComAddItem of hoItems "Root" to Nothing
	Send Destroy to hoItems
	Set ComSingleSort to False
	Set ComLayout to "multiplesort="C0:1 C1:2";collapse="""
	Send ComEndUpdate
End_Procedure
982:
How do I find the cell's type, or what the cell holds

Procedure OnCreate
	Forward Send OnCreate
	Send ComBeginUpdate
	Set ComDrawGridLines to OLEexRowLines
	Variant voColumns
	Get ComColumns to voColumns
	Handle hoColumns
	Get Create (RefClass(cComColumns)) to hoColumns
	Set pvComObject of hoColumns to voColumns
		Variant voColumn
		Get ComAdd of hoColumns "Value" to voColumn
		Handle hoColumn
		Get Create (RefClass(cComColumn)) to hoColumn
		Set pvComObject of hoColumn to voColumn
			Set ComWidth of hoColumn to 24
		Send Destroy to hoColumn
		Variant voColumn1
		Get ComAdd of hoColumns "Type" to voColumn1
		Handle hoColumn1
		Get Create (RefClass(cComColumn)) to hoColumn1
		Set pvComObject of hoColumn1 to voColumn1
			Set ComFormatColumn of hoColumn1 to "type(%0)"
		Send Destroy to hoColumn1
		Variant voColumn2
		Get ComAdd of hoColumns "TypeAsString" to voColumn2
		Handle hoColumn2
		Get Create (RefClass(cComColumn)) to hoColumn2
		Set pvComObject of hoColumn2 to voColumn2
			Set ComFormatColumn of hoColumn2 to "(0 := type(%0)) array (`empty`, `null`, `short`, `long`, `float`, `double`, `currency`, `date`, `string`, `object`, `error`, `boolean`, `variant`, `any`, `reserved`, `decimal`, `char`, `byte`, `unsigned short`, `unsigned long`, `long on 64 bits`)"
		Send Destroy to hoColumn2
		Variant voColumn3
		Get ComAdd of hoColumns "Length" to voColumn3
		Handle hoColumn3
		Get Create (RefClass(cComColumn)) to hoColumn3
		Set pvComObject of hoColumn3 to voColumn3
			Set ComFormatColumn of hoColumn3 to "len(%0)"
		Send Destroy to hoColumn3
	Send Destroy to hoColumns
	Variant voItems
	Get ComItems to voItems
	Handle hoItems
	Get Create (RefClass(cComItems)) to hoItems
	Set pvComObject of hoItems to voItems
		Get ComAddItem of hoItems Nothing to Nothing
		Get ComAddItem of hoItems "" to Nothing
		Set ComCellValue of hoItems (ComAddItem(hoItems,Nothing)) 0 to (pvComObject(Self))
		Set ComCellValue of hoItems (ComAddItem(hoItems,Nothing)) 0 to True
		Set ComCellValue of hoItems (ComAddItem(hoItems,Nothing)) 0 to -1
		Set ComCellValue of hoItems (ComAddItem(hoItems,Nothing)) 0 to -1
		Set ComCellValue of hoItems (ComAddItem(hoItems,Nothing)) 0 to "1/1/2001"
	Send Destroy to hoItems
	Send ComEndUpdate
End_Procedure
981:
How can I get ride / hide the image being dragged by OLE Drag and Drop
// Occurs when the OLEDrag method is called.
Procedure OnComOLEStartDrag Variant   llData Integer   llAllowedEffects
	Forward Send OnComOLEStartDrag llData llAllowedEffects
	// Data.SetData("data to drag")
	Move 1 to AllowedEffects
End_Procedure

Procedure OnCreate
	Forward Send OnCreate
	Set ComOLEDropMode to OLEexOLEDropManual
	Set ComBackground OLEexDragDropAfter to (RGB(255,255,255))
	Set ComLinesAtRoot to OLEexLinesAtRoot
	Variant voColumns
	Get ComColumns to voColumns
	Handle hoColumns
	Get Create (RefClass(cComColumns)) to hoColumns
	Set pvComObject of hoColumns to voColumns
		Get ComAdd of hoColumns "Default" to Nothing
	Send Destroy to hoColumns
	Variant voItems
	Get ComItems to voItems
	Handle hoItems
	Get Create (RefClass(cComItems)) to hoItems
	Set pvComObject of hoItems to voItems
		Variant h
		Get ComAddItem of hoItems "Root" to h
		Get ComInsertItem of hoItems h "Child 1" to Nothing
		Get ComInsertItem of hoItems h "Child 2" to Nothing
		Set ComExpandItem of hoItems h to True
	Send Destroy to hoItems
End_Procedure
980:
The ReadOnly property does not prevent changing the column's check-box (sample 2)

Procedure OnCreate
	Forward Send OnCreate
	Send ComBeginUpdate
	Set ComShowFocusRect to False
	Variant voColumns
	Get ComColumns to voColumns
	Handle hoColumns
	Get Create (RefClass(cComColumns)) to hoColumns
	Set pvComObject of hoColumns to voColumns
		Variant voColumn
		Get ComAdd of hoColumns "C1" to voColumn
		Handle hoColumn
		Get Create (RefClass(cComColumn)) to hoColumn
		Set pvComObject of hoColumn to voColumn
			Set ComAllowSizing of hoColumn to False
			Set ComWidth of hoColumn to 18
			Variant voEditor
			Get ComEditor of hoColumn to voEditor
			Handle hoEditor
			Get Create (RefClass(cComEditor)) to hoEditor
			Set pvComObject of hoEditor to voEditor
				Set ComEditType of hoEditor to OLECheckValueType
			Send Destroy to hoEditor
		Send Destroy to hoColumn
	Send Destroy to hoColumns
	Variant voColumns1
	Get ComColumns to voColumns1
	Handle hoColumns1
	Get Create (RefClass(cComColumns)) to hoColumns1
	Set pvComObject of hoColumns1 to voColumns1
		Get ComAdd of hoColumns1 "C2" to Nothing
	Send Destroy to hoColumns1
	Variant voItems
	Get ComItems to voItems
	Handle hoItems
	Get Create (RefClass(cComItems)) to hoItems
	Set pvComObject of hoItems to voItems
		Set ComCellValue of hoItems (ComAddItem(hoItems,0)) 1 to "Item 1"
		Set ComCellValue of hoItems (ComAddItem(hoItems,-1)) 1 to "Item 2"
		Set ComCellValue of hoItems (ComAddItem(hoItems,0)) 1 to "Item 3"
	Send Destroy to hoItems
	Set ComReadOnly to True
	Variant voColumns2
	Get ComColumns to voColumns2
	Handle hoColumns2
	Get Create (RefClass(cComColumns)) to hoColumns2
	Set pvComObject of hoColumns2 to voColumns2
		Variant voColumn1
		Get ComItem of hoColumns2 0 to voColumn1
		Handle hoColumn1
		Get Create (RefClass(cComColumn)) to hoColumn1
		Set pvComObject of hoColumn1 to voColumn1
			Variant voEditor1
			Get ComEditor of hoColumn1 to voEditor1
			Handle hoEditor1
			Get Create (RefClass(cComEditor)) to hoEditor1
			Set pvComObject of hoEditor1 to voEditor1
				Set ComOption of hoEditor1 OLEexCheckValue2 to 2
			Send Destroy to hoEditor1
		Send Destroy to hoColumn1
	Send Destroy to hoColumns2
	Send ComEndUpdate
End_Procedure
979:
The ReadOnly property does not prevent changing the column's check-box (sample 1)

Procedure OnCreate
	Forward Send OnCreate
	Send ComBeginUpdate
	Set ComShowFocusRect to False
	Variant voColumns
	Get ComColumns to voColumns
	Handle hoColumns
	Get Create (RefClass(cComColumns)) to hoColumns
	Set pvComObject of hoColumns to voColumns
		Variant voColumn
		Get ComAdd of hoColumns "C1" to voColumn
		Handle hoColumn
		Get Create (RefClass(cComColumn)) to hoColumn
		Set pvComObject of hoColumn to voColumn
			Set ComAllowSizing of hoColumn to False
			Set ComWidth of hoColumn to 18
			Variant voEditor
			Get ComEditor of hoColumn to voEditor
			Handle hoEditor
			Get Create (RefClass(cComEditor)) to hoEditor
			Set pvComObject of hoEditor to voEditor
				Set ComEditType of hoEditor to OLECheckValueType
				Set ComOption of hoEditor OLEexCheckValue2 to 1
			Send Destroy to hoEditor
		Send Destroy to hoColumn
	Send Destroy to hoColumns
	Variant voColumns1
	Get ComColumns to voColumns1
	Handle hoColumns1
	Get Create (RefClass(cComColumns)) to hoColumns1
	Set pvComObject of hoColumns1 to voColumns1
		Get ComAdd of hoColumns1 "C2" to Nothing
	Send Destroy to hoColumns1
	Variant voItems
	Get ComItems to voItems
	Handle hoItems
	Get Create (RefClass(cComItems)) to hoItems
	Set pvComObject of hoItems to voItems
		Set ComCellValue of hoItems (ComAddItem(hoItems,0)) 1 to "Item 1"
		Set ComCellValue of hoItems (ComAddItem(hoItems,-1)) 1 to "Item 2"
		Set ComCellValue of hoItems (ComAddItem(hoItems,0)) 1 to "Item 3"
	Send Destroy to hoItems
	Set ComReadOnly to True
	Send ComEndUpdate
End_Procedure
978:
How can I export checked items only

Procedure OnCreate
	Forward Send OnCreate
	Send ComBeginUpdate
	Variant voColumns
	Get ComColumns to voColumns
	Handle hoColumns
	Get Create (RefClass(cComColumns)) to hoColumns
	Set pvComObject of hoColumns to voColumns
		Variant voColumn
		Get ComAdd of hoColumns "C1" to voColumn
		Handle hoColumn
		Get Create (RefClass(cComColumn)) to hoColumn
		Set pvComObject of hoColumn to voColumn
			Set ComDef of hoColumn OLEexCellHasCheckBox to True
		Send Destroy to hoColumn
		Variant voColumn1
		Get ComAdd of hoColumns "C2" to voColumn1
		Handle hoColumn1
		Get Create (RefClass(cComColumn)) to hoColumn1
		Set pvComObject of hoColumn1 to voColumn1
			Set ComFormatColumn of hoColumn1 to "1 index `A-Z`"
		Send Destroy to hoColumn1
		Variant voColumn2
		Get ComAdd of hoColumns "C3" to voColumn2
		Handle hoColumn2
		Get Create (RefClass(cComColumn)) to hoColumn2
		Set pvComObject of hoColumn2 to voColumn2
			Set ComFormatColumn of hoColumn2 to "100 index ``"
		Send Destroy to hoColumn2
	Send Destroy to hoColumns
	Variant voItems
	Get ComItems to voItems
	Handle hoItems
	Get Create (RefClass(cComItems)) to hoItems
	Set pvComObject of hoItems to voItems
		Get ComAddItem of hoItems "Item 1" to Nothing
		Set ComCellState of hoItems (ComAddItem(hoItems,"Item 2")) Nothing to 1
		Set ComCellState of hoItems (ComAddItem(hoItems,"Item 3")) Nothing to 1
	Send Destroy to hoItems
	Send ComEndUpdate
	Showln "Export CSV Checked Items Only:"
	Showln (ComExport(Self,"","chk"))
End_Procedure
977:
How can I export a hidden column

Procedure OnCreate
	Forward Send OnCreate
	Send ComBeginUpdate
	Variant voColumns
	Get ComColumns to voColumns
	Handle hoColumns
	Get Create (RefClass(cComColumns)) to hoColumns
	Set pvComObject of hoColumns to voColumns
		Get ComAdd of hoColumns "C1" to Nothing
		Variant voColumn
		Get ComAdd of hoColumns "C2" to voColumn
		Handle hoColumn
		Get Create (RefClass(cComColumn)) to hoColumn
		Set pvComObject of hoColumn to voColumn
			Set ComFormatColumn of hoColumn to "1 index `A-Z`"
			Set ComVisible of hoColumn to False
		Send Destroy to hoColumn
		Variant voColumn1
		Get ComAdd of hoColumns "C3" to voColumn1
		Handle hoColumn1
		Get Create (RefClass(cComColumn)) to hoColumn1
		Set pvComObject of hoColumn1 to voColumn1
			Set ComFormatColumn of hoColumn1 to "100 index ``"
			Set ComVisible of hoColumn1 to False
		Send Destroy to hoColumn1
	Send Destroy to hoColumns
	Variant voItems
	Get ComItems to voItems
	Handle hoItems
	Get Create (RefClass(cComItems)) to hoItems
	Set pvComObject of hoItems to voItems
		Get ComAddItem of hoItems "Item 1" to Nothing
		Get ComAddItem of hoItems "Item 2" to Nothing
		Get ComAddItem of hoItems "Item 3" to Nothing
	Send Destroy to hoItems
	Send ComEndUpdate
	Showln "Export CSV Hidden Columns (1,2):"
	Showln (ComExport(Self,"","|1,2"))
End_Procedure
976:
I'm trying to use automatic numbering of the outline. How can I have A, B, C for root items, 1, 2, 3 for the sub-items, and a, b, c for sub-sub-items (sample 3)

Procedure OnCreate
	Forward Send OnCreate
	Send ComBeginUpdate
	Set ComLinesAtRoot to OLEexLinesAtRoot
	Set ComDrawGridLines to OLEexRowLines
	Set ComAutoDrag to OLEexAutoDragPositionAny
	Set ComHasLines to OLEexSolidLine
	Set ComIndent to 16
	Set ComMarkSearchColumn to False
	Variant voColumns
	Get ComColumns to voColumns
	Handle hoColumns
	Get Create (RefClass(cComColumns)) to hoColumns
	Set pvComObject of hoColumns to voColumns
		Variant voColumn
		Get ComAdd of hoColumns "" to voColumn
		Handle hoColumn
		Get Create (RefClass(cComColumn)) to hoColumn
		Set pvComObject of hoColumn to voColumn
			Set ComDef of hoColumn OLEexCellValueFormat to 1
			Set ComFormatColumn of hoColumn to "((1:=(0 :=(1 rpos '.|A-Z||a-z|')) rfind `.`) < 0 ? `<b>` + =:0 + `` :  (=:0 mid (1 + 1 + =:1) )  + `)` ) + ` ` + value"
		Send Destroy to hoColumn
	Send Destroy to hoColumns
	Variant voItems
	Get ComItems to voItems
	Handle hoItems
	Get Create (RefClass(cComItems)) to hoItems
	Set pvComObject of hoItems to voItems
		Variant h
		Get ComAddItem of hoItems "Root" to h
		Get ComInsertItem of hoItems h "Child" to Nothing
		Variant hChild
		Get ComInsertItem of hoItems h "Child" to hChild
		Get ComInsertItem of hoItems hChild "Child" to Nothing
		Get ComInsertItem of hoItems hChild "Child" to Nothing
		Get ComInsertItem of hoItems hChild "Child" to Nothing
		Get ComInsertItem of hoItems h "Child" to Nothing
		Set ComExpandItem of hoItems 0 to True
		Get ComAddItem of hoItems "Root" to h
		Get ComInsertItem of hoItems h "Child" to Nothing
		Get ComInsertItem of hoItems h "Child" to hChild
		Set ComCellState of hoItems hChild 0 to 1
		Get ComInsertItem of hoItems hChild "Child" to Nothing
		Get ComInsertItem of hoItems hChild "Child" to Nothing
		Get ComInsertItem of hoItems hChild "Child" to Nothing
		Get ComInsertItem of hoItems h "Child" to Nothing
	Send Destroy to hoItems
	Send ComEndUpdate
End_Procedure
975:
I'm trying to use automatic numbering of the outline. How can I have A, B, C for root items, 1, 2, 3 for the sub-items, and a, b, c for sub-sub-items (sample 2)

Procedure OnCreate
	Forward Send OnCreate
	Send ComBeginUpdate
	Set ComLinesAtRoot to OLEexLinesAtRoot
	Set ComGridLineColor to (RGB(190,190,190))
	Set ComDrawGridLines to OLEexRowLines
	Set ComAutoDrag to OLEexAutoDragPositionAny
	Set ComHasLines to OLEexSolidLine
	Set ComIndent to 16
	Variant voColumns
	Get ComColumns to voColumns
	Handle hoColumns
	Get Create (RefClass(cComColumns)) to hoColumns
	Set pvComObject of hoColumns to voColumns
		Get ComAdd of hoColumns "Default" to Nothing
		Variant voColumn
		Get ComAdd of hoColumns "" to voColumn
		Handle hoColumn
		Get Create (RefClass(cComColumn)) to hoColumn
		Set pvComObject of hoColumn to voColumn
			Set ComDef of hoColumn OLEexCellValueFormat to 1
			Set ComDef of hoColumn OLEexCellPaddingRight to 4
			Set ComAllowSizing of hoColumn to False
			Set ComWidth of hoColumn to 36
			Set ComPosition of hoColumn to 0
			Set ComFormatColumn of hoColumn to "(1:=(0 :=(1 rpos '.|A-Z||a-z|')) rfind `.`) < 0 ? `<b>` + =:0 : (`............` left 2 * (=:0 count `.`)) + (=:0 mid (1 + 1 + =:1) ) "
		Send Destroy to hoColumn
	Send Destroy to hoColumns
	Variant voItems
	Get ComItems to voItems
	Handle hoItems
	Get Create (RefClass(cComItems)) to hoItems
	Set pvComObject of hoItems to voItems
		Variant h
		Get ComAddItem of hoItems "Root" to h
		Get ComInsertItem of hoItems h "Child" to Nothing
		Variant hChild
		Get ComInsertItem of hoItems h "Child" to hChild
		Get ComInsertItem of hoItems hChild "Child" to Nothing
		Get ComInsertItem of hoItems hChild "Child" to Nothing
		Get ComInsertItem of hoItems hChild "Child" to Nothing
		Get ComInsertItem of hoItems h "Child" to Nothing
		Set ComExpandItem of hoItems 0 to True
		Get ComAddItem of hoItems "Root" to h
		Get ComInsertItem of hoItems h "Child" to Nothing
		Get ComInsertItem of hoItems h "Child" to hChild
		Set ComCellState of hoItems hChild 0 to 1
		Get ComInsertItem of hoItems hChild "Child" to Nothing
		Get ComInsertItem of hoItems hChild "Child" to Nothing
		Get ComInsertItem of hoItems hChild "Child" to Nothing
		Get ComInsertItem of hoItems h "Child" to Nothing
	Send Destroy to hoItems
	Send ComEndUpdate
End_Procedure
974:
I'm trying to use automatic numbering of the outline. How can I have A, B, C for root items, 1, 2, 3 for the sub-items, and a, b, c for sub-sub-items (sample 1)

Procedure OnCreate
	Forward Send OnCreate
	Send ComBeginUpdate
	Set ComLinesAtRoot to OLEexLinesAtRoot
	Set ComDrawGridLines to OLEexRowLines
	Set ComAutoDrag to OLEexAutoDragPositionAny
	Set ComHasLines to OLEexSolidLine
	Set ComIndent to 16
	Variant voColumns
	Get ComColumns to voColumns
	Handle hoColumns
	Get Create (RefClass(cComColumns)) to hoColumns
	Set pvComObject of hoColumns to voColumns
		Get ComAdd of hoColumns "Default" to Nothing
		Variant voColumn
		Get ComAdd of hoColumns "" to voColumn
		Handle hoColumn
		Get Create (RefClass(cComColumn)) to hoColumn
		Set pvComObject of hoColumn to voColumn
			Set ComDef of hoColumn OLEexCellValueFormat to 1
			Set ComDef of hoColumn OLEexCellPaddingRight to 4
			Set ComAlignment of hoColumn to OLERightAlignment
			Set ComAllowSizing of hoColumn to False
			Set ComWidth of hoColumn to 24
			Set ComPosition of hoColumn to 0
			Set ComFormatColumn of hoColumn to "(1:=(0 :=(1 rpos '.|A-Z||a-z|')) rfind `.`) < 0 ? `<b>` + =:0 : `<i>` + (=:0 mid (1 + 1 + =:1) ) "
		Send Destroy to hoColumn
	Send Destroy to hoColumns
	Variant voItems
	Get ComItems to voItems
	Handle hoItems
	Get Create (RefClass(cComItems)) to hoItems
	Set pvComObject of hoItems to voItems
		Variant h
		Get ComAddItem of hoItems "Root" to h
		Get ComInsertItem of hoItems h "Child" to Nothing
		Variant hChild
		Get ComInsertItem of hoItems h "Child" to hChild
		Get ComInsertItem of hoItems hChild "Child" to Nothing
		Get ComInsertItem of hoItems hChild "Child" to Nothing
		Get ComInsertItem of hoItems hChild "Child" to Nothing
		Get ComInsertItem of hoItems h "Child" to Nothing
		Set ComExpandItem of hoItems 0 to True
		Get ComAddItem of hoItems "Root" to h
		Get ComInsertItem of hoItems h "Child" to Nothing
		Get ComInsertItem of hoItems h "Child" to hChild
		Set ComCellState of hoItems hChild 0 to 1
		Get ComInsertItem of hoItems hChild "Child" to Nothing
		Get ComInsertItem of hoItems hChild "Child" to Nothing
		Get ComInsertItem of hoItems hChild "Child" to Nothing
		Get ComInsertItem of hoItems h "Child" to Nothing
	Send Destroy to hoItems
	Send ComEndUpdate
End_Procedure
973:
How can I programmatically group by columns, without having the control's sort bar visible

Procedure OnCreate
	Forward Send OnCreate
	Send ComBeginUpdate
	Set ComColumnAutoResize to False
	Variant rs
	Get Comcreateobject "ADOR.Recordset" to rs
		Send ComOpen "Orders" "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Program Files\Exontrol\ExGrid\Sample\SAMPLE.MDB" OLEadOpenStatic OLEadLockOptimistic Nothing
	Set ComDataSource to rs
	Set ComSortBarHeight to 0
	Set ComSortBarVisible to True
	Set ComSortBarCaption to "Drag a <b>column</b> header here to group by that column."
	Set ComAllowGroupBy to True
	Set ComLayout to "multiplesort="C1:2""
	Send ComEndUpdate
End_Procedure
972:
How do I perform my own sort

// Fired when the control sorts a column.
Procedure OnComSort 
	Forward Send OnComSort 
	Showln "Sort"
	Variant voItems
	Get ComItems to voItems
	Handle hoItems
	Get Create (RefClass(cComItems)) to hoItems
	Set pvComObject of hoItems to voItems
		Set ComItemPosition of hoItems (ComItemByIndex(hoItems,1)) to 0
		Set ComItemPosition of hoItems (ComItemByIndex(hoItems,0)) to 1
	Send Destroy to hoItems
End_Procedure

Procedure OnCreate
	Forward Send OnCreate
	Send ComBeginUpdate
	Set ComSingleSort to False
	Set ComSortOnClick to OLEexUserSort
	Variant voColumns
	Get ComColumns to voColumns
	Handle hoColumns
	Get Create (RefClass(cComColumns)) to hoColumns
	Set pvComObject of hoColumns to voColumns
		Variant voColumn
		Get ComAdd of hoColumns "Index" to voColumn
		Handle hoColumn
		Get Create (RefClass(cComColumn)) to hoColumn
		Set pvComObject of hoColumn to voColumn
			Set ComFormatColumn of hoColumn to "0 index ``"
		Send Destroy to hoColumn
		Get ComAdd of hoColumns "Data 1" to Nothing
		Get ComAdd of hoColumns "Data 2" to Nothing
	Send Destroy to hoColumns
	Variant voItems1
	Get ComItems to voItems1
	Handle hoItems1
	Get Create (RefClass(cComItems)) to hoItems1
	Set pvComObject of hoItems1 to voItems1
		Variant h
		Get ComAddItem of hoItems1 0 to h
		Set ComCellValue of hoItems1 h 1 to 2
		Set ComCellValue of hoItems1 h 2 to 3
		Get ComAddItem of hoItems1 4 to h
		Set ComCellValue of hoItems1 h 1 to 5
		Set ComCellValue of hoItems1 h 2 to 6
		Get ComAddItem of hoItems1 7 to h
		Set ComCellValue of hoItems1 h 1 to 8
		Set ComCellValue of hoItems1 h 2 to 9
	Send Destroy to hoItems1
	Set ComLayout to "multiplesort="C1:1 C2:2""
	Send ComEndUpdate
End_Procedure
971:
Is it possible to have a different alignment for parts of the cell's caption

Procedure OnCreate
	Forward Send OnCreate
	Send ComBeginUpdate
	Set ComTreeColumnIndex to -1
	Set ComDrawGridLines to OLEexRowLines
	Variant voColumns
	Get ComColumns to voColumns
	Handle hoColumns
	Get Create (RefClass(cComColumns)) to hoColumns
	Set pvComObject of hoColumns to voColumns
		Variant voColumn
		Get ComAdd of hoColumns "Default" to voColumn
		Handle hoColumn
		Get Create (RefClass(cComColumn)) to hoColumn
		Set pvComObject of hoColumn to voColumn
			Set ComDef of hoColumn OLEexCellHasCheckBox to True
		Send Destroy to hoColumn
	Send Destroy to hoColumns
	Variant voItems
	Get ComItems to voItems
	Handle hoItems
	Get Create (RefClass(cComItems)) to hoItems
	Set pvComObject of hoItems to voItems
		Set ComCellHAlignment of hoItems (ComAddItem(hoItems,"all-left")) 0 to OLELeftAlignment
		Set ComCellHAlignment of hoItems (ComAddItem(hoItems,"all-center")) 0 to OLECenterAlignment
		Set ComCellHAlignment of hoItems (ComAddItem(hoItems,"all-right")) 0 to OLERightAlignment
		Variant h
		Get ComAddItem of hoItems "left<c>center<r>right" to h
		Set ComCellValueFormat of hoItems h 0 to OLEexHTML
	Send Destroy to hoItems
	Send ComEndUpdate
End_Procedure
970:
I have a column with Def(exCellSingleLine) property on False, word-wrapping, and I am wondering if possible to update the column's content while user is resizing it
Procedure OnCreate
	Forward Send OnCreate
	Send ComBeginUpdate
	Variant voColumns
	Get ComColumns to voColumns
	Handle hoColumns
	Get Create (RefClass(cComColumns)) to hoColumns
	Set pvComObject of hoColumns to voColumns
		Variant voColumn
		Get ComAdd of hoColumns "MultipleLine" to voColumn
		Handle hoColumn
		Get Create (RefClass(cComColumn)) to hoColumn
		Set pvComObject of hoColumn to voColumn
			Set ComWidth of hoColumn to 32
			Set ComDef of hoColumn OLEexCellSingleLine to False
			Set ComDef of hoColumn OLEexColumnResizeContiguously to True
		Send Destroy to hoColumn
		Variant voColumn1
		Get ComAdd of hoColumns "SingleLine" to voColumn1
		Handle hoColumn1
		Get Create (RefClass(cComColumn)) to hoColumn1
		Set pvComObject of hoColumn1 to voColumn1
			Set ComDef of hoColumn1 OLEexCellSingleLine to False
		Send Destroy to hoColumn1
	Send Destroy to hoColumns
	Variant voItems
	Get ComItems to voItems
	Handle hoItems
	Get Create (RefClass(cComItems)) to hoItems
	Set pvComObject of hoItems to voItems
		Set ComCellValue of hoItems (ComAddItem(hoItems,"This is a bit of long text that should break the line")) 1 to "This is a bit of long text that should break the line"
	Send Destroy to hoItems
	Send ComEndUpdate
End_Procedure
969:
How can I get the absolute position of an item
// Occurs when the user moves the mouse.
Procedure OnComMouseMove Short   llButton Short   llShift OLE_XPOS_PIXELS   llX OLE_YPOS_PIXELS   llY
	Forward Send OnComMouseMove llButton llShift llX llY
	Variant voItems
	Get ComItems to voItems
	Handle hoItems
	Get Create (RefClass(cComItems)) to hoItems
	Set pvComObject of hoItems to voItems
		Variant vItem
			Get ComItemFromPoint -1 -1 c hit to vItem
		Showln (ComCellCaption(hoItems,vItem,"Position"))
	Send Destroy to hoItems
End_Procedure

Procedure OnCreate
	Forward Send OnCreate
	Send ComBeginUpdate
	Set ComBackColorAlternate to (RGB(240,240,240))
	Set ComLinesAtRoot to OLEexLinesAtRoot
	Variant voColumns
	Get ComColumns to voColumns
	Handle hoColumns
	Get Create (RefClass(cComColumns)) to hoColumns
	Set pvComObject of hoColumns to voColumns
		Variant voColumn
		Get ComAdd of hoColumns "Def" to voColumn
		Handle hoColumn
		Get Create (RefClass(cComColumn)) to hoColumn
		Set pvComObject of hoColumn to voColumn
			Set ComDisplayFilterButton of hoColumn to True
		Send Destroy to hoColumn
	Send Destroy to hoColumns
	Variant voItems1
	Get ComItems to voItems1
	Handle hoItems1
	Get Create (RefClass(cComItems)) to hoItems1
	Set pvComObject of hoItems1 to voItems1
		Variant h
		Get ComAddItem of hoItems1 "Root" to h
		Get ComInsertItem of hoItems1 (ComInsertItem(hoItems1,h,"Child 1")) "Sub-Child 1" to Nothing
		Get ComInsertItem of hoItems1 (ComInsertItem(hoItems1,h,"Child 2")) "Sub-Child 2" to Nothing
	Send Destroy to hoItems1
	Send ComPutItems (ComGetItems(Self,-1)) Nothing
	Send ComPutItems (ComGetItems(Self,-1)) Nothing
	Send ComPutItems (ComGetItems(Self,-1)) Nothing
	Variant voColumns1
	Get ComColumns to voColumns1
	Handle hoColumns1
	Get Create (RefClass(cComColumns)) to hoColumns1
	Set pvComObject of hoColumns1 to voColumns1
		Variant voColumn1
		Get ComAdd of hoColumns1 "Position" to voColumn1
		Handle hoColumn1
		Get Create (RefClass(cComColumn)) to hoColumn1
		Set pvComObject of hoColumn1 to voColumn1
			Set ComFormatColumn of hoColumn1 to "1 apos ``"
			Set ComVisible of hoColumn1 to False
		Send Destroy to hoColumn1
	Send Destroy to hoColumns1
	Send ComEndUpdate
End_Procedure
968:
I am using ExComboBox as an user editor, how can I display a different column

// Fired the user editor is about to be opened.
Procedure OnComUserEditorClose Variant   llObject HITEM   llItem Integer   llColIndex
	Forward Send OnComUserEditorClose llObject llItem llColIndex
	// Items.CellValue(Item,ColIndex) = Object.Value
End_Procedure

// Occurs when an user editor fires an event.
Procedure OnComUserEditorOleEvent Variant   llObject Variant   llEv Boolean   llCloseEditor HITEM   llItem Integer   llColIndex
	Forward Send OnComUserEditorOleEvent llObject llEv llCloseEditor llItem llColIndex
	Showln llEv
End_Procedure

// Occurs when an user editor is about to be opened.
Procedure OnComUserEditorOpen Variant   llObject HITEM   llItem Integer   llColIndex
	Forward Send OnComUserEditorOpen llObject llItem llColIndex
	// Object.Value = Me.Items.CellValue(Item,ColIndex)
End_Procedure

Procedure OnCreate
	Forward Send OnCreate
	Send ComBeginUpdate
	Variant voColumns
	Get ComColumns to voColumns
	Handle hoColumns
	Get Create (RefClass(cComColumns)) to hoColumns
	Set pvComObject of hoColumns to voColumns
		Variant voColumn
		Get ComAdd of hoColumns "Exontrol.ComboBox" to voColumn
		Handle hoColumn
		Get Create (RefClass(cComColumn)) to hoColumn
		Set pvComObject of hoColumn to voColumn
			Variant voEditor
			Get ComEditor of hoColumn to voEditor
			Handle hoEditor
			Get Create (RefClass(cComEditor)) to hoEditor
			Set pvComObject of hoEditor to voEditor
				Set ComEditType of hoEditor to OLEUserEditorType
				Send ComUserEditor of hoEditor "Exontrol.ComboBox" ""
				Variant voComboBox
				Get ComUserEditorObject of hoEditor to voComboBox
				Handle hoComboBox
				Get Create (RefClass(cComComboBox)) to hoComboBox
				Set pvComObject of hoComboBox to voComboBox
					Send ComBeginUpdate of hoComboBox
					Set ComStyle of hoComboBox to OLEDropDownList
					Set ComColumnAutoResize of hoComboBox to False
					Variant rs
					Get Comcreateobject of hoComboBox "ADOR.Recordset" to rs
						Send ComOpen of hoComboBox "Orders" "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Program Files\Exontrol\ExGrid\Sample\SAMPLE.MDB" OLEadOpenStatic OLEadLockOptimistic Nothing
					Send Destroy to hoComboBox
					Set ComDataSource of hoEditor to rs
					Set ComAlignment of hoEditor to OLELeftAlignment
					Set ComIntegralHeight of hoEditor to True
					Set ComMinHeightList of hoEditor to 128
					Set ComMinWidthList of hoEditor to 648
					Set ComHeaderHeight of hoEditor to 36
					Set ComAllowSizeGrip of hoEditor to True
					Set ComSingleEdit of hoEditor to True
					Set ComLabelColumnIndex of hoEditor to 7
					Set ComSearchColumnIndex of hoEditor to 0
					Variant voColumns1
					Get ComColumns of hoEditor to voColumns1
					Handle hoColumns1
					Get Create (RefClass(cComColumns)) to hoColumns1
					Set pvComObject of hoColumns1 to voColumns1
						Variant voColumn1
						Get ComItem of hoColumns1 0 to voColumn1
						Handle hoColumn1
						Get Create (RefClass(cComColumn)) to hoColumn1
						Set pvComObject of hoColumn1 to voColumn1
							Set ComHeaderBold of hoColumn1 to True
							Set ComHTMLCaption of hoColumn1 to "OrderID<br><fgcolor=808080>(search)"
						Send Destroy to hoColumn1
					Send Destroy to hoColumns1
					Variant voColumns2
					Get ComColumns of hoEditor to voColumns2
					Handle hoColumns2
					Get Create (RefClass(cComColumns)) to hoColumns2
					Set pvComObject of hoColumns2 to voColumns2
						Variant voColumn2
						Get ComItem of hoColumns2 7 to voColumn2
						Handle hoColumn2
						Get Create (RefClass(cComColumn)) to hoColumn2
						Set pvComObject of hoColumn2 to voColumn2
							Set ComHeaderBold of hoColumn2 to True
							Set ComHTMLCaption of hoColumn2 to "ShipName<br><fgcolor=808080>(display)"
							Set ComWidth of hoColumn2 to 128
						Send Destroy to hoColumn2
					Send Destroy to hoColumns2
					Set ComUseTabKey of hoEditor to False
					Send ComEndUpdate of hoEditor
				Send Destroy to hoEditor
			Send Destroy to hoColumn
		Send Destroy to hoColumns
	Set ComDrawGridLines to OLEexRowLines
	Set ComDefaultItemHeight to 21
	Variant voItems
	Get ComItems to voItems
	Handle hoItems
	Get Create (RefClass(cComItems)) to hoItems
	Set pvComObject of hoItems to voItems
		Set ComCellEditorVisible of hoItems (ComAddItem(hoItems,10248)) 0 to OLEexEditorVisible
		Set ComCellEditorVisible of hoItems (ComAddItem(hoItems,10249)) 0 to OLEexEditorVisible
		Set ComCellEditorVisible of hoItems (ComAddItem(hoItems,10250)) 0 to OLEexEditorVisible
	Send Destroy to hoItems
	Send ComEndUpdate
End_Procedure
967:
How do I sort the index column as numeric (Method 3)

// Occurs after a new Item has been inserted to Items collection.
Procedure OnComAddItem HITEM   llItem
	Forward Send OnComAddItem llItem
	Variant voItems
	Get ComItems to voItems
	Handle hoItems
	Get Create (RefClass(cComItems)) to hoItems
	Set pvComObject of hoItems to voItems
		Set ComCellData of hoItems llItem 1 to (ComCellCaption(hoItems,llItem,1))
	Send Destroy to hoItems
End_Procedure

Procedure OnCreate
	Forward Send OnCreate
	Send ComBeginUpdate
	Set ComDrawGridLines to OLEexAllLines
	Set ComColumnAutoResize to True
	Set ComShowFocusRect to False
	Variant voColumns
	Get ComColumns to voColumns
	Handle hoColumns
	Get Create (RefClass(cComColumns)) to hoColumns
	Set pvComObject of hoColumns to voColumns
		Variant voColumn
		Get ComAdd of hoColumns "Next" to voColumn
		Handle hoColumn
		Get Create (RefClass(cComColumn)) to hoColumn
		Set pvComObject of hoColumn to voColumn
			Set ComDef of hoColumn OLEexCellPaddingLeft to 4
			Set ComDef of hoColumn OLEexHeaderPaddingLeft to 4
		Send Destroy to hoColumn
	Send Destroy to hoColumns
	Variant voColumns1
	Get ComColumns to voColumns1
	Handle hoColumns1
	Get Create (RefClass(cComColumns)) to hoColumns1
	Set pvComObject of hoColumns1 to voColumns1
		Variant voColumn1
		Get ComAdd of hoColumns1 "Index" to voColumn1
		Handle hoColumn1
		Get Create (RefClass(cComColumn)) to hoColumn1
		Set pvComObject of hoColumn1 to voColumn1
			Set ComAllowSizing of hoColumn1 to False
			Set ComWidth of hoColumn1 to 48
			Set ComFormatColumn of hoColumn1 to "(((0 := (1 index ``)) mod 3) case ( default: ``; 0 : `<r><fgcolor=B0B0B0>`; 1: ``; 2 : `<c><fgcolor=808080>` )) + str(=:0)"
			Set ComDef of hoColumn1 OLEexCellValueFormat to 1
			Set ComSortType of hoColumn1 to OLESortUserData
			Set ComPosition of hoColumn1 to 0
		Send Destroy to hoColumn1
	Send Destroy to hoColumns1
	Variant voItems1
	Get ComItems to voItems1
	Handle hoItems1
	Get Create (RefClass(cComItems)) to hoItems1
	Set pvComObject of hoItems1 to voItems1
		Get ComAddItem of hoItems1 "Item 1" to Nothing
		Get ComAddItem of hoItems1 "Item 2" to Nothing
		Get ComAddItem of hoItems1 "Item 3" to Nothing
		Get ComAddItem of hoItems1 "Item 4" to Nothing
		Get ComAddItem of hoItems1 "Item 5" to Nothing
		Get ComAddItem of hoItems1 "Item 6" to Nothing
		Get ComAddItem of hoItems1 "Item 7" to Nothing
		Get ComAddItem of hoItems1 "Item 8" to Nothing
		Get ComAddItem of hoItems1 "Item 9" to Nothing
		Get ComAddItem of hoItems1 "Item 10" to Nothing
	Send Destroy to hoItems1
	Send ComEndUpdate
End_Procedure
966:
How do I sort the index column as numeric (Method 2)

// Occurs after a new Item has been inserted to Items collection.
Procedure OnComAddItem HITEM   llItem
	Forward Send OnComAddItem llItem
	Variant voItems
	Get ComItems to voItems
	Handle hoItems
	Get Create (RefClass(cComItems)) to hoItems
	Set pvComObject of hoItems to voItems
		Set ComCellSortData of hoItems llItem 1 to (ComCellCaption(hoItems,llItem,1))
	Send Destroy to hoItems
End_Procedure

Procedure OnCreate
	Forward Send OnCreate
	Send ComBeginUpdate
	Set ComDrawGridLines to OLEexAllLines
	Set ComColumnAutoResize to True
	Set ComShowFocusRect to False
	Variant voColumns
	Get ComColumns to voColumns
	Handle hoColumns
	Get Create (RefClass(cComColumns)) to hoColumns
	Set pvComObject of hoColumns to voColumns
		Variant voColumn
		Get ComAdd of hoColumns "Next" to voColumn
		Handle hoColumn
		Get Create (RefClass(cComColumn)) to hoColumn
		Set pvComObject of hoColumn to voColumn
			Set ComDef of hoColumn OLEexCellPaddingLeft to 4
			Set ComDef of hoColumn OLEexHeaderPaddingLeft to 4
		Send Destroy to hoColumn
	Send Destroy to hoColumns
	Variant voColumns1
	Get ComColumns to voColumns1
	Handle hoColumns1
	Get Create (RefClass(cComColumns)) to hoColumns1
	Set pvComObject of hoColumns1 to voColumns1
		Variant voColumn1
		Get ComAdd of hoColumns1 "Index" to voColumn1
		Handle hoColumn1
		Get Create (RefClass(cComColumn)) to hoColumn1
		Set pvComObject of hoColumn1 to voColumn1
			Set ComAllowSizing of hoColumn1 to False
			Set ComWidth of hoColumn1 to 48
			Set ComFormatColumn of hoColumn1 to "(((0 := (1 index ``)) mod 3) case ( default: ``; 0 : `<r><fgcolor=B0B0B0>`; 1: ``; 2 : `<c><fgcolor=808080>` )) + str(=:0)"
			Set ComDef of hoColumn1 OLEexCellValueFormat to 1
			Set ComSortType of hoColumn1 to OLESortCellData
			Set ComPosition of hoColumn1 to 0
		Send Destroy to hoColumn1
	Send Destroy to hoColumns1
	Variant voItems1
	Get ComItems to voItems1
	Handle hoItems1
	Get Create (RefClass(cComItems)) to hoItems1
	Set pvComObject of hoItems1 to voItems1
		Get ComAddItem of hoItems1 "Item 1" to Nothing
		Get ComAddItem of hoItems1 "Item 2" to Nothing
		Get ComAddItem of hoItems1 "Item 3" to Nothing
		Get ComAddItem of hoItems1 "Item 4" to Nothing
		Get ComAddItem of hoItems1 "Item 5" to Nothing
		Get ComAddItem of hoItems1 "Item 6" to Nothing
		Get ComAddItem of hoItems1 "Item 7" to Nothing
		Get ComAddItem of hoItems1 "Item 8" to Nothing
		Get ComAddItem of hoItems1 "Item 9" to Nothing
		Get ComAddItem of hoItems1 "Item 10" to Nothing
	Send Destroy to hoItems1
	Send ComEndUpdate
End_Procedure
965:
How do I sort the index column as numeric (Method 1)

Procedure OnCreate
	Forward Send OnCreate
	Send ComBeginUpdate
	Variant voColumns
	Get ComColumns to voColumns
	Handle hoColumns
	Get Create (RefClass(cComColumns)) to hoColumns
	Set pvComObject of hoColumns to voColumns
		Variant voColumn
		Get ComAdd of hoColumns "Sort Index As String (Default)" to voColumn
		Handle hoColumn
		Get Create (RefClass(cComColumn)) to hoColumn
		Set pvComObject of hoColumn to voColumn
			Set ComFormatColumn of hoColumn to "1 index ``"
		Send Destroy to hoColumn
	Send Destroy to hoColumns
	Variant voColumns1
	Get ComColumns to voColumns1
	Handle hoColumns1
	Get Create (RefClass(cComColumns)) to hoColumns1
	Set pvComObject of hoColumns1 to voColumns1
		Variant voColumn1
		Get ComAdd of hoColumns1 "Sort Index As Numeric" to voColumn1
		Handle hoColumn1
		Get Create (RefClass(cComColumn)) to hoColumn1
		Set pvComObject of hoColumn1 to voColumn1
			Set ComComputedField of hoColumn1 to "%C0"
			Set ComSortType of hoColumn1 to OLESortNumeric
		Send Destroy to hoColumn1
	Send Destroy to hoColumns1
	Variant voItems
	Get ComItems to voItems
	Handle hoItems
	Get Create (RefClass(cComItems)) to hoItems
	Set pvComObject of hoItems to voItems
		Get ComAddItem of hoItems "" to Nothing
		Get ComAddItem of hoItems "" to Nothing
		Get ComAddItem of hoItems "" to Nothing
		Get ComAddItem of hoItems "" to Nothing
		Get ComAddItem of hoItems "" to Nothing
		Get ComAddItem of hoItems "" to Nothing
		Get ComAddItem of hoItems "" to Nothing
		Get ComAddItem of hoItems "" to Nothing
		Get ComAddItem of hoItems "" to Nothing
		Get ComAddItem of hoItems "" to Nothing
	Send Destroy to hoItems
	Send ComEndUpdate
End_Procedure
964:
How can I put icons/images into buttons

Procedure OnCreate
	Forward Send OnCreate
	Send ComBeginUpdate
	Set ComColumnAutoResize to True
	Send ComImages "gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTqlVq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m0ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/yNAOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA="
	Variant voColumns
	Get ComColumns to voColumns
	Handle hoColumns
	Get Create (RefClass(cComColumns)) to hoColumns
	Set pvComObject of hoColumns to voColumns
		Variant voColumn
		Get ComAdd of hoColumns "C+B" to voColumn
		Handle hoColumn
		Get Create (RefClass(cComColumn)) to hoColumn
		Set pvComObject of hoColumn to voColumn
			Set ComAllowSizing of hoColumn to False
			Set ComWidth of hoColumn to 48
			Set ComFormatColumn of hoColumn to "` <img>` + ( 1 + (1 index ``) mod 3 ) + `</img> `"
			Set ComDef of hoColumn OLEexCellValueFormat to 1
			Set ComDef of hoColumn OLEexCellHasCheckBox to True
			Set ComDef of hoColumn OLEexCellHasButton to True
			Set ComDef of hoColumn OLEexCellButtonAutoWidth to True
		Send Destroy to hoColumn
	Send Destroy to hoColumns
	Variant voColumns1
	Get ComColumns to voColumns1
	Handle hoColumns1
	Get Create (RefClass(cComColumns)) to hoColumns1
	Set pvComObject of hoColumns1 to voColumns1
		Get ComAdd of hoColumns1 "" to Nothing
	Send Destroy to hoColumns1
	Set ComDrawGridLines to OLEexVLines
	Set ComDefaultItemHeight to 20
	Variant voItems
	Get ComItems to voItems
	Handle hoItems
	Get Create (RefClass(cComItems)) to hoItems
	Set pvComObject of hoItems to voItems
		Get ComAddItem of hoItems "" to Nothing
		Get ComAddItem of hoItems "" to Nothing
		Get ComAddItem of hoItems "" to Nothing
		Get ComAddItem of hoItems "" to Nothing
		Get ComAddItem of hoItems "" to Nothing
		Get ComAddItem of hoItems "" to Nothing
		Get ComAddItem of hoItems "" to Nothing
		Get ComAddItem of hoItems "" to Nothing
	Send Destroy to hoItems
	Send ComEndUpdate
End_Procedure
963:
Is it possible to have a CheckBox and Button TOGETHER on all cells in a column

// Occurs when user clicks on the cell's button.
Procedure OnComButtonClick HITEM   llItem Integer   llColIndex Variant   llKey
	Forward Send OnComButtonClick llItem llColIndex llKey
	Showln "ButtonClick" llItem llKey
End_Procedure

// Fired after cell's state has been changed.
Procedure OnComCellStateChanged HITEM   llItem Integer   llColIndex
	Forward Send OnComCellStateChanged llItem llColIndex
	Showln  "CellStateChanged" llItem
End_Procedure

Procedure OnCreate
	Forward Send OnCreate
	Send ComBeginUpdate
	Set ComColumnAutoResize to True
	Variant voColumns
	Get ComColumns to voColumns
	Handle hoColumns
	Get Create (RefClass(cComColumns)) to hoColumns
	Set pvComObject of hoColumns to voColumns
		Variant voColumn
		Get ComAdd of hoColumns "" to voColumn
		Handle hoColumn
		Get Create (RefClass(cComColumn)) to hoColumn
		Set pvComObject of hoColumn to voColumn
			Set ComAllowSizing of hoColumn to False
			Set ComWidth of hoColumn to 32
			Set ComFormatColumn of hoColumn to "1 index ``"
		Send Destroy to hoColumn
	Send Destroy to hoColumns
	Variant voColumns1
	Get ComColumns to voColumns1
	Handle hoColumns1
	Get Create (RefClass(cComColumns)) to hoColumns1
	Set pvComObject of hoColumns1 to voColumns1
		Variant voColumn1
		Get ComAdd of hoColumns1 "Def" to voColumn1
		Handle hoColumn1
		Get Create (RefClass(cComColumn)) to hoColumn1
		Set pvComObject of hoColumn1 to voColumn1
			Set ComAllowSizing of hoColumn1 to False
			Set ComWidth of hoColumn1 to 48
			Set ComFormatColumn of hoColumn1 to "`     `"
			Set ComDef of hoColumn1 OLEexCellHasCheckBox to True
			Set ComDef of hoColumn1 OLEexCellHasButton to True
			Set ComDef of hoColumn1 OLEexCellButtonAutoWidth to True
		Send Destroy to hoColumn1
	Send Destroy to hoColumns1
	Variant voColumns2
	Get ComColumns to voColumns2
	Handle hoColumns2
	Get Create (RefClass(cComColumns)) to hoColumns2
	Set pvComObject of hoColumns2 to voColumns2
		Get ComAdd of hoColumns2 "" to Nothing
	Send Destroy to hoColumns2
	Variant voItems
	Get ComItems to voItems
	Handle hoItems
	Get Create (RefClass(cComItems)) to hoItems
	Set pvComObject of hoItems to voItems
		Get ComAddItem of hoItems "" to Nothing
		Get ComAddItem of hoItems "" to Nothing
		Get ComAddItem of hoItems "" to Nothing
		Get ComAddItem of hoItems "" to Nothing
		Get ComAddItem of hoItems "" to Nothing
		Get ComAddItem of hoItems "" to Nothing
		Get ComAddItem of hoItems "" to Nothing
		Get ComAddItem of hoItems "" to Nothing
	Send Destroy to hoItems
	Send ComEndUpdate
End_Procedure
962:
I have columns that look up the same data. (e.g. different contact) so both could / should use the same editor. Is this possible, to use other column's editor

Procedure OnCreate
	Forward Send OnCreate
	Send ComBeginUpdate
	Set ComSelBackColor to (ComBackColor(Self))
	Set ComSelForeColor to (ComForeColor(Self))
	Variant voColumns
	Get ComColumns to voColumns
	Handle hoColumns
	Get Create (RefClass(cComColumns)) to hoColumns
	Set pvComObject of hoColumns to voColumns
		Variant voColumn
		Get ComAdd of hoColumns "Pos" to voColumn
		Handle hoColumn
		Get Create (RefClass(cComColumn)) to hoColumn
		Set pvComObject of hoColumn to voColumn
			Set ComWidth of hoColumn to 32
			Set ComAllowSizing of hoColumn to False
			Set ComFormatColumn of hoColumn to "1 index ``"
		Send Destroy to hoColumn
		Variant v
		Variant voColumn1
		Get ComAdd of hoColumns "C1" to voColumn1
		Handle hoColumn1
		Get Create (RefClass(cComColumn)) to hoColumn1
		Set pvComObject of hoColumn1 to voColumn1
			Get ComEditor of hoColumn1 to v
		Send Destroy to hoColumn1
		Variant var_Editor
		Move v to var_Editor
			Set ComEditType of hoColumns to OLEColorListType
			Send ComClearItems of hoColumns
			Send ComAddItem of hoColumns 255 "Red Color" Nothing
			Send ComAddItem of hoColumns 16711680 "Blue Color" Nothing
			Send ComAddItem of hoColumns 65280 "Green Color" Nothing
		Send Destroy to hoColumns
		Variant voColumn2
		Get ComAdd "C2" to voColumn2
		Handle hoColumn2
		Get Create (RefClass(cComColumn)) to hoColumn2
		Set pvComObject of hoColumn2 to voColumn2
			Variant voEditor
			Get ComEditor of hoColumn2 to voEditor
			Handle hoEditor
			Get Create (RefClass(cComEditor)) to hoEditor
			Set pvComObject of hoEditor to voEditor
				Set ComEditType of hoEditor to (OLECloneType + OLEEditType)
			Send Destroy to hoEditor
		Send Destroy to hoColumn2
		Variant voColumn3
		Get ComAdd "C3" to voColumn3
		Handle hoColumn3
		Get Create (RefClass(cComColumn)) to hoColumn3
		Set pvComObject of hoColumn3 to voColumn3
			Variant voEditor1
			Get ComEditor of hoColumn3 to voEditor1
			Handle hoEditor1
			Get Create (RefClass(cComEditor)) to hoEditor1
			Set pvComObject of hoEditor1 to voEditor1
				Set ComEditType of hoEditor1 to (OLECloneType + OLEEditType)
			Send Destroy to hoEditor1
		Send Destroy to hoColumn3
	Variant voItems
	Get ComItems to voItems
	Handle hoItems
	Get Create (RefClass(cComItems)) to hoItems
	Set pvComObject of hoItems to voItems
		Variant h
		Get ComAddItem of hoItems "" to h
		Set ComCellValue of hoItems h 1 to 16711680
		Set ComCellValue of hoItems h 2 to 65280
		Set ComCellValue of hoItems h 3 to 255
		Get ComAddItem of hoItems "" to h
		Set ComCellValue of hoItems h 1 to 255
		Set ComCellValue of hoItems h 2 to 16711680
		Set ComCellValue of hoItems h 3 to 65280
	Send Destroy to hoItems
	Send ComEndUpdate
End_Procedure
961:
Is there an easy way to get an effect like in a Microsoft Access / SQL-Server Table view, where you can scroll-up till the last row containing data is displayed as top-row

Procedure OnCreate
	Forward Send OnCreate
	Send ComBeginUpdate
	Set ComHasLines to OLEexNoLine
	Set ComColumnAutoResize to False
	Variant rs
	Get Comcreateobject "ADOR.Recordset" to rs
		Send ComOpen "Orders" "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Program Files\Exontrol\ExGrid\Sample\SAMPLE.MDB" OLEadOpenStatic OLEadLockOptimistic Nothing
	Set ComDataSource to rs
	Set ComScrollBars to (OLEexVScrollEmptySpace + OLEexBoth)
	Variant v
	Variant voItems
	Get ComItems to voItems
	Handle hoItems
	Get Create (RefClass(cComItems)) to hoItems
	Set pvComObject of hoItems to voItems
		Get ComItemCount of hoItems to v
	Send Destroy to hoItems
	Set ComScrollPos True to v
	Send ComEndUpdate
End_Procedure
960:
Does filtering work with umlauts / accents characters
Procedure OnCreate
	Forward Send OnCreate
	Send ComBeginUpdate
	Variant voColumns
	Get ComColumns to voColumns
	Handle hoColumns
	Get Create (RefClass(cComColumns)) to hoColumns
	Set pvComObject of hoColumns to voColumns
		Variant voColumn
		Get ComAdd of hoColumns "Names" to voColumn
		Handle hoColumn
		Get Create (RefClass(cComColumn)) to hoColumn
		Set pvComObject of hoColumn to voColumn
			Set ComDisplayFilterButton of hoColumn to True
			Set ComFilterType of hoColumn to OLEexPattern
		Send Destroy to hoColumn
	Send Destroy to hoColumns
	Variant voItems
	Get ComItems to voItems
	Handle hoItems
	Get Create (RefClass(cComItems)) to hoItems
	Set pvComObject of hoItems to voItems
		Get ComAddItem of hoItems "Mantel" to Nothing
		Get ComAddItem of hoItems "Mechanik" to Nothing
		Get ComAddItem of hoItems "Motor" to Nothing
		Get ComAddItem of hoItems "Murks" to Nothing
		Get ComAddItem of hoItems "Märchen" to Nothing
		Get ComAddItem of hoItems "Möhren" to Nothing
		Get ComAddItem of hoItems "Mühle" to Nothing
		Get ComAddItem of hoItems "Sérigraphie" to Nothing
	Send Destroy to hoItems
	Variant voColumns1
	Get ComColumns to voColumns1
	Handle hoColumns1
	Get Create (RefClass(cComColumns)) to hoColumns1
	Set pvComObject of hoColumns1 to voColumns1
		Variant voColumn1
		Get ComItem of hoColumns1 0 to voColumn1
		Handle hoColumn1
		Get Create (RefClass(cComColumn)) to hoColumn1
		Set pvComObject of hoColumn1 to voColumn1
			Set ComFilter of hoColumn1 to "*ä*"
		Send Destroy to hoColumn1
	Send Destroy to hoColumns1
	Send ComApplyFilter
	Send ComEndUpdate
End_Procedure
959:
How FullPath method works

Procedure OnCreate
	Forward Send OnCreate
	Send ComBeginUpdate
	Set ComLinesAtRoot to OLEexLinesAtRoot
	Variant voColumns
	Get ComColumns to voColumns
	Handle hoColumns
	Get Create (RefClass(cComColumns)) to hoColumns
	Set pvComObject of hoColumns to voColumns
		Get ComAdd of hoColumns "C1" to Nothing
	Send Destroy to hoColumns
	Variant voColumns1
	Get ComColumns to voColumns1
	Handle hoColumns1
	Get Create (RefClass(cComColumns)) to hoColumns1
	Set pvComObject of hoColumns1 to voColumns1
		Get ComAdd of hoColumns1 "C2" to Nothing
	Send Destroy to hoColumns1
	Variant voItems
	Get ComItems to voItems
	Handle hoItems
	Get Create (RefClass(cComItems)) to hoItems
	Set pvComObject of hoItems to voItems
		Variant h
		Get ComAddItem of hoItems "Root" to h
		Set ComCellValue of hoItems h 1 to "A"
		Set ComCellValue of hoItems (ComInsertItem(hoItems,h,"Child 1")) 1 to "B"
		Set ComCellValue of hoItems (ComInsertItem(hoItems,h,"Child 2")) 1 to "C"
		Set ComExpandItem of hoItems h to True
	Send Destroy to hoItems
	Set ComSearchColumnIndex to 1
	Variant v
	Variant voItems1
	Get ComItems to voItems1
	Handle hoItems1
	Get Create (RefClass(cComItems)) to hoItems1
	Set pvComObject of hoItems1 to voItems1
		Get ComFullPath of hoItems1 (ComItemByIndex(hoItems1,2)) to v
	Send Destroy to hoItems1
	Showln (ComSearchColumnIndex(Self)) v
	Set ComSearchColumnIndex to 0
	Variant v1
	Variant voItems2
	Get ComItems to voItems2
	Handle hoItems2
	Get Create (RefClass(cComItems)) to hoItems2
	Set pvComObject of hoItems2 to voItems2
		Get ComFullPath of hoItems2 (ComItemByIndex(hoItems2,2)) to v1
	Send Destroy to hoItems2
	Showln (ComSearchColumnIndex(Self)) v1
	Send ComEndUpdate
End_Procedure
958:
Can I set the search box / filterbarprompt to invisible, so I can use my own input and *string* via VBA
Procedure OnCreate
	Forward Send OnCreate
	Send ComBeginUpdate
	Set ComColumnAutoResize to True
	Set ComContinueColumnScroll to False
	Set ComMarkSearchColumn to False
	Set ComSearchColumnIndex to 1
	Set ComFilterBarHeight to 0
	Set ComFilterBarPromptVisible to True
	Variant voColumns
	Get ComColumns to voColumns
	Handle hoColumns
	Get Create (RefClass(cComColumns)) to hoColumns
	Set pvComObject of hoColumns to voColumns
		Variant voColumn
		Get ComAdd of hoColumns "Name" to voColumn
		Handle hoColumn
		Get Create (RefClass(cComColumn)) to hoColumn
		Set pvComObject of hoColumn to voColumn
			Set ComWidth of hoColumn to 96
		Send Destroy to hoColumn
		Variant voColumn1
		Get ComAdd of hoColumns "Title" to voColumn1
		Handle hoColumn1
		Get Create (RefClass(cComColumn)) to hoColumn1
		Set pvComObject of hoColumn1 to voColumn1
			Set ComWidth of hoColumn1 to 96
		Send Destroy to hoColumn1
		Get ComAdd of hoColumns "City" to Nothing
	Send Destroy to hoColumns
	Variant voItems
	Get ComItems to voItems
	Handle hoItems
	Get Create (RefClass(cComItems)) to hoItems
	Set pvComObject of hoItems to voItems
		Variant h0
		Get ComAddItem of hoItems "Nancy Davolio" to h0
		Set ComCellValue of hoItems h0 1 to "Sales Representative"
		Set ComCellValue of hoItems h0 2 to "Seattle"
		Get ComAddItem of hoItems "Andrew Fuller" to h0
		Set ComCellValue of hoItems h0 1 to "Vice President, Sales"
		Set ComCellValue of hoItems h0 2 to "Tacoma"
		Set ComSelectItem of hoItems h0 to True
		Get ComAddItem of hoItems "Janet Leverling" to h0
		Set ComCellValue of hoItems h0 1 to "Sales Representative"
		Set ComCellValue of hoItems h0 2 to "Kirkland"
		Get ComAddItem of hoItems "Margaret Peacock" to h0
		Set ComCellValue of hoItems h0 1 to "Sales Representative"
		Set ComCellValue of hoItems h0 2 to "Redmond"
		Get ComAddItem of hoItems "Steven Buchanan" to h0
		Set ComCellValue of hoItems h0 1 to "Sales Manager"
		Set ComCellValue of hoItems h0 2 to "London"
		Get ComAddItem of hoItems "Michael Suyama" to h0
		Set ComCellValue of hoItems h0 1 to "Sales Representative"
		Set ComCellValue of hoItems h0 2 to "London"
		Get ComAddItem of hoItems "Robert King" to h0
		Set ComCellValue of hoItems h0 1 to "Sales Representative"
		Set ComCellValue of hoItems h0 2 to "London"
		Get ComAddItem of hoItems "Laura Callahan" to h0
		Set ComCellValue of hoItems h0 1 to "Inside Sales Coordinator"
		Set ComCellValue of hoItems h0 2 to "Seattle"
		Get ComAddItem of hoItems "Anne Dodsworth" to h0
		Set ComCellValue of hoItems h0 1 to "Sales Representative"
		Set ComCellValue of hoItems h0 2 to "London"
	Send Destroy to hoItems
	Set ComFilterBarPromptPattern to "London"
	Send ComEndUpdate
End_Procedure
957:
How to load a hierarchy using the control's DataSource property (Parent-ID-Relation)

// Occurs after a new Item has been inserted to Items collection.
Procedure OnComAddItem HITEM   llItem
	Forward Send OnComAddItem llItem
	Variant voItems
	Get ComItems to voItems
	Handle hoItems
	Get Create (RefClass(cComItems)) to hoItems
	Set pvComObject of hoItems to voItems
		Send ComSetParent of hoItems llItem (ComFindItem(hoItems,(ComCellValue(hoItems,llItem,"ReportsTo")),"EmployeeID",Nothing))
	Send Destroy to hoItems
End_Procedure

Procedure OnCreate
	Forward Send OnCreate
	Send ComBeginUpdate
	Set ComLinesAtRoot to OLEexLinesAtRoot
	Set ComColumnAutoResize to False
	Set ComContinueColumnScroll to False
	Variant rs
	Get Comcreateobject "ADOR.Recordset" to rs
		Send ComOpen "SELECT * FROM Employees ORDER BY ReportsTo" "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Program Files\Exontrol\ExGrid\Sample\SAMPLE.MDB" OLEadOpenStatic OLEadLockOptimistic Nothing
	Set ComDataSource to rs
	Variant voItems1
	Get ComItems to voItems1
	Handle hoItems1
	Get Create (RefClass(cComItems)) to hoItems1
	Set pvComObject of hoItems1 to voItems1
		Set ComExpandItem of hoItems1 0 to True
	Send Destroy to hoItems1
	Send ComEndUpdate
End_Procedure
956:
Is it possible to select the entire row/line, when user clicks the first column, and select individually the rest of cells, while user clicks any other column

// Occurs when the user presses a mouse button.
Procedure OnComMouseDown Short   llButton Short   llShift OLE_XPOS_PIXELS   llX OLE_YPOS_PIXELS   llY
	Forward Send OnComMouseDown llButton llShift llX llY
	Variant i
	Get ComItemFromPoint -1 -1 c hit to i
	Variant v
	Variant voColumns
	Get ComColumns to voColumns
	Handle hoColumns
	Get Create (RefClass(cComColumns)) to hoColumns
	Set pvComObject of hoColumns to voColumns
		Variant voColumn
		Get ComItem of hoColumns c to voColumn
		Handle hoColumn
		Get Create (RefClass(cComColumn)) to hoColumn
		Set pvComObject of hoColumn to voColumn
			Get ComData of hoColumn to v
		Send Destroy to hoColumn
	Send Destroy to hoColumns
	Set ComFullRowSelect to v
End_Procedure

Procedure OnCreate
	Forward Send OnCreate
	Send ComBeginUpdate
	Set ComHeaderHeight to 22
	Set ComHeaderAppearance to OLEFlat
	Set ComBackColorLock to (RGB(240,240,240))
	Set ComBackColorHeader to (ComBackColorLock(Self))
	Set ComHasLines to OLEexNoLine
	Set ComColumnAutoResize to False
	Set ComSortBarVisible to False
	Set ComAllowGroupBy to True
	Set ComReadOnly to OLEexReadOnly
	Set ComShowFocusRect to False
	Set ComCountLockedColumns to 1
	Set ComAutoDrag to OLEexAutoDragScroll
	Set ComSingleSort to False
	Set ComColumnsAllowSizing to True
	Set ComDrawGridLines to OLEexAllLines
	Set ComGridLineStyle to OLEexGridLinesSolid
	Set ComGridLineColor to (RGB(220,220,220))
	Variant rs
	Get Comcreateobject "ADOR.Recordset" to rs
		Send ComOpen "Orders" "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Program Files\Exontrol\ExGrid\Sample\SAMPLE.MDB" OLEadOpenStatic OLEadLockOptimistic Nothing
	Set ComDataSource to rs
	Variant voColumns1
	Get ComColumns to voColumns1
	Handle hoColumns1
	Get Create (RefClass(cComColumns)) to hoColumns1
	Set pvComObject of hoColumns1 to voColumns1
		Variant voColumn1
		Get ComItem of hoColumns1 0 to voColumn1
		Handle hoColumn1
		Get Create (RefClass(cComColumn)) to hoColumn1
		Set pvComObject of hoColumn1 to voColumn1
			Set ComData of hoColumn1 to -1
		Send Destroy to hoColumn1
	Send Destroy to hoColumns1
	Set ComLayout to "singlesort="C5:1";multiplesort=" C1:2""
	Send ComEndUpdate
End_Procedure
955:
The user are not able to size the columns at runtime when using HeaderAppearance property on zero
Procedure OnCreate
	Forward Send OnCreate
	Variant voAppearance
	Get ComVisualAppearance to voAppearance
	Handle hoAppearance
	Get Create (RefClass(cComAppearance)) to hoAppearance
	Set pvComObject of hoAppearance to voAppearance
		Get ComAdd of hoAppearance 1 "gBFLBCJwBAEHhEJAAEhABJEIQAAYAQGKIYBkAKBQAGaAoDDcMQ5QwAAyDGKEEwsACEIrjKCRShyCYZRhGcTSBCIZBqEqSZLiEZRQiiCYsS5GQBSFDcOwHGyQZonKK3LhGCYBgIA=" to Nothing
	Send Destroy to hoAppearance
	Set ComHeaderAppearance to |CI$1000000
	Variant voColumns
	Get ComColumns to voColumns
	Handle hoColumns
	Get Create (RefClass(cComColumns)) to hoColumns
	Set pvComObject of hoColumns to voColumns
		Get ComAdd of hoColumns 1 to Nothing
	Send Destroy to hoColumns
	Variant voColumns1
	Get ComColumns to voColumns1
	Handle hoColumns1
	Get Create (RefClass(cComColumns)) to hoColumns1
	Set pvComObject of hoColumns1 to voColumns1
		Get ComAdd of hoColumns1 2 to Nothing
	Send Destroy to hoColumns1
	Variant voColumns2
	Get ComColumns to voColumns2
	Handle hoColumns2
	Get Create (RefClass(cComColumns)) to hoColumns2
	Set pvComObject of hoColumns2 to voColumns2
		Get ComAdd of hoColumns2 3 to Nothing
	Send Destroy to hoColumns2
End_Procedure
954:
Is it possible to embed the exGauge into the exGrid control

// Fired when an ActiveX control hosted by an item has fired an event.
Procedure OnComItemOleEvent HITEM   llItem Variant   llEv
	Forward Send OnComItemOleEvent llItem llEv
	Variant voItems
	Get ComItems to voItems
	Handle hoItems
	Get Create (RefClass(cComItems)) to hoItems
	Set pvComObject of hoItems to voItems
	Variant vItem
			Variant voItems1
			Get ComItems to voItems1
			Handle hoItems1
			Get Create (RefClass(cComItems)) to hoItems1
			Set pvComObject of hoItems1 to voItems1
				Get ComItemByIndex of hoItems1 2 to vItem
			Send Destroy to hoItems1
			Variant voGauge
		Get ComItemObject of hoItems vItem to voGauge
		Handle hoGauge
		Get Create (RefClass(cComGauge)) to hoGauge
		Set pvComObject of hoGauge to voGauge
			Variant v
			Get ComFormatABC of hoGauge "date(`now`)" Nothing Nothing Nothing to v
			Variant voLayers
			Get ComLayers of hoGauge to voLayers
			Handle hoLayers
			Get Create (RefClass(cComLayers)) to hoLayers
			Set pvComObject of hoLayers to voLayers
				Variant voLayer
				Get ComItem of hoLayers "sec" to voLayer
				Handle hoLayer
				Get Create (RefClass(cComLayer)) to hoLayer
				Set pvComObject of hoLayer to voLayer
					Set ComValue of hoLayer to v
				Send Destroy to hoLayer
			Send Destroy to hoLayers
			Variant voLayers1
			Get ComLayers of hoGauge to voLayers1
			Handle hoLayers1
			Get Create (RefClass(cComLayers)) to hoLayers1
			Set pvComObject of hoLayers1 to voLayers1
				Variant voLayer1
				Get ComItem of hoLayers1 "min" to voLayer1
				Handle hoLayer1
				Get Create (RefClass(cComLayer)) to hoLayer1
				Set pvComObject of hoLayer1 to voLayer1
					Set ComValue of hoLayer1 to v
				Send Destroy to hoLayer1
			Send Destroy to hoLayers1
			Variant voLayers2
			Get ComLayers of hoGauge to voLayers2
			Handle hoLayers2
			Get Create (RefClass(cComLayers)) to hoLayers2
			Set pvComObject of hoLayers2 to voLayers2
				Variant voLayer2
				Get ComItem of hoLayers2 "hour" to voLayer2
				Handle hoLayer2
				Get Create (RefClass(cComLayer)) to hoLayer2
				Set pvComObject of hoLayer2 to voLayer2
					Set ComValue of hoLayer2 to v
				Send Destroy to hoLayer2
			Send Destroy to hoLayers2
		Send Destroy to hoGauge
	Send Destroy to hoItems
End_Procedure

// Occurs when the user moves the mouse.
Procedure OnComMouseMove Short   llButton Short   llShift OLE_XPOS_PIXELS   llX OLE_YPOS_PIXELS   llY
	Forward Send OnComMouseMove llButton llShift llX llY
	Variant voItems2
	Get ComItems to voItems2
	Handle hoItems2
	Get Create (RefClass(cComItems)) to hoItems2
	Set pvComObject of hoItems2 to voItems2
	Variant vItem1
			Variant voItems3
			Get ComItems to voItems3
			Handle hoItems3
			Get Create (RefClass(cComItems)) to hoItems3
			Set pvComObject of hoItems3 to voItems3
				Get ComItemByIndex of hoItems3 2 to vItem1
			Send Destroy to hoItems3
			Variant voGauge1
		Get ComItemObject of hoItems2 vItem1 to voGauge1
		Handle hoGauge1
		Get Create (RefClass(cComGauge)) to hoGauge1
		Set pvComObject of hoGauge1 to voGauge1
			Set ComTimerInterval of hoGauge1 to 1000
		Send Destroy to hoGauge1
	Send Destroy to hoItems2
End_Procedure

Procedure OnCreate
	Forward Send OnCreate
	Send ComBeginUpdate
	Set ComScrollBySingleLine to True
	Set ComLinesAtRoot to OLEexLinesAtRoot
	Set ComHasLines to OLEexThinLine
	Set ComScrollBySingleLine to True
	Variant voColumns
	Get ComColumns to voColumns
	Handle hoColumns
	Get Create (RefClass(cComColumns)) to hoColumns
	Set pvComObject of hoColumns to voColumns
		Get ComAdd of hoColumns "Default" to Nothing
	Send Destroy to hoColumns
	Variant voItems4
	Get ComItems to voItems4
	Handle hoItems4
	Get Create (RefClass(cComItems)) to hoItems4
	Set pvComObject of hoItems4 to voItems4
		Variant h
		Get ComAddItem of hoItems4 "Normal Item" to h
		Get ComAddItem of hoItems4 "Gauge-Clock Inside" to h
		Set ComExpandItem of hoItems4 h to True
		Get ComInsertControlItem of hoItems4 h "Exontrol.Gauge" Nothing to h
		Set ComItemHeight of hoItems4 h to 256
		Variant voGauge2
		Get ComItemObject of hoItems4 h to voGauge2
		Handle hoGauge2
		Get Create (RefClass(cComGauge)) to hoGauge2
		Set pvComObject of hoGauge2 to voGauge2
			Set ComPicturesPath of hoGauge2 to "C:\Program Files\Exontrol\ExGauge\Sample\Design\Circular\Clock"
			Set ComDefaultLayer of hoGauge2 OLEexDefLayerRotateType to 2
			Variant voLayers3
			Get ComLayers of hoGauge2 to voLayers3
			Handle hoLayers3
			Get Create (RefClass(cComLayers)) to hoLayers3
			Set pvComObject of hoLayers3 to voLayers3
				Set ComCount of hoLayers3 to 4
			Send Destroy to hoLayers3
			Variant voLayers4
			Get ComLayers of hoGauge2 to voLayers4
			Handle hoLayers4
			Get Create (RefClass(cComLayers)) to hoLayers4
			Set pvComObject of hoLayers4 to voLayers4
				Variant voLayer3
				Get ComItem of hoLayers4 0 to voLayer3
				Handle hoLayer3
				Get Create (RefClass(cComLayer)) to hoLayer3
				Set pvComObject of hoLayer3 to voLayer3
					Variant voBackground
					Get ComBackground of hoLayer3 to voBackground
					Handle hoBackground
					Get Create (RefClass(cComBackground)) to hoBackground
					Set pvComObject of hoBackground to voBackground
						Variant voPicture
						Get ComPicture of hoBackground to voPicture
						Handle hoPicture
						Get Create (RefClass(cComPicture)) to hoPicture
						Set pvComObject of hoPicture to voPicture
							Set ComName of hoPicture to "vista_clock.png"
						Send Destroy to hoPicture
					Send Destroy to hoBackground
				Send Destroy to hoLayer3
			Send Destroy to hoLayers4
			Variant voLayers5
			Get ComLayers of hoGauge2 to voLayers5
			Handle hoLayers5
			Get Create (RefClass(cComLayers)) to hoLayers5
			Set pvComObject of hoLayers5 to voLayers5
				Variant voLayer4
				Get ComItem of hoLayers5 1 to voLayer4
				Handle hoLayer4
				Get Create (RefClass(cComLayer)) to hoLayer4
				Set pvComObject of hoLayer4 to voLayer4
					Set ComPosition of hoLayer4 to 3
					Set ComKey of hoLayer4 to "sec"
					Set ComOnDrag of hoLayer4 to OLEexDoRotate
					Set ComSelectable of hoLayer4 to False
					Variant voBackground1
					Get ComBackground of hoLayer4 to voBackground1
					Handle hoBackground1
					Get Create (RefClass(cComBackground)) to hoBackground1
					Set pvComObject of hoBackground1 to voBackground1
						Variant voPicture1
						Get ComPicture of hoBackground1 to voPicture1
						Handle hoPicture1
						Get Create (RefClass(cComPicture)) to hoPicture1
						Set pvComObject of hoPicture1 to voPicture1
							Set ComName of hoPicture1 to "second-hand.png"
						Send Destroy to hoPicture1
					Send Destroy to hoBackground1
					Set ComValueToRotateAngle of hoLayer4 to "((2:=(((1:=( ( (0:=(value < 0 ? floor(value) + 1 - value : value - floor(value))) < 0.5 ? =:0 : (0:= (=:0 - 0.5)) ) * 24 ))  - floor(=:1)) * 60 )) - floor(=:2) ) * 360"
					Set ComRotateAngleToValue of hoLayer4 to "value / 360 / 24 / 60"
				Send Destroy to hoLayer4
			Send Destroy to hoLayers5
			Variant voLayers6
			Get ComLayers of hoGauge2 to voLayers6
			Handle hoLayers6
			Get Create (RefClass(cComLayers)) to hoLayers6
			Set pvComObject of hoLayers6 to voLayers6
				Variant voLayer5
				Get ComItem of hoLayers6 2 to voLayer5
				Handle hoLayer5
				Get Create (RefClass(cComLayer)) to hoLayer5
				Set pvComObject of hoLayer5 to voLayer5
					Set ComPosition of hoLayer5 to 2
					Set ComKey of hoLayer5 to "min"
					Set ComOnDrag of hoLayer5 to OLEexDoRotate
					Set ComSelectable of hoLayer5 to False
					Variant voBackground2
					Get ComBackground of hoLayer5 to voBackground2
					Handle hoBackground2
					Get Create (RefClass(cComBackground)) to hoBackground2
					Set pvComObject of hoBackground2 to voBackground2
						Variant voPicture2
						Get ComPicture of hoBackground2 to voPicture2
						Handle hoPicture2
						Get Create (RefClass(cComPicture)) to hoPicture2
						Set pvComObject of hoPicture2 to voPicture2
							Set ComName of hoPicture2 to "Minute.png"
						Send Destroy to hoPicture2
					Send Destroy to hoBackground2
					Set ComValueToRotateAngle of hoLayer5 to "((1:=( ( (0:=(value < 0 ? floor(value) + 1 - value : value - floor(value))) < 0.5 ? =:0 : (0:= (=:0 - 0.5)) ) * 24 ))  - floor(=:1)) * 360"
					Set ComRotateAngleToValue of hoLayer5 to "value / 360 / 24 / 60"
				Send Destroy to hoLayer5
			Send Destroy to hoLayers6
			Variant voLayers7
			Get ComLayers of hoGauge2 to voLayers7
			Handle hoLayers7
			Get Create (RefClass(cComLayers)) to hoLayers7
			Set pvComObject of hoLayers7 to voLayers7
				Variant voLayer6
				Get ComItem of hoLayers7 3 to voLayer6
				Handle hoLayer6
				Get Create (RefClass(cComLayer)) to hoLayer6
				Set pvComObject of hoLayer6 to voLayer6
					Set ComPosition of hoLayer6 to 1
					Set ComKey of hoLayer6 to "hour"
					Set ComOnDrag of hoLayer6 to OLEexDoRotate
					Variant voBackground3
					Get ComBackground of hoLayer6 to voBackground3
					Handle hoBackground3
					Get Create (RefClass(cComBackground)) to hoBackground3
					Set pvComObject of hoBackground3 to voBackground3
						Variant voPicture3
						Get ComPicture of hoBackground3 to voPicture3
						Handle hoPicture3
						Get Create (RefClass(cComPicture)) to hoPicture3
						Set pvComObject of hoPicture3 to voPicture3
							Set ComName of hoPicture3 to "Hour.png"
						Send Destroy to hoPicture3
					Send Destroy to hoBackground3
					Set ComValueToRotateAngle of hoLayer6 to "2 * 360 * ( (0:=(value < 0 ? floor(value) + 1 - value : value - floor(value))) < 0.5 ? =:0 : (0:= (=:0 - 0.5)) )"
					Set ComRotateAngleToValue of hoLayer6 to "value / 360 * 0.5"
				Send Destroy to hoLayer6
			Send Destroy to hoLayers7
			Get ComFormatABC of hoGauge2 "date(`now`)" Nothing Nothing Nothing to v
			Variant voLayers8
			Get ComLayers of hoGauge2 to voLayers8
			Handle hoLayers8
			Get Create (RefClass(cComLayers)) to hoLayers8
			Set pvComObject of hoLayers8 to voLayers8
				Variant voLayer7
				Get ComItem of hoLayers8 "sec" to voLayer7
				Handle hoLayer7
				Get Create (RefClass(cComLayer)) to hoLayer7
				Set pvComObject of hoLayer7 to voLayer7
					Set ComValue of hoLayer7 to v
				Send Destroy to hoLayer7
			Send Destroy to hoLayers8
			Variant voLayers9
			Get ComLayers of hoGauge2 to voLayers9
			Handle hoLayers9
			Get Create (RefClass(cComLayers)) to hoLayers9
			Set pvComObject of hoLayers9 to voLayers9
				Variant voLayer8
				Get ComItem of hoLayers9 "min" to voLayer8
				Handle hoLayer8
				Get Create (RefClass(cComLayer)) to hoLayer8
				Set pvComObject of hoLayer8 to voLayer8
					Set ComValue of hoLayer8 to v
				Send Destroy to hoLayer8
			Send Destroy to hoLayers9
			Variant voLayers10
			Get ComLayers of hoGauge2 to voLayers10
			Handle hoLayers10
			Get Create (RefClass(cComLayers)) to hoLayers10
			Set pvComObject of hoLayers10 to voLayers10
				Variant voLayer9
				Get ComItem of hoLayers10 "hour" to voLayer9
				Handle hoLayer9
				Get Create (RefClass(cComLayer)) to hoLayer9
				Set pvComObject of hoLayer9 to voLayer9
					Set ComValue of hoLayer9 to v
				Send Destroy to hoLayer9
			Send Destroy to hoLayers10
		Send Destroy to hoGauge2
		Get ComAddItem of hoItems4 "Normal Item" to h
	Send Destroy to hoItems4
	Send ComEndUpdate
End_Procedure
953:
What's the difference between merge cells and divider item

// Occurs after a new Item has been inserted to Items collection.
Procedure OnComAddItem HITEM   llItem
	Forward Send OnComAddItem llItem
	Variant voItems
	Get ComItems to voItems
	Handle hoItems
	Get Create (RefClass(cComItems)) to hoItems
	Set pvComObject of hoItems to voItems
		Set ComCellBackColor of hoItems llItem 0 to (RGB(240,240,240))
		Set ComItemHasChildren of hoItems llItem to True
	Send Destroy to hoItems
End_Procedure

Procedure OnCreate
	Forward Send OnCreate
	Send ComBeginUpdate
	Set ComTreeColumnIndex to 0
	Set ComLinesAtRoot to OLEexLinesAtRoot
	Set ComDrawGridLines to OLEexAllLines
	Variant voColumns
	Get ComColumns to voColumns
	Handle hoColumns
	Get Create (RefClass(cComColumns)) to hoColumns
	Set pvComObject of hoColumns to voColumns
		Variant voColumn
		Get ComAdd of hoColumns "C1" to voColumn
		Handle hoColumn
		Get Create (RefClass(cComColumn)) to hoColumn
		Set pvComObject of hoColumn to voColumn
			Set ComFormatColumn of hoColumn to "1 index `A-Z`"
		Send Destroy to hoColumn
	Send Destroy to hoColumns
	Variant voColumns1
	Get ComColumns to voColumns1
	Handle hoColumns1
	Get Create (RefClass(cComColumns)) to hoColumns1
	Set pvComObject of hoColumns1 to voColumns1
		Variant voColumn1
		Get ComAdd of hoColumns1 "C2" to voColumn1
		Handle hoColumn1
		Get Create (RefClass(cComColumn)) to hoColumn1
		Set pvComObject of hoColumn1 to voColumn1
			Set ComFormatColumn of hoColumn1 to "1 index ``"
		Send Destroy to hoColumn1
	Send Destroy to hoColumns1
	Variant voColumns2
	Get ComColumns to voColumns2
	Handle hoColumns2
	Get Create (RefClass(cComColumns)) to hoColumns2
	Set pvComObject of hoColumns2 to voColumns2
		Variant voColumn2
		Get ComAdd of hoColumns2 "C3" to voColumn2
		Handle hoColumn2
		Get Create (RefClass(cComColumn)) to hoColumn2
		Set pvComObject of hoColumn2 to voColumn2
			Set ComFormatColumn of hoColumn2 to "1 index ``"
		Send Destroy to hoColumn2
	Send Destroy to hoColumns2
	Variant voItems1
	Get ComItems to voItems1
	Handle hoItems1
	Get Create (RefClass(cComItems)) to hoItems1
	Set pvComObject of hoItems1 to voItems1
		Get ComAddItem of hoItems1 Nothing to Nothing
		Get ComAddItem of hoItems1 Nothing to Nothing
		Variant h
		Get ComAddItem of hoItems1 Nothing to h
		Set ComCellMerge of hoItems1 h 0 to 1
		Set ComFormatCell of hoItems1 h 0 to "`merge cells`"
		Set ComCellHAlignment of hoItems1 h 0 to OLECenterAlignment
		Get ComAddItem of hoItems1 Nothing to h
		Set ComItemDivider of hoItems1 h to 0
		Set ComCellHAlignment of hoItems1 h 0 to OLECenterAlignment
		Set ComFormatCell of hoItems1 h 0 to "`item divider`"
		Get ComAddItem of hoItems1 Nothing to Nothing
		Get ComAddItem of hoItems1 Nothing to Nothing
	Send Destroy to hoItems1
	Send ComEndUpdate
End_Procedure
952:
is it possible to resize a column with the mouse without changing the width of the next column

Procedure OnCreate
	Forward Send OnCreate
	Send ComBeginUpdate
	Set ComColumnAutoResize to False
	Variant voColumns
	Get ComColumns to voColumns
	Handle hoColumns
	Get Create (RefClass(cComColumns)) to hoColumns
	Set pvComObject of hoColumns to voColumns
		Variant voColumn
		Get ComAdd of hoColumns "Column 1" to voColumn
		Handle hoColumn
		Get Create (RefClass(cComColumn)) to hoColumn
		Set pvComObject of hoColumn to voColumn
			Set ComWidth of hoColumn to 256
		Send Destroy to hoColumn
	Send Destroy to hoColumns
	Variant voColumns1
	Get ComColumns to voColumns1
	Handle hoColumns1
	Get Create (RefClass(cComColumns)) to hoColumns1
	Set pvComObject of hoColumns1 to voColumns1
		Variant voColumn1
		Get ComAdd of hoColumns1 "Column 2" to voColumn1
		Handle hoColumn1
		Get Create (RefClass(cComColumn)) to hoColumn1
		Set pvComObject of hoColumn1 to voColumn1
			Set ComWidth of hoColumn1 to 512
		Send Destroy to hoColumn1
	Send Destroy to hoColumns1
	Set ComDrawGridLines to OLEexAllLines
	Send ComEndUpdate
End_Procedure
951:
How do I ensure that the newly item fits the control's client area

// Occurs when user clicks on the cell's button.
Procedure OnComButtonClick HITEM   llItem Integer   llColIndex Variant   llKey
	Forward Send OnComButtonClick llItem llColIndex llKey
	Variant voItems
	Get ComItems to voItems
	Handle hoItems
	Get Create (RefClass(cComItems)) to hoItems
	Set pvComObject of hoItems to voItems
		Variant h
		Get ComAddItem of hoItems "" to h
		Set ComSelectItem of hoItems h to True
		Send ComEnsureVisibleItem of hoItems h
	Send Destroy to hoItems
	Set ComFocusColumnIndex to 0
End_Procedure

Procedure OnCreate
	Forward Send OnCreate
	Send ComBeginUpdate
	Variant voColumns
	Get ComColumns to voColumns
	Handle hoColumns
	Get Create (RefClass(cComColumns)) to hoColumns
	Set pvComObject of hoColumns to voColumns
		Variant voColumn
		Get ComAdd of hoColumns "" to voColumn
		Handle hoColumn
		Get Create (RefClass(cComColumn)) to hoColumn
		Set pvComObject of hoColumn to voColumn
			Set ComAllowSizing of hoColumn to False
			Set ComAllowDragging of hoColumn to False
			Set ComAllowSort of hoColumn to False
			Set ComWidth of hoColumn to 24
			Set ComDef of hoColumn OLEexCellHasButton to True
		Send Destroy to hoColumn
	Send Destroy to hoColumns
	Variant voColumns1
	Get ComColumns to voColumns1
	Handle hoColumns1
	Get Create (RefClass(cComColumns)) to hoColumns1
	Set pvComObject of hoColumns1 to voColumns1
		Variant voColumn1
		Get ComAdd of hoColumns1 "Position" to voColumn1
		Handle hoColumn1
		Get Create (RefClass(cComColumn)) to hoColumn1
		Set pvComObject of hoColumn1 to voColumn1
			Set ComFormatColumn of hoColumn1 to "1 apos `A-Z`"
		Send Destroy to hoColumn1
	Send Destroy to hoColumns1
	Set ComCountLockedColumns to 1
	Variant voItems1
	Get ComItems to voItems1
	Handle hoItems1
	Get Create (RefClass(cComItems)) to hoItems1
	Set pvComObject of hoItems1 to voItems1
		Get ComAddItem of hoItems1 "" to Nothing
		Get ComAddItem of hoItems1 "" to Nothing
		Get ComAddItem of hoItems1 "" to Nothing
	Send Destroy to hoItems1
	Send ComEndUpdate
End_Procedure
950:
How do I find the predefined string for giving value, or giving identifier for specified predefined caption of editor

// Occurs when the user changes the cell's content.
Procedure OnComChange HITEM   llItem Integer   llColIndex Variant   llNewValue
	Forward Send OnComChange llItem llColIndex llNewValue
	Variant v
	Variant voColumns
	Get ComColumns to voColumns
	Handle hoColumns
	Get Create (RefClass(cComColumns)) to hoColumns
	Set pvComObject of hoColumns to voColumns
		Variant voColumn
		Get ComItem of hoColumns 0 to voColumn
		Handle hoColumn
		Get Create (RefClass(cComColumn)) to hoColumn
		Set pvComObject of hoColumn to voColumn
			Variant voEditor
			Get ComEditor of hoColumn to voEditor
			Handle hoEditor
			Get Create (RefClass(cComEditor)) to hoEditor
			Set pvComObject of hoEditor to voEditor
				Get ComFindItem of hoEditor llNewValue to v
			Send Destroy to hoEditor
		Send Destroy to hoColumn
	Send Destroy to hoColumns
	Showln "FindItem(numeric) is " llNewValue v
End_Procedure

Procedure OnCreate
	Forward Send OnCreate
	Send ComBeginUpdate
	Variant voColumns1
	Get ComColumns to voColumns1
	Handle hoColumns1
	Get Create (RefClass(cComColumns)) to hoColumns1
	Set pvComObject of hoColumns1 to voColumns1
		Variant voColumn1
		Get ComAdd of hoColumns1 "DropDownList" to voColumn1
		Handle hoColumn1
		Get Create (RefClass(cComColumn)) to hoColumn1
		Set pvComObject of hoColumn1 to voColumn1
			Variant voEditor1
			Get ComEditor of hoColumn1 to voEditor1
			Handle hoEditor1
			Get Create (RefClass(cComEditor)) to hoEditor1
			Set pvComObject of hoEditor1 to voEditor1
				Set ComEditType of hoEditor1 to OLEDropDownListType
				Send ComAddItem of hoEditor1 1 "Ken Robinson" Nothing
				Send ComAddItem of hoEditor1 2 "Dave Nichols" Nothing
				Send ComAddItem of hoEditor1 3 "Zane Thomas" Nothing
				Send ComAddItem of hoEditor1 4 "James Shields" Nothing
			Send Destroy to hoEditor1
		Send Destroy to hoColumn1
	Send Destroy to hoColumns1
	Variant voColumns2
	Get ComColumns to voColumns2
	Handle hoColumns2
	Get Create (RefClass(cComColumns)) to hoColumns2
	Set pvComObject of hoColumns2 to voColumns2
		Variant voColumn2
		Get ComAdd of hoColumns2 "CellValue" to voColumn2
		Handle hoColumn2
		Get Create (RefClass(cComColumn)) to hoColumn2
		Set pvComObject of hoColumn2 to voColumn2
			Set ComFormatColumn of hoColumn2 to "%0"
			Set ComDef of hoColumn2 OLEexCellBackColor to 15790320
			Set ComDef of hoColumn2 OLEexHeaderBackColor to (ComDef(hoColumn2,OLEexCellBackColor))
		Send Destroy to hoColumn2
	Send Destroy to hoColumns2
	Variant voColumns3
	Get ComColumns to voColumns3
	Handle hoColumns3
	Get Create (RefClass(cComColumns)) to hoColumns3
	Set pvComObject of hoColumns3 to voColumns3
		Variant voColumn3
		Get ComAdd of hoColumns3 "CellCaption" to voColumn3
		Handle hoColumn3
		Get Create (RefClass(cComColumn)) to hoColumn3
		Set pvComObject of hoColumn3 to voColumn3
			Set ComFormatColumn of hoColumn3 to "%C0"
			Set ComDef of hoColumn3 OLEexCellBackColor to 15790320
			Set ComDef of hoColumn3 OLEexHeaderBackColor to (ComDef(hoColumn3,OLEexCellBackColor))
		Send Destroy to hoColumn3
	Send Destroy to hoColumns3
	Variant voItems
	Get ComItems to voItems
	Handle hoItems
	Get Create (RefClass(cComItems)) to hoItems
	Set pvComObject of hoItems to voItems
		Get ComAddItem of hoItems 1 to Nothing
		Variant vValue
			Variant voColumns4
			Get ComColumns to voColumns4
			Handle hoColumns4
			Get Create (RefClass(cComColumns)) to hoColumns4
			Set pvComObject of hoColumns4 to voColumns4
				Variant voColumn4
				Get ComItem of hoColumns4 0 to voColumn4
				Handle hoColumn4
				Get Create (RefClass(cComColumn)) to hoColumn4
				Set pvComObject of hoColumn4 to voColumn4
					Variant voEditor2
					Get ComEditor of hoColumn4 to voEditor2
					Handle hoEditor2
					Get Create (RefClass(cComEditor)) to hoEditor2
					Set pvComObject of hoEditor2 to voEditor2
						Get ComFindItem of hoEditor2 "Zane Thomas" to vValue
					Send Destroy to hoEditor2
				Send Destroy to hoColumn4
			Send Destroy to hoColumns4
		Get ComAddItem of hoItems vValue to Nothing
		Get ComAddItem of hoItems 2 to Nothing
	Send Destroy to hoItems
	Send ComEndUpdate
End_Procedure
949:
How can I align captions of items with checkbox, with items with no checkbox

Procedure OnCreate
	Forward Send OnCreate
	Send ComBeginUpdate
	Variant voColumns
	Get ComColumns to voColumns
	Handle hoColumns
	Get Create (RefClass(cComColumns)) to hoColumns
	Set pvComObject of hoColumns to voColumns
		Get ComAdd of hoColumns "Default" to Nothing
	Send Destroy to hoColumns
	Variant voItems
	Get ComItems to voItems
	Handle hoItems
	Get Create (RefClass(cComItems)) to hoItems
	Set pvComObject of hoItems to voItems
		Set ComCellImages of hoItems (ComAddItem(hoItems,0)) 0 to "1"
		Set ComCellHasCheckBox of hoItems (ComAddItem(hoItems,1)) 0 to True
		Set ComCellImages of hoItems (ComAddItem(hoItems,2)) 0 to "1"
	Send Destroy to hoItems
	Send ComEndUpdate
End_Procedure
948:
How can I prevent sorting a column

Procedure OnCreate
	Forward Send OnCreate
	Send ComBeginUpdate
	Set ComLinesAtRoot to OLEexLinesAtRoot
	Variant voColumns
	Get ComColumns to voColumns
	Handle hoColumns
	Get Create (RefClass(cComColumns)) to hoColumns
	Set pvComObject of hoColumns to voColumns
		Variant voColumn
		Get ComAdd of hoColumns "Default" to voColumn
		Handle hoColumn
		Get Create (RefClass(cComColumn)) to hoColumn
		Set pvComObject of hoColumn to voColumn
			Set ComDef of hoColumn OLEexCellHasCheckBox to True
			Set ComPartialCheck of hoColumn to True
			Set ComAllowSort of hoColumn to False
		Send Destroy to hoColumn
	Send Destroy to hoColumns
	Variant voItems
	Get ComItems to voItems
	Handle hoItems
	Get Create (RefClass(cComItems)) to hoItems
	Set pvComObject of hoItems to voItems
		Variant h
		Get ComAddItem of hoItems "Root" to h
		Get ComInsertItem of hoItems h "Child 1" to Nothing
		Get ComInsertItem of hoItems h "Child 2" to Nothing
		Set ComExpandItem of hoItems h to True
	Send Destroy to hoItems
	Send ComEndUpdate
End_Procedure
947:
Is there a possibility to group without moving and showing the column to the SortBar

Procedure OnCreate
	Forward Send OnCreate
	Send ComBeginUpdate
	Set ComHasLines to OLEexNoLine
	Set ComColumnAutoResize to False
	Variant rs
	Get Comcreateobject "ADOR.Recordset" to rs
		Send ComOpen "Orders" "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Program Files\Exontrol\ExGrid\Sample\SAMPLE.MDB" OLEadOpenStatic OLEadLockOptimistic Nothing
	Set ComDataSource to rs
	Set ComSingleSort to False
	Set ComSortBarVisible to False
	Set ComAllowGroupBy to True
	Set ComLayout to "singlesort="C5:1";multiplesort=" C1:2""
	Send ComEndUpdate
End_Procedure
946:
How can I show each group header ( not-subroup ), with a different background color, while alternate background colors for inside items

// Occurs when column's position or column's size is changed.
Procedure OnComLayoutChanged 
	Forward Send OnComLayoutChanged 
	Send ComRefresh
End_Procedure

Procedure OnCreate
	Forward Send OnCreate
	Send ComBeginUpdate
	Set ComHasLines to OLEexNoLine
	Set ComColumnAutoResize to False
	Variant rs
	Get Comcreateobject "ADOR.Recordset" to rs
		Send ComOpen "Orders" "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Program Files\Exontrol\ExGrid\Sample\SAMPLE.MDB" OLEadOpenStatic OLEadLockOptimistic Nothing
	Set ComDataSource to rs
	Set ComSingleSort to False
	Set ComSortBarVisible to True
	Set ComAllowGroupBy to True
	Variant voColumns
	Get ComColumns to voColumns
	Handle hoColumns
	Get Create (RefClass(cComColumns)) to hoColumns
	Set pvComObject of hoColumns to voColumns
		Variant voColumn
		Get ComItem of hoColumns 1 to voColumn
		Handle hoColumn
		Get Create (RefClass(cComColumn)) to hoColumn
		Set pvComObject of hoColumn to voColumn
			Set ComSortOrder of hoColumn to True
		Send Destroy to hoColumn
	Send Destroy to hoColumns
	Variant voColumns1
	Get ComColumns to voColumns1
	Handle hoColumns1
	Get Create (RefClass(cComColumns)) to hoColumns1
	Set pvComObject of hoColumns1 to voColumns1
		Variant voColumn1
		Get ComAdd of hoColumns1 "Position" to voColumn1
		Handle hoColumn1
		Get Create (RefClass(cComColumn)) to hoColumn1
		Set pvComObject of hoColumn1 to voColumn1
			Set ComFormatColumn of hoColumn1 to "(0:= (1 rpos '')) right ( ( 1:= ( =:0 rfind `.` ) ) != -1 ? =:1 : len(=:0))"
			Set ComVisible of hoColumn1 to False
		Send Destroy to hoColumn1
	Send Destroy to hoColumns1
	Variant voColumns2
	Get ComColumns to voColumns2
	Handle hoColumns2
	Get Create (RefClass(cComColumns)) to hoColumns2
	Set pvComObject of hoColumns2 to voColumns2
		Variant voColumn2
		Get ComAdd of hoColumns2 "Position" to voColumn2
		Handle hoColumn2
		Get Create (RefClass(cComColumn)) to hoColumn2
		Set pvComObject of hoColumn2 to voColumn2
			Set ComFormatColumn of hoColumn2 to "(1 rpos '') contains '.'"
			Set ComVisible of hoColumn2 to False
		Send Destroy to hoColumn2
	Send Destroy to hoColumns2
	Variant voConditionalFormats
	Get ComConditionalFormats to voConditionalFormats
	Handle hoConditionalFormats
	Get Create (RefClass(cComConditionalFormats)) to hoConditionalFormats
	Set pvComObject of hoConditionalFormats to voConditionalFormats
		Variant voConditionalFormat
		Get ComAdd of hoConditionalFormats "(%C13 mod 2) != 0" Nothing to voConditionalFormat
		Handle hoConditionalFormat
		Get Create (RefClass(cComConditionalFormat)) to hoConditionalFormat
		Set pvComObject of hoConditionalFormat to voConditionalFormat
			Set ComBackColor of hoConditionalFormat to (RGB(240,240,240))
		Send Destroy to hoConditionalFormat
	Send Destroy to hoConditionalFormats
	Variant voConditionalFormats1
	Get ComConditionalFormats to voConditionalFormats1
	Handle hoConditionalFormats1
	Get Create (RefClass(cComConditionalFormats)) to hoConditionalFormats1
	Set pvComObject of hoConditionalFormats1 to voConditionalFormats1
		Variant voConditionalFormat1
		Get ComAdd of hoConditionalFormats1 "%C14 = 0" Nothing to voConditionalFormat1
		Handle hoConditionalFormat1
		Get Create (RefClass(cComConditionalFormat)) to hoConditionalFormat1
		Set pvComObject of hoConditionalFormat1 to voConditionalFormat1
			Set ComBackColor of hoConditionalFormat1 to (RGB(190,190,190))
		Send Destroy to hoConditionalFormat1
	Send Destroy to hoConditionalFormats1
	Send ComEndUpdate
End_Procedure
945:
What is the difference between %0 and %C0, when using in expressions ( format, conditional format, computed fields, and so on )

Procedure OnCreate
	Forward Send OnCreate
	Send ComBeginUpdate
	Set ComHeaderAppearance to OLEEtched
	Set ComHeaderHeight to 24
	Set ComScrollBySingleLine to True
	Set ComDrawGridLines to OLEexRowLines
	Variant voColumns
	Get ComColumns to voColumns
	Handle hoColumns
	Get Create (RefClass(cComColumns)) to hoColumns
	Set pvComObject of hoColumns to voColumns
		Variant voColumn
		Get ComAdd of hoColumns "Value" to voColumn
		Handle hoColumn
		Get Create (RefClass(cComColumn)) to hoColumn
		Set pvComObject of hoColumn to voColumn
			Set ComDef of hoColumn OLEexCellValueFormat to 1
		Send Destroy to hoColumn
	Send Destroy to hoColumns
	Variant voColumns1
	Get ComColumns to voColumns1
	Handle hoColumns1
	Get Create (RefClass(cComColumns)) to hoColumns1
	Set pvComObject of hoColumns1 to voColumns1
		Variant voColumn1
		Get ComAdd of hoColumns1 "FormatColumn = `%0` ~ CellValue" to voColumn1
		Handle hoColumn1
		Get Create (RefClass(cComColumn)) to hoColumn1
		Set pvComObject of hoColumn1 to voColumn1
			Set ComFormatColumn of hoColumn1 to "%0"
			Set ComDef of hoColumn1 OLEexCellSingleLine to False
		Send Destroy to hoColumn1
	Send Destroy to hoColumns1
	Variant voColumns2
	Get ComColumns to voColumns2
	Handle hoColumns2
	Get Create (RefClass(cComColumns)) to hoColumns2
	Set pvComObject of hoColumns2 to voColumns2
		Variant voColumn2
		Get ComAdd of hoColumns2 "FormatColumn = `%C0`~ CellCaption" to voColumn2
		Handle hoColumn2
		Get Create (RefClass(cComColumn)) to hoColumn2
		Set pvComObject of hoColumn2 to voColumn2
			Set ComFormatColumn of hoColumn2 to "%C0"
			Set ComDef of hoColumn2 OLEexCellSingleLine to False
		Send Destroy to hoColumn2
	Send Destroy to hoColumns2
	Variant voItems
	Get ComItems to voItems
	Handle hoItems
	Get Create (RefClass(cComItems)) to hoItems
	Set pvComObject of hoItems to voItems
		Get ComAddItem of hoItems 1.1234 to Nothing
		Set ComCellValueFormat of hoItems (ComAddItem(hoItems,"<sha ;;0>This <fgcolor=FF0000>is a <s><b>HTM</fgcolor>L</b> text</s>.")) 0 to OLEexHTML
		Variant voEditor
		Get ComCellEditor of hoItems (ComAddItem(hoItems,3)) Nothing to voEditor
		Handle hoEditor
		Get Create (RefClass(cComEditor)) to hoEditor
		Set pvComObject of hoEditor to voEditor
			Set ComEditType of hoEditor to OLECheckListType
			Send ComAddItem of hoEditor 1 "Border" Nothing
			Send ComAddItem of hoEditor 2 "Thick" Nothing
			Send ComAddItem of hoEditor 4 "Shadow" Nothing
		Send Destroy to hoEditor
		Set ComFormatCell of hoItems (ComAddItem(hoItems,10000)) 0 to "`<b>` + currency(value)"
	Send Destroy to hoItems
	Send ComEndUpdate
End_Procedure
944:
How can I alternate colors for each group header ( not-subroup ), with a different background color, while items of the same group showing with a different color

// Occurs when column's position or column's size is changed.
Procedure OnComLayoutChanged 
	Forward Send OnComLayoutChanged 
	Send ComRefresh
End_Procedure

Procedure OnCreate
	Forward Send OnCreate
	Send ComBeginUpdate
	Set ComHasLines to OLEexNoLine
	Set ComColumnAutoResize to False
	Variant rs
	Get Comcreateobject "ADOR.Recordset" to rs
		Send ComOpen "Orders" "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Program Files\Exontrol\ExGrid\Sample\SAMPLE.MDB" OLEadOpenStatic OLEadLockOptimistic Nothing
	Set ComDataSource to rs
	Set ComSingleSort to False
	Set ComSortBarVisible to True
	Set ComAllowGroupBy to True
	Variant voColumns
	Get ComColumns to voColumns
	Handle hoColumns
	Get Create (RefClass(cComColumns)) to hoColumns
	Set pvComObject of hoColumns to voColumns
		Variant voColumn
		Get ComItem of hoColumns 1 to voColumn
		Handle hoColumn
		Get Create (RefClass(cComColumn)) to hoColumn
		Set pvComObject of hoColumn to voColumn
			Set ComSortOrder of hoColumn to True
		Send Destroy to hoColumn
	Send Destroy to hoColumns
	Variant voColumns1
	Get ComColumns to voColumns1
	Handle hoColumns1
	Get Create (RefClass(cComColumns)) to hoColumns1
	Set pvComObject of hoColumns1 to voColumns1
		Variant voColumn1
		Get ComAdd of hoColumns1 "Position" to voColumn1
		Handle hoColumn1
		Get Create (RefClass(cComColumn)) to hoColumn1
		Set pvComObject of hoColumn1 to voColumn1
			Set ComFormatColumn of hoColumn1 to "(0:= (1 rpos '')) left ( ( 1:= ( =:0 lfind `.` ) ) != -1 ? =:1 : len(=:0))"
			Set ComVisible of hoColumn1 to False
		Send Destroy to hoColumn1
	Send Destroy to hoColumns1
	Variant voColumns2
	Get ComColumns to voColumns2
	Handle hoColumns2
	Get Create (RefClass(cComColumns)) to hoColumns2
	Set pvComObject of hoColumns2 to voColumns2
		Variant voColumn2
		Get ComAdd of hoColumns2 "Position" to voColumn2
		Handle hoColumn2
		Get Create (RefClass(cComColumn)) to hoColumn2
		Set pvComObject of hoColumn2 to voColumn2
			Set ComFormatColumn of hoColumn2 to "(1 rpos '') contains '.'"
			Set ComVisible of hoColumn2 to False
		Send Destroy to hoColumn2
	Send Destroy to hoColumns2
	Variant voConditionalFormats
	Get ComConditionalFormats to voConditionalFormats
	Handle hoConditionalFormats
	Get Create (RefClass(cComConditionalFormats)) to hoConditionalFormats
	Set pvComObject of hoConditionalFormats to voConditionalFormats
		Variant voConditionalFormat
		Get ComAdd of hoConditionalFormats "(%C13 mod 2) != 0" Nothing to voConditionalFormat
		Handle hoConditionalFormat
		Get Create (RefClass(cComConditionalFormat)) to hoConditionalFormat
		Set pvComObject of hoConditionalFormat to voConditionalFormat
			Set ComBackColor of hoConditionalFormat to (RGB(240,240,240))
		Send Destroy to hoConditionalFormat
	Send Destroy to hoConditionalFormats
	Variant voConditionalFormats1
	Get ComConditionalFormats to voConditionalFormats1
	Handle hoConditionalFormats1
	Get Create (RefClass(cComConditionalFormats)) to hoConditionalFormats1
	Set pvComObject of hoConditionalFormats1 to voConditionalFormats1
		Variant voConditionalFormat1
		Get ComAdd of hoConditionalFormats1 "%C14 = 0" Nothing to voConditionalFormat1
		Handle hoConditionalFormat1
		Get Create (RefClass(cComConditionalFormat)) to hoConditionalFormat1
		Set pvComObject of hoConditionalFormat1 to voConditionalFormat1
			Set ComBackColor of hoConditionalFormat1 to (RGB(190,190,190))
		Send Destroy to hoConditionalFormat1
	Send Destroy to hoConditionalFormats1
	Send ComEndUpdate
End_Procedure
943:
How can I highlight each group header, with a different background color (method 2)

// Occurs after a new Group Item has been inserted to Items collection.
Procedure OnComAddGroupItem HITEM   llItem
	Forward Send OnComAddGroupItem llItem
	Variant voItems
	Get ComItems to voItems
	Handle hoItems
	Get Create (RefClass(cComItems)) to hoItems
	Set pvComObject of hoItems to voItems
		Set ComItemBackColor of hoItems llItem to (RGB(190,190,190))
	Send Destroy to hoItems
End_Procedure

Procedure OnCreate
	Forward Send OnCreate
	Send ComBeginUpdate
	Set ComHasLines to OLEexNoLine
	Set ComColumnAutoResize to False
	Variant rs
	Get Comcreateobject "ADOR.Recordset" to rs
		Send ComOpen "Orders" "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Program Files\Exontrol\ExGrid\Sample\SAMPLE.MDB" OLEadOpenStatic OLEadLockOptimistic Nothing
	Set ComDataSource to rs
	Set ComSingleSort to False
	Set ComSortBarVisible to True
	Set ComAllowGroupBy to True
	Variant voColumns
	Get ComColumns to voColumns
	Handle hoColumns
	Get Create (RefClass(cComColumns)) to hoColumns
	Set pvComObject of hoColumns to voColumns
		Variant voColumn
		Get ComItem of hoColumns 1 to voColumn
		Handle hoColumn
		Get Create (RefClass(cComColumn)) to hoColumn
		Set pvComObject of hoColumn to voColumn
			Set ComSortOrder of hoColumn to True
		Send Destroy to hoColumn
	Send Destroy to hoColumns
	Send ComEndUpdate
End_Procedure
942:
How can I highlight each group header ( not-subroup ), with a different background color (method 1)

// Occurs when column's position or column's size is changed.
Procedure OnComLayoutChanged 
	Forward Send OnComLayoutChanged 
	Send ComRefresh
End_Procedure

Procedure OnCreate
	Forward Send OnCreate
	Send ComBeginUpdate
	Set ComHasLines to OLEexNoLine
	Set ComColumnAutoResize to False
	Variant rs
	Get Comcreateobject "ADOR.Recordset" to rs
		Send ComOpen "Orders" "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Program Files\Exontrol\ExGrid\Sample\SAMPLE.MDB" OLEadOpenStatic OLEadLockOptimistic Nothing
	Set ComDataSource to rs
	Set ComSingleSort to False
	Set ComSortBarVisible to True
	Set ComAllowGroupBy to True
	Variant voColumns
	Get ComColumns to voColumns
	Handle hoColumns
	Get Create (RefClass(cComColumns)) to hoColumns
	Set pvComObject of hoColumns to voColumns
		Variant voColumn
		Get ComItem of hoColumns 1 to voColumn
		Handle hoColumn
		Get Create (RefClass(cComColumn)) to hoColumn
		Set pvComObject of hoColumn to voColumn
			Set ComSortOrder of hoColumn to True
		Send Destroy to hoColumn
	Send Destroy to hoColumns
	Variant voColumns1
	Get ComColumns to voColumns1
	Handle hoColumns1
	Get Create (RefClass(cComColumns)) to hoColumns1
	Set pvComObject of hoColumns1 to voColumns1
		Variant voColumn1
		Get ComAdd of hoColumns1 "Position" to voColumn1
		Handle hoColumn1
		Get Create (RefClass(cComColumn)) to hoColumn1
		Set pvComObject of hoColumn1 to voColumn1
			Set ComFormatColumn of hoColumn1 to "(0:= (1 rpos '')) left ( ( 1:= ( =:0 lfind `.` ) ) != -1 ? =:1 : len(=:0))"
			Set ComVisible of hoColumn1 to False
		Send Destroy to hoColumn1
	Send Destroy to hoColumns1
	Variant voColumns2
	Get ComColumns to voColumns2
	Handle hoColumns2
	Get Create (RefClass(cComColumns)) to hoColumns2
	Set pvComObject of hoColumns2 to voColumns2
		Variant voColumn2
		Get ComAdd of hoColumns2 "Position" to voColumn2
		Handle hoColumn2
		Get Create (RefClass(cComColumn)) to hoColumn2
		Set pvComObject of hoColumn2 to voColumn2
			Set ComFormatColumn of hoColumn2 to "(1 rpos '') contains '.'"
			Set ComVisible of hoColumn2 to False
		Send Destroy to hoColumn2
	Send Destroy to hoColumns2
	Variant voConditionalFormats
	Get ComConditionalFormats to voConditionalFormats
	Handle hoConditionalFormats
	Get Create (RefClass(cComConditionalFormats)) to hoConditionalFormats
	Set pvComObject of hoConditionalFormats to voConditionalFormats
		Variant voConditionalFormat
		Get ComAdd of hoConditionalFormats "%C14 = 0" Nothing to voConditionalFormat
		Handle hoConditionalFormat
		Get Create (RefClass(cComConditionalFormat)) to hoConditionalFormat
		Set pvComObject of hoConditionalFormat to voConditionalFormat
			Set ComBackColor of hoConditionalFormat to (RGB(190,190,190))
		Send Destroy to hoConditionalFormat
	Send Destroy to hoConditionalFormats
	Send ComEndUpdate
End_Procedure
941:
The BackColorAlternate displays each second row with a different background color. Is it possible to apply a different background color, for each sub-tree, ConditionalFormats, Add

// Occurs when column's position or column's size is changed.
Procedure OnComLayoutChanged 
	Forward Send OnComLayoutChanged 
	Send ComRefresh
End_Procedure

// Fired when the control sorts a column.
Procedure OnComSort 
	Forward Send OnComSort 
	Send ComRefresh
End_Procedure

Procedure OnCreate
	Forward Send OnCreate
	Send ComBeginUpdate
	Set ComLinesAtRoot to OLEexLinesAtRoot
	Variant voColumns
	Get ComColumns to voColumns
	Handle hoColumns
	Get Create (RefClass(cComColumns)) to hoColumns
	Set pvComObject of hoColumns to voColumns
		Variant voColumn
		Get ComAdd of hoColumns "P1" to voColumn
		Handle hoColumn
		Get Create (RefClass(cComColumn)) to hoColumn
		Set pvComObject of hoColumn to voColumn
			Set ComDef of hoColumn OLEexCellHasCheckBox to True
			Set ComPartialCheck of hoColumn to True
		Send Destroy to hoColumn
	Send Destroy to hoColumns
	Variant voColumns1
	Get ComColumns to voColumns1
	Handle hoColumns1
	Get Create (RefClass(cComColumns)) to hoColumns1
	Set pvComObject of hoColumns1 to voColumns1
		Variant voColumn1
		Get ComAdd of hoColumns1 "P2" to voColumn1
		Handle hoColumn1
		Get Create (RefClass(cComColumn)) to hoColumn1
		Set pvComObject of hoColumn1 to voColumn1
			Set ComDef of hoColumn1 OLEexCellHasCheckBox to True
			Set ComPartialCheck of hoColumn1 to True
		Send Destroy to hoColumn1
	Send Destroy to hoColumns1
	Variant voItems
	Get ComItems to voItems
	Handle hoItems
	Get Create (RefClass(cComItems)) to hoItems
	Set pvComObject of hoItems to voItems
		Variant h
		Get ComAddItem of hoItems "Root 1" to h
		Get ComInsertItem of hoItems h "Child 1" to Nothing
		Get ComInsertItem of hoItems h "Child 2" to Nothing
		Set ComExpandItem of hoItems h to True
		Get ComAddItem of hoItems "Root 2" to h
		Get ComInsertItem of hoItems h "Child 1" to Nothing
		Get ComInsertItem of hoItems h "Child 2" to Nothing
		Set ComExpandItem of hoItems h to True
		Get ComAddItem of hoItems "Root 2" to h
		Get ComInsertItem of hoItems h "Child 1" to Nothing
		Get ComInsertItem of hoItems h "Child 2" to Nothing
		Set ComExpandItem of hoItems h to True
	Send Destroy to hoItems
	Variant voColumns2
	Get ComColumns to voColumns2
	Handle hoColumns2
	Get Create (RefClass(cComColumns)) to hoColumns2
	Set pvComObject of hoColumns2 to voColumns2
		Variant voColumn2
		Get ComAdd of hoColumns2 "Position" to voColumn2
		Handle hoColumn2
		Get Create (RefClass(cComColumn)) to hoColumn2
		Set pvComObject of hoColumn2 to voColumn2
			Set ComFormatColumn of hoColumn2 to "(0:= (1 rpos '')) left ( ( 1:= ( =:0 lfind `.` ) ) != -1 ? =:1 : len(=:0))"
			Set ComVisible of hoColumn2 to False
		Send Destroy to hoColumn2
	Send Destroy to hoColumns2
	Variant voConditionalFormats
	Get ComConditionalFormats to voConditionalFormats
	Handle hoConditionalFormats
	Get Create (RefClass(cComConditionalFormats)) to hoConditionalFormats
	Set pvComObject of hoConditionalFormats to voConditionalFormats
		Variant voConditionalFormat
		Get ComAdd of hoConditionalFormats "(%C2 mod 2) != 0" Nothing to voConditionalFormat
		Handle hoConditionalFormat
		Get Create (RefClass(cComConditionalFormat)) to hoConditionalFormat
		Set pvComObject of hoConditionalFormat to voConditionalFormat
			Set ComBackColor of hoConditionalFormat to (RGB(240,240,240))
		Send Destroy to hoConditionalFormat
	Send Destroy to hoConditionalFormats
	Send ComEndUpdate
End_Procedure
940:
The BackColorAlternate displays each second row with a different background color. Is it possible to apply a different background color, for 2nd, 3rd, 4th, row, and so on

// Occurs when column's position or column's size is changed.
Procedure OnComLayoutChanged 
	Forward Send OnComLayoutChanged 
	Send ComRefresh
End_Procedure

// Fired when the control sorts a column.
Procedure OnComSort 
	Forward Send OnComSort 
	Send ComRefresh
End_Procedure

Procedure OnCreate
	Forward Send OnCreate
	Send ComBeginUpdate
	Set ComHasLines to OLEexNoLine
	Set ComColumnAutoResize to False
	Variant rs
	Get Comcreateobject "ADOR.Recordset" to rs
		Send ComOpen "Orders" "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Program Files\Exontrol\ExGrid\Sample\SAMPLE.MDB" OLEadOpenStatic OLEadLockOptimistic Nothing
	Set ComDataSource to rs
	Variant voColumns
	Get ComColumns to voColumns
	Handle hoColumns
	Get Create (RefClass(cComColumns)) to hoColumns
	Set pvComObject of hoColumns to voColumns
		Variant voColumn
		Get ComAdd of hoColumns "Position" to voColumn
		Handle hoColumn
		Get Create (RefClass(cComColumn)) to hoColumn
		Set pvComObject of hoColumn to voColumn
			Set ComFormatColumn of hoColumn to "1 apos ''"
			Set ComVisible of hoColumn to False
		Send Destroy to hoColumn
	Send Destroy to hoColumns
	Variant voConditionalFormats
	Get ComConditionalFormats to voConditionalFormats
	Handle hoConditionalFormats
	Get Create (RefClass(cComConditionalFormats)) to hoConditionalFormats
	Set pvComObject of hoConditionalFormats to voConditionalFormats
		Variant voConditionalFormat
		Get ComAdd of hoConditionalFormats "(%C13 mod 5) = 1" Nothing to voConditionalFormat
		Handle hoConditionalFormat
		Get Create (RefClass(cComConditionalFormat)) to hoConditionalFormat
		Set pvComObject of hoConditionalFormat to voConditionalFormat
			Set ComBackColor of hoConditionalFormat to (RGB(128,128,128))
		Send Destroy to hoConditionalFormat
	Send Destroy to hoConditionalFormats
	Variant voConditionalFormats1
	Get ComConditionalFormats to voConditionalFormats1
	Handle hoConditionalFormats1
	Get Create (RefClass(cComConditionalFormats)) to hoConditionalFormats1
	Set pvComObject of hoConditionalFormats1 to voConditionalFormats1
		Variant voConditionalFormat1
		Get ComAdd of hoConditionalFormats1 "(%C13 mod 5) = 2" Nothing to voConditionalFormat1
		Handle hoConditionalFormat1
		Get Create (RefClass(cComConditionalFormat)) to hoConditionalFormat1
		Set pvComObject of hoConditionalFormat1 to voConditionalFormat1
			Set ComBackColor of hoConditionalFormat1 to (RGB(164,164,164))
		Send Destroy to hoConditionalFormat1
	Send Destroy to hoConditionalFormats1
	Variant voConditionalFormats2
	Get ComConditionalFormats to voConditionalFormats2
	Handle hoConditionalFormats2
	Get Create (RefClass(cComConditionalFormats)) to hoConditionalFormats2
	Set pvComObject of hoConditionalFormats2 to voConditionalFormats2
		Variant voConditionalFormat2
		Get ComAdd of hoConditionalFormats2 "(%C13 mod 5) = 3" Nothing to voConditionalFormat2
		Handle hoConditionalFormat2
		Get Create (RefClass(cComConditionalFormat)) to hoConditionalFormat2
		Set pvComObject of hoConditionalFormat2 to voConditionalFormat2
			Set ComBackColor of hoConditionalFormat2 to (RGB(190,190,190))
		Send Destroy to hoConditionalFormat2
	Send Destroy to hoConditionalFormats2
	Variant voConditionalFormats3
	Get ComConditionalFormats to voConditionalFormats3
	Handle hoConditionalFormats3
	Get Create (RefClass(cComConditionalFormats)) to hoConditionalFormats3
	Set pvComObject of hoConditionalFormats3 to voConditionalFormats3
		Variant voConditionalFormat3
		Get ComAdd of hoConditionalFormats3 "(%C13 mod 5) = 4" Nothing to voConditionalFormat3
		Handle hoConditionalFormat3
		Get Create (RefClass(cComConditionalFormat)) to hoConditionalFormat3
		Set pvComObject of hoConditionalFormat3 to voConditionalFormat3
			Set ComBackColor of hoConditionalFormat3 to (RGB(240,240,240))
		Send Destroy to hoConditionalFormat3
	Send Destroy to hoConditionalFormats3
	Send ComEndUpdate
End_Procedure
939:
The BackColorAlternate displays each second row with a different background color. The question I have it is possible to apply a different background color for 3rd, 4th, row, and so on

// Occurs when column's position or column's size is changed.
Procedure OnComLayoutChanged 
	Forward Send OnComLayoutChanged 
	Send ComRefresh
End_Procedure

// Fired when the control sorts a column.
Procedure OnComSort 
	Forward Send OnComSort 
	Send ComRefresh
End_Procedure

Procedure OnCreate
	Forward Send OnCreate
	Send ComBeginUpdate
	Set ComHasLines to OLEexNoLine
	Set ComColumnAutoResize to False
	Variant rs
	Get Comcreateobject "ADOR.Recordset" to rs
		Send ComOpen "Orders" "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Program Files\Exontrol\ExGrid\Sample\SAMPLE.MDB" OLEadOpenStatic OLEadLockOptimistic Nothing
	Set ComDataSource to rs
	Variant voColumns
	Get ComColumns to voColumns
	Handle hoColumns
	Get Create (RefClass(cComColumns)) to hoColumns
	Set pvComObject of hoColumns to voColumns
		Variant voColumn
		Get ComAdd of hoColumns "Position" to voColumn
		Handle hoColumn
		Get Create (RefClass(cComColumn)) to hoColumn
		Set pvComObject of hoColumn to voColumn
			Set ComFormatColumn of hoColumn to "1 apos ''"
			Set ComVisible of hoColumn to False
		Send Destroy to hoColumn
	Send Destroy to hoColumns
	Variant voConditionalFormats
	Get ComConditionalFormats to voConditionalFormats
	Handle hoConditionalFormats
	Get Create (RefClass(cComConditionalFormats)) to hoConditionalFormats
	Set pvComObject of hoConditionalFormats to voConditionalFormats
		Variant voConditionalFormat
		Get ComAdd of hoConditionalFormats "(%C13 mod 4) = 0" Nothing to voConditionalFormat
		Handle hoConditionalFormat
		Get Create (RefClass(cComConditionalFormat)) to hoConditionalFormat
		Set pvComObject of hoConditionalFormat to voConditionalFormat
			Set ComBackColor of hoConditionalFormat to (RGB(240,240,240))
		Send Destroy to hoConditionalFormat
	Send Destroy to hoConditionalFormats
	Send ComEndUpdate
End_Procedure
938:
The BackColorAlternate looks fine for flat tables, but how about using it when displaying a hierarchy/tree, like grouping rows. The sample alternate colors for each group found

// Occurs when column's position or column's size is changed.
Procedure OnComLayoutChanged 
	Forward Send OnComLayoutChanged 
	Send ComRefresh
End_Procedure

Procedure OnCreate
	Forward Send OnCreate
	Send ComBeginUpdate
	Set ComHasLines to OLEexNoLine
	Set ComColumnAutoResize to False
	Variant rs
	Get Comcreateobject "ADOR.Recordset" to rs
		Send ComOpen "Orders" "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Program Files\Exontrol\ExGrid\Sample\SAMPLE.MDB" OLEadOpenStatic OLEadLockOptimistic Nothing
	Set ComDataSource to rs
	Set ComSingleSort to False
	Set ComSortBarVisible to True
	Set ComAllowGroupBy to True
	Variant voColumns
	Get ComColumns to voColumns
	Handle hoColumns
	Get Create (RefClass(cComColumns)) to hoColumns
	Set pvComObject of hoColumns to voColumns
		Variant voColumn
		Get ComItem of hoColumns 1 to voColumn
		Handle hoColumn
		Get Create (RefClass(cComColumn)) to hoColumn
		Set pvComObject of hoColumn to voColumn
			Set ComSortOrder of hoColumn to True
		Send Destroy to hoColumn
	Send Destroy to hoColumns
	Variant voColumns1
	Get ComColumns to voColumns1
	Handle hoColumns1
	Get Create (RefClass(cComColumns)) to hoColumns1
	Set pvComObject of hoColumns1 to voColumns1
		Variant voColumn1
		Get ComAdd of hoColumns1 "Position" to voColumn1
		Handle hoColumn1
		Get Create (RefClass(cComColumn)) to hoColumn1
		Set pvComObject of hoColumn1 to voColumn1
			Set ComFormatColumn of hoColumn1 to "(0:= (1 rpos '')) left ( ( 1:= ( =:0 lfind `.` ) ) != -1 ? =:1 : len(=:0))"
			Set ComVisible of hoColumn1 to False
		Send Destroy to hoColumn1
	Send Destroy to hoColumns1
	Variant voConditionalFormats
	Get ComConditionalFormats to voConditionalFormats
	Handle hoConditionalFormats
	Get Create (RefClass(cComConditionalFormats)) to hoConditionalFormats
	Set pvComObject of hoConditionalFormats to voConditionalFormats
		Variant voConditionalFormat
		Get ComAdd of hoConditionalFormats "(%C13 mod 2) != 0" Nothing to voConditionalFormat
		Handle hoConditionalFormat
		Get Create (RefClass(cComConditionalFormat)) to hoConditionalFormat
		Set pvComObject of hoConditionalFormat to voConditionalFormat
			Set ComBackColor of hoConditionalFormat to (RGB(240,240,240))
		Send Destroy to hoConditionalFormat
	Send Destroy to hoConditionalFormats
	Send ComEndUpdate
End_Procedure
937:
I need to display sub-totals in the grouping items. Is there any solution on this

// Occurs after a new Group Item has been inserted to Items collection.
Procedure OnComAddGroupItem HITEM   llItem
	Forward Send OnComAddGroupItem llItem
	Variant voItems
	Get ComItems to voItems
	Handle hoItems
	Get Create (RefClass(cComItems)) to hoItems
	Set pvComObject of hoItems to voItems
		Set ComItemDivider of hoItems llItem to -1
		Set ComEnableItem of hoItems llItem to False
		Variant vColIndex
			Get ComTreeColumnIndex to vColIndex
		Set ComCellValueFormat of hoItems llItem vColIndex to OLEexHTML
		Variant vColIndex1
			Get ComTreeColumnIndex to vColIndex1
		Set ComFormatCell of hoItems llItem vColIndex1 to "%1"
		Set ComCellValueFormat of hoItems llItem "Freight" to (OLEexTotalField + OLEexHTML)
		Set ComCellValue of hoItems llItem "Freight" to "sum(current,dir,%6)"
		Set ComFormatCell of hoItems llItem "Freight" to "`<b>` + currency(value)"
	Send Destroy to hoItems
End_Procedure

Procedure OnCreate
	Forward Send OnCreate
	Send ComBeginUpdate
	Set ComSelBackMode to OLEexTransparent
	Set ComBackColorSortBar to (RGB(240,240,240))
	Set ComColumnAutoResize to False
	Variant rs
	Get Comcreateobject "ADOR.Recordset" to rs
		Send ComOpen "Orders" "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Program Files\Exontrol\ExGrid\Sample\SAMPLE.MDB" OLEadOpenStatic OLEadLockOptimistic Nothing
	Set ComDataSource to rs
	Set ComSortBarVisible to True
	Set ComSortBarCaption to "Drag a <b>column</b> header here to group by that column."
	Set ComAllowGroupBy to True
	Variant voColumns
	Get ComColumns to voColumns
	Handle hoColumns
	Get Create (RefClass(cComColumns)) to hoColumns
	Set pvComObject of hoColumns to voColumns
		Variant voColumn
		Get ComItem of hoColumns 1 to voColumn
		Handle hoColumn
		Get Create (RefClass(cComColumn)) to hoColumn
		Set pvComObject of hoColumn to voColumn
			Set ComSortOrder of hoColumn to OLESortAscending
		Send Destroy to hoColumn
	Send Destroy to hoColumns
	Set ComLinesAtRoot to OLEexGroupLinesOutside
	Variant voColumns1
	Get ComColumns to voColumns1
	Handle hoColumns1
	Get Create (RefClass(cComColumns)) to hoColumns1
	Set pvComObject of hoColumns1 to voColumns1
		Variant voColumn1
		Get ComItem of hoColumns1 "ShipVia" to voColumn1
		Handle hoColumn1
		Get Create (RefClass(cComColumn)) to hoColumn1
		Set pvComObject of hoColumn1 to voColumn1
			Set ComDisplayFilterButton of hoColumn1 to True
		Send Destroy to hoColumn1
	Send Destroy to hoColumns1
	Send ComEndUpdate
End_Procedure
936:
I use a subtotal in exTop-Item, after grouping the item shows 0. What is the solution

Procedure OnCreate
	Forward Send OnCreate
	Send ComBeginUpdate
	Set ComColumnAutoResize to False
	Variant rs
	Get Comcreateobject "ADOR.Recordset" to rs
		Send ComOpen "Orders" "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Program Files\Exontrol\ExGrid\Sample\SAMPLE.MDB" OLEadOpenStatic OLEadLockOptimistic Nothing
	Set ComDataSource to rs
	Set ComSingleSort to False
	Set ComAllowGroupBy to True
	Set ComSortBarVisible to True
	Set ComBackColorSortBar to (ComBackColor(Self))
	Variant voColumns
	Get ComColumns to voColumns
	Handle hoColumns
	Get Create (RefClass(cComColumns)) to hoColumns
	Set pvComObject of hoColumns to voColumns
		Variant voColumn
		Get ComItem of hoColumns 5 to voColumn
		Handle hoColumn
		Get Create (RefClass(cComColumn)) to hoColumn
		Set pvComObject of hoColumn to voColumn
			Set ComSortOrder of hoColumn to OLESortAscending
		Send Destroy to hoColumn
	Send Destroy to hoColumns
	Variant voColumns1
	Get ComColumns to voColumns1
	Handle hoColumns1
	Get Create (RefClass(cComColumns)) to hoColumns1
	Set pvComObject of hoColumns1 to voColumns1
		Variant voColumn1
		Get ComItem of hoColumns1 6 to voColumn1
		Handle hoColumn1
		Get Create (RefClass(cComColumn)) to hoColumn1
		Set pvComObject of hoColumn1 to voColumn1
			Set ComFormatColumn of hoColumn1 to "currency(value)"
		Send Destroy to hoColumn1
	Send Destroy to hoColumns1
	Variant voItems
	Get ComItems to voItems
	Handle hoItems
	Get Create (RefClass(cComItems)) to hoItems
	Set pvComObject of hoItems to voItems
		Set ComLockedItemCount of hoItems OLEexTop to 1
		Variant h
		Get ComLockedItem of hoItems OLEexTop 0 to h
		Set ComItemBackColor of hoItems h to (RGB(240,240,240))
		Set ComCellBackColor of hoItems h 6 to (RGB(190,190,190))
		Set ComCellValue of hoItems h 6 to "sum(all,rec,%6)"
		Set ComCellValueFormat of hoItems h 6 to OLEexTotalField
	Send Destroy to hoItems
	Send ComRefresh
	Send ComEndUpdate
End_Procedure
935:
I would like to avoid manual typing in the date-cell because user often type wrong things (no decimal points and so on) and so the todays-date is generated for the cell. What can be done

// Occurs when the user presses and releases an ANSI key.
Procedure OnComKeyPress Short   llKeyAscii
	Forward Send OnComKeyPress llKeyAscii
	Showln "if .Editying != 0 then" (ComEditing(Self))
	Move 0 to KeyAscii
End_Procedure

Procedure OnCreate
	Forward Send OnCreate
	Send ComBeginUpdate
	Set ComColumnAutoResize to False
	Variant voColumns
	Get ComColumns to voColumns
	Handle hoColumns
	Get Create (RefClass(cComColumns)) to hoColumns
	Set pvComObject of hoColumns to voColumns
		Get ComAdd of hoColumns "Tasks" to Nothing
		Variant voColumn
		Get ComAdd of hoColumns "Date" to voColumn
		Handle hoColumn
		Get Create (RefClass(cComColumn)) to hoColumn
		Set pvComObject of hoColumn to voColumn
			Variant voEditor
			Get ComEditor of hoColumn to voEditor
			Handle hoEditor
			Get Create (RefClass(cComEditor)) to hoEditor
			Set pvComObject of hoEditor to voEditor
				Set ComEditType of hoEditor to OLEDateType
			Send Destroy to hoEditor
			Set ComWidth of hoColumn to 128
		Send Destroy to hoColumn
	Send Destroy to hoColumns
	Variant voItems
	Get ComItems to voItems
	Handle hoItems
	Get Create (RefClass(cComItems)) to hoItems
	Set pvComObject of hoItems to voItems
		Set ComCellValue of hoItems (ComAddItem(hoItems,"Item 1")) 1 to "9/21/2006"
		Set ComCellValue of hoItems (ComAddItem(hoItems,"Item 2")) 1 to "12/22/2015"
		Set ComCellValue of hoItems (ComAddItem(hoItems,"Item 3")) 1 to "1/10/2015"
	Send Destroy to hoItems
	Send ComEndUpdate
End_Procedure
934:
The control does not ensure the item to fit the control's client area once the user clicks the cell's button or check box. What can be done
// Occurs when the user presses a mouse button.
Procedure OnComMouseDown Short   llButton Short   llShift OLE_XPOS_PIXELS   llX OLE_YPOS_PIXELS   llY
	Forward Send OnComMouseDown llButton llShift llX llY
	// Items.EnsureVisibleItem(ItemFromPoint(-1,-1,c,hit))
End_Procedure

Procedure OnCreate
	Forward Send OnCreate
	Send ComBeginUpdate
	Set ComTreeColumnIndex to -1
	Set ComSelForeColor to (ComForeColor(Self))
	Variant voColumns
	Get ComColumns to voColumns
	Handle hoColumns
	Get Create (RefClass(cComColumns)) to hoColumns
	Set pvComObject of hoColumns to voColumns
		Variant voColumn
		Get ComAdd of hoColumns "Buttons" to voColumn
		Handle hoColumn
		Get Create (RefClass(cComColumn)) to hoColumn
		Set pvComObject of hoColumn to voColumn
			Set ComAlignment of hoColumn to OLECenterAlignment
			Set ComDef of hoColumn OLEexCellHasButton to True
		Send Destroy to hoColumn
	Send Destroy to hoColumns
	Variant voItems
	Get ComItems to voItems
	Handle hoItems
	Get Create (RefClass(cComItems)) to hoItems
	Set pvComObject of hoItems to voItems
		Get ComAddItem of hoItems "Button A" to Nothing
		Get ComAddItem of hoItems "Button B" to Nothing
		Get ComAddItem of hoItems "Button C" to Nothing
	Send Destroy to hoItems
	Send ComEndUpdate
End_Procedure
933:
How do you save the index number from a drop down to a database

Procedure OnCreate
	Forward Send OnCreate
	Send ComBeginUpdate
	Set ComColumnAutoResize to False
	Variant rs
	Get Comcreateobject "ADOR.Recordset" to rs
		Send ComOpen "Orders" "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Program Files\Exontrol\ExGrid\Sample\SAMPLE.MDB" OLEadOpenStatic OLEadLockOptimistic Nothing
	Set ComDataSource to rs
	Variant voColumns
	Get ComColumns to voColumns
	Handle hoColumns
	Get Create (RefClass(cComColumns)) to hoColumns
	Set pvComObject of hoColumns to voColumns
		Variant voColumn
		Get ComItem of hoColumns "ShipVia" to voColumn
		Handle hoColumn
		Get Create (RefClass(cComColumn)) to hoColumn
		Set pvComObject of hoColumn to voColumn
			Set ComDef of hoColumn OLEexCellBackColor to 15790320
			Set ComPosition of hoColumn to 1
			Set ComWidth of hoColumn to 96
			Variant voEditor
			Get ComEditor of hoColumn to voEditor
			Handle hoEditor
			Get Create (RefClass(cComEditor)) to hoEditor
			Set pvComObject of hoEditor to voEditor
				Set ComEditType of hoEditor to OLEDropDownListType
				Send ComAddItem of hoEditor 1 "Speedy Express" Nothing
				Send ComAddItem of hoEditor 2 "United Package" Nothing
				Send ComAddItem of hoEditor 3 "Federal Shipping" Nothing
			Send Destroy to hoEditor
		Send Destroy to hoColumn
	Send Destroy to hoColumns
	Send ComEndUpdate
End_Procedure
932:
Is there a way to set the column width and have it stay when refreshing using the data source

Procedure OnCreate
	Forward Send OnCreate
	Send ComBeginUpdate
	Set ComColumnAutoResize to False
	Variant rs
	Get Comcreateobject "ADOR.Recordset" to rs
		Send ComOpen "Orders" "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Program Files\Exontrol\ExGrid\Sample\SAMPLE.MDB" OLEadOpenStatic OLEadLockOptimistic Nothing
	Set ComDataSource to rs
	Set ComLayout to "gBjAAwAAuABmABpABsAB0ABlAByhoAPIAOEPAA9gYABoABQAgUEg0XN4AOcJicKkpujIAGMcj0gjcGk8QhkQgUOjUEjsfkMFAB2lEnhRihcYjUvnsykQAO8oMkTNEtGgAGUwn0uoEIhUMh0QiUOisXiE7rEyl8jAElokptYAllmpcCtMmjE3mU6jdzrUGoUKttGvFJs90oFPhVRh1Twg4wtaptco9fiMTsdIvcxw1Nkl2hUOlVwlsvnmayFAmtHnETuWm0lAv+eAGCzFK10zp1QqVUAGOvkvuuSr0YsMUi2Y0tZ4FAztt0FvuNa23Kvt2m0YnMt5No6uxwOq0eP5cGxAAxQAxgAGwAqu/q1blHDsGW49lzPUq9qtko58r8Krvc/LrPA7LWvw2ChpQ2j7Om7kBPK870hu+6ZQE4SJvmsT6u0x8BOa/iUP8jUANNATUrxAsKIFATvQU8DCL5B7dMWlr1u2gQZvgrsMMrDSyQ4vkcv02T+tEjUcyC1C7uw1kVABISgwSosXq1JLyRm9EaycqqDQuyjisu+0bvY5i3udEMjTIvkuQHFEmzHNkWymwcqtNNkIN2jUbMeGsdMm4j6R/AyZT7IcztC6M+r5Qs2yYvUx0ZOTZypBqBUZPEaMax71y6+MeTBDdBoFTjjv2z80Oi9a+VJE9HSA01SUlBbw1Ww8sPSqtFNNCdOx3L9AuQx9eVLIlUJbCa+WHVrV0fYUEMBF06UqAFh0xLLCT7abHV7P8MuNQUnW3YlDuglrfNNcVlrzV6s3FWVKMfcVrPSq6rva0wcz8+Ue2/YK+XzQ0QUQlt83/JTr2ZdiZYBKNoTm2rH4ZedzSckqGDqAA2tEk7CSQmKEJKgWMY5CmQJlkaZYsAGMY0liFJYqKIDxhSpjCu0vUBQappOgSJZUhlBtTmyJIEqaBZVljRZe8yMZnoMl4SjQRI3qal3U7OjqPpOXNFmIAadCiHIkiDV6RjOla7puFKFnjK5/ta7Z6t6GIYkqEIQ1NmqWgIA="
	Send ComEndUpdate
End_Procedure
931:
Is it possible to decode/view the control's Layout property

Procedure OnCreate
	Forward Send OnCreate
	Send ComBeginUpdate
	Set ComSingleSort to False
	Variant voColumns
	Get ComColumns to voColumns
	Handle hoColumns
	Get Create (RefClass(cComColumns)) to hoColumns
	Set pvComObject of hoColumns to voColumns
		Get ComAdd of hoColumns "C0" to Nothing
	Send Destroy to hoColumns
	Variant voColumns1
	Get ComColumns to voColumns1
	Handle hoColumns1
	Get Create (RefClass(cComColumns)) to hoColumns1
	Set pvComObject of hoColumns1 to voColumns1
		Variant voColumn
		Get ComAdd of hoColumns1 "C1" to voColumn
		Handle hoColumn
		Get Create (RefClass(cComColumn)) to hoColumn
		Set pvComObject of hoColumn to voColumn
			Set ComSortOrder of hoColumn to OLESortAscending
		Send Destroy to hoColumn
	Send Destroy to hoColumns1
	Variant voColumns2
	Get ComColumns to voColumns2
	Handle hoColumns2
	Get Create (RefClass(cComColumns)) to hoColumns2
	Set pvComObject of hoColumns2 to voColumns2
		Get ComAdd of hoColumns2 "C2" to Nothing
	Send Destroy to hoColumns2
	Handle hoPrint
	Get Create (RefClass(cComPrint)) to hoPrint // Import the 'ExPrint 1.0 Control Library' library
		Variant vText64
			Get ComLayout to vText64
		Showln (ComDecode64TextW(hoPrint,vText64))
	Send Destroy to hoPrint
	Send ComEndUpdate
End_Procedure
930:
How do I programmatically sort by multiple columns

Procedure OnCreate
	Forward Send OnCreate
	Send ComBeginUpdate
	Set ComSingleSort to False
	Variant voColumns
	Get ComColumns to voColumns
	Handle hoColumns
	Get Create (RefClass(cComColumns)) to hoColumns
	Set pvComObject of hoColumns to voColumns
		Get ComAdd of hoColumns "C0" to Nothing
	Send Destroy to hoColumns
	Variant voColumns1
	Get ComColumns to voColumns1
	Handle hoColumns1
	Get Create (RefClass(cComColumns)) to hoColumns1
	Set pvComObject of hoColumns1 to voColumns1
		Get ComAdd of hoColumns1 "C1" to Nothing
	Send Destroy to hoColumns1
	Variant voColumns2
	Get ComColumns to voColumns2
	Handle hoColumns2
	Get Create (RefClass(cComColumns)) to hoColumns2
	Set pvComObject of hoColumns2 to voColumns2
		Get ComAdd of hoColumns2 "C2" to Nothing
	Send Destroy to hoColumns2
	Set ComLayout to "multiplesort="C2:1 C1:2 C0:2""
	Send ComEndUpdate
End_Procedure
929:
Do you have any Fit-To-Page options when printing the control (W x T, Fit-To )

Procedure OnCreate
	Forward Send OnCreate
	Send ComBeginUpdate
	Set ComColumnAutoResize to False
	Set ComContinueColumnScroll to False
	Variant rs
	Get Comcreateobject "ADOR.Recordset" to rs
		Send ComOpen "Orders" "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExGrid\Sample\Access2007\sample.accdb" OLEadOpenStatic OLEadLockOptimistic Nothing
	Set ComDataSource to rs
	Send ComEndUpdate
	Handle hoPrint
	Get Create (RefClass(cComPrint)) to hoPrint // Import the 'ExPrint 1.0 Control Library' library
		Set ComOptions of hoPrint to "FitToPage =2 x 1"
		Set ComPrintExt of hoPrint to (pvComObject(Self))
		Send ComPreview of hoPrint
	Send Destroy to hoPrint
End_Procedure
928:
Do you have any Fit-To-Page options when printing the control ( x T, Fit-To Tall )

Procedure OnCreate
	Forward Send OnCreate
	Send ComBeginUpdate
	Set ComColumnAutoResize to False
	Set ComContinueColumnScroll to False
	Variant rs
	Get Comcreateobject "ADOR.Recordset" to rs
		Send ComOpen "Orders" "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExGrid\Sample\Access2007\sample.accdb" OLEadOpenStatic OLEadLockOptimistic Nothing
	Set ComDataSource to rs
	Send ComEndUpdate
	Handle hoPrint
	Get Create (RefClass(cComPrint)) to hoPrint // Import the 'ExPrint 1.0 Control Library' library
		Set ComOptions of hoPrint to "FitToPage = x 2"
		Set ComPrintExt of hoPrint to (pvComObject(Self))
		Send ComPreview of hoPrint
	Send Destroy to hoPrint
End_Procedure
927:
Do you have any Fit-To-Page options when printing the control ( W x, Fit-To Wide )

Procedure OnCreate
	Forward Send OnCreate
	Send ComBeginUpdate
	Set ComColumnAutoResize to False
	Set ComContinueColumnScroll to False
	Variant rs
	Get Comcreateobject "ADOR.Recordset" to rs
		Send ComOpen "Orders" "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExGrid\Sample\Access2007\sample.accdb" OLEadOpenStatic OLEadLockOptimistic Nothing
	Set ComDataSource to rs
	Send ComEndUpdate
	Handle hoPrint
	Get Create (RefClass(cComPrint)) to hoPrint // Import the 'ExPrint 1.0 Control Library' library
		Set ComOptions of hoPrint to "FitToPage = 2 x"
		Set ComPrintExt of hoPrint to (pvComObject(Self))
		Send ComPreview of hoPrint
	Send Destroy to hoPrint
End_Procedure
926:
Do you have any Fit-To-Page options when printing the control ( percent view, Adjust-To )

Procedure OnCreate
	Forward Send OnCreate
	Send ComBeginUpdate
	Set ComColumnAutoResize to False
	Set ComContinueColumnScroll to False
	Variant rs
	Get Comcreateobject "ADOR.Recordset" to rs
		Send ComOpen "Orders" "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExGrid\Sample\Access2007\sample.accdb" OLEadOpenStatic OLEadLockOptimistic Nothing
	Set ComDataSource to rs
	Send ComEndUpdate
	Handle hoPrint
	Get Create (RefClass(cComPrint)) to hoPrint // Import the 'ExPrint 1.0 Control Library' library
		Set ComOptions of hoPrint to "FitToPage = 50%"
		Set ComPrintExt of hoPrint to (pvComObject(Self))
		Send ComPreview of hoPrint
	Send Destroy to hoPrint
End_Procedure
925:
How can I get notified once the user expands a column

// Occurs when column's position or column's size is changed.
Procedure OnComLayoutChanged 
	Forward Send OnComLayoutChanged 
	Variant v
	Variant voColumns
	Get ComColumns to voColumns
	Handle hoColumns
	Get Create (RefClass(cComColumns)) to hoColumns
	Set pvComObject of hoColumns to voColumns
		Variant voColumn
		Get ComItem of hoColumns "C0" to voColumn
		Handle hoColumn
		Get Create (RefClass(cComColumn)) to hoColumn
		Set pvComObject of hoColumn to voColumn
			Get ComExpanded of hoColumn to v
		Send Destroy to hoColumn
	Send Destroy to hoColumns
	Showln "Column-Expanded" v
End_Procedure

Procedure OnCreate
	Forward Send OnCreate
	Send ComBeginUpdate
	Set ComShowFocusRect to False
	Set ComColumnAutoResize to False
	Set ComDrawGridLines to OLEexAllLines
	Set ComBackColorLevelHeader to (ComBackColor(Self))
	Variant voColumns1
	Get ComColumns to voColumns1
	Handle hoColumns1
	Get Create (RefClass(cComColumns)) to hoColumns1
	Set pvComObject of hoColumns1 to voColumns1
		Variant voColumn1
		Get ComAdd of hoColumns1 "C0" to voColumn1
		Handle hoColumn1
		Get Create (RefClass(cComColumn)) to hoColumn1
		Set pvComObject of hoColumn1 to voColumn1
			Set ComExpandColumns of hoColumn1 to "0,1,2"
			Set ComDisplayExpandButton of hoColumn1 to True
		Send Destroy to hoColumn1
		Get ComAdd of hoColumns1 "C1" to Nothing
		Get ComAdd of hoColumns1 "C2" to Nothing
	Send Destroy to hoColumns1
	Variant voItems
	Get ComItems to voItems
	Handle hoItems
	Get Create (RefClass(cComItems)) to hoItems
	Set pvComObject of hoItems to voItems
		Variant h
		Get ComAddItem of hoItems "Cell 0.0" to h
		Set ComCellValue of hoItems h 1 to "Cell 0.1"
		Set ComCellValue of hoItems h 2 to "Cell 0.2"
		Get ComAddItem of hoItems "Cell 1.0" to h
		Set ComCellValue of hoItems h 1 to "Cell 1.1"
		Set ComCellValue of hoItems h 2 to "Cell 1.2"
	Send Destroy to hoItems
	Send ComEndUpdate
End_Procedure
924:
I am using expandable headers, the question is how I can display the column itself, not just the child columns

Procedure OnCreate
	Forward Send OnCreate
	Send ComBeginUpdate
	Set ComColumnAutoResize to False
	Set ComDrawGridLines to OLEexAllLines
	Set ComBackColorLevelHeader to (ComBackColor(Self))
	Variant voColumns
	Get ComColumns to voColumns
	Handle hoColumns
	Get Create (RefClass(cComColumns)) to hoColumns
	Set pvComObject of hoColumns to voColumns
		Variant voColumn
		Get ComAdd of hoColumns "C0" to voColumn
		Handle hoColumn
		Get Create (RefClass(cComColumn)) to hoColumn
		Set pvComObject of hoColumn to voColumn
			Set ComExpandColumns of hoColumn to "0,1,2"
			Set ComDisplayExpandButton of hoColumn to True
		Send Destroy to hoColumn
		Get ComAdd of hoColumns "C1" to Nothing
		Get ComAdd of hoColumns "C2" to Nothing
	Send Destroy to hoColumns
	Variant voItems
	Get ComItems to voItems
	Handle hoItems
	Get Create (RefClass(cComItems)) to hoItems
	Set pvComObject of hoItems to voItems
		Variant h
		Get ComAddItem of hoItems "Cell 0.0" to h
		Set ComCellValue of hoItems h 1 to "Cell 0.1"
		Set ComCellValue of hoItems h 2 to "Cell 0.2"
		Get ComAddItem of hoItems "Cell 1.0" to h
		Set ComCellValue of hoItems h 1 to "Cell 1.1"
		Set ComCellValue of hoItems h 2 to "Cell 1.2"
	Send Destroy to hoItems
	Send ComEndUpdate
End_Procedure
923:
How do I layout expandable columns

Procedure OnCreate
	Forward Send OnCreate
	Send ComBeginUpdate
	Set ComColumnAutoResize to False
	Set ComDrawGridLines to OLEexAllLines
	Set ComBackColorLevelHeader to (ComBackColor(Self))
	Variant voColumns
	Get ComColumns to voColumns
	Handle hoColumns
	Get Create (RefClass(cComColumns)) to hoColumns
	Set pvComObject of hoColumns to voColumns
		Variant voColumn
		Get ComAdd of hoColumns "C0" to voColumn
		Handle hoColumn
		Get Create (RefClass(cComColumn)) to hoColumn
		Set pvComObject of hoColumn to voColumn
			Set ComExpandColumns of hoColumn to "1,2"
			Set ComDisplayExpandButton of hoColumn to True
		Send Destroy to hoColumn
		Get ComAdd of hoColumns "C1" to Nothing
		Get ComAdd of hoColumns "C2" to Nothing
		Get ComAdd of hoColumns "C3" to Nothing
		Variant voColumn1
		Get ComAdd of hoColumns "C4" to voColumn1
		Handle hoColumn1
		Get Create (RefClass(cComColumn)) to hoColumn1
		Set pvComObject of hoColumn1 to voColumn1
			Set ComExpandColumns of hoColumn1 to "5,6"
			Set ComDisplayExpandButton of hoColumn1 to True
		Send Destroy to hoColumn1
		Get ComAdd of hoColumns "C5" to Nothing
		Variant voColumn2
		Get ComAdd of hoColumns "C6" to voColumn2
		Handle hoColumn2
		Get Create (RefClass(cComColumn)) to hoColumn2
		Set pvComObject of hoColumn2 to voColumn2
			Set ComExpandColumns of hoColumn2 to "6,7"
			Set ComDisplayExpandButton of hoColumn2 to True
		Send Destroy to hoColumn2
		Get ComAdd of hoColumns "C7" to Nothing
	Send Destroy to hoColumns
	Send ComEndUpdate
	Variant voColumns1
	Get ComColumns to voColumns1
	Handle hoColumns1
	Get Create (RefClass(cComColumns)) to hoColumns1
	Set pvComObject of hoColumns1 to voColumns1
		Variant voColumn3
		Get ComItem of hoColumns1 "C4" to voColumn3
		Handle hoColumn3
		Get Create (RefClass(cComColumn)) to hoColumn3
		Set pvComObject of hoColumn3 to voColumn3
			Set ComExpanded of hoColumn3 to False
		Send Destroy to hoColumn3
	Send Destroy to hoColumns1
End_Procedure
922:
How do I make the control read-only (method 2)

// Occurs just before editing the focused cell.
Procedure OnComEdit HITEM   llItem Integer   llColIndex Boolean   llCancel
	Forward Send OnComEdit llItem llColIndex llCancel
	Move True to Cancel
End_Procedure

Procedure OnCreate
	Forward Send OnCreate
	Send ComBeginUpdate
	Variant voColumns
	Get ComColumns to voColumns
	Handle hoColumns
	Get Create (RefClass(cComColumns)) to hoColumns
	Set pvComObject of hoColumns to voColumns
		Variant voColumn
		Get ComAdd of hoColumns "Editor" to voColumn
		Handle hoColumn
		Get Create (RefClass(cComColumn)) to hoColumn
		Set pvComObject of hoColumn to voColumn
			Variant voEditor
			Get ComEditor of hoColumn to voEditor
			Handle hoEditor
			Get Create (RefClass(cComEditor)) to hoEditor
			Set pvComObject of hoEditor to voEditor
				Set ComEditType of hoEditor to OLECheckListType
				Send ComAddItem of hoEditor 1 "One" Nothing
				Send ComAddItem of hoEditor 2 "Two" Nothing
			Send Destroy to hoEditor
		Send Destroy to hoColumn
	Send Destroy to hoColumns
	Variant voColumns1
	Get ComColumns to voColumns1
	Handle hoColumns1
	Get Create (RefClass(cComColumns)) to hoColumns1
	Set pvComObject of hoColumns1 to voColumns1
		Variant voColumn1
		Get ComAdd of hoColumns1 "Check" to voColumn1
		Handle hoColumn1
		Get Create (RefClass(cComColumn)) to hoColumn1
		Set pvComObject of hoColumn1 to voColumn1
			Variant voEditor1
			Get ComEditor of hoColumn1 to voEditor1
			Handle hoEditor1
			Get Create (RefClass(cComEditor)) to hoEditor1
			Set pvComObject of hoEditor1 to voEditor1
				Set ComEditType of hoEditor1 to OLECheckValueType
				Set ComOption of hoEditor1 OLEexCheckValue1 to 2
			Send Destroy to hoEditor1
		Send Destroy to hoColumn1
	Send Destroy to hoColumns1
	Variant voItems
	Get ComItems to voItems
	Handle hoItems
	Get Create (RefClass(cComItems)) to hoItems
	Set pvComObject of hoItems to voItems
		Set ComCellValue of hoItems (ComAddItem(hoItems,1)) 1 to 0
		Set ComCellValue of hoItems (ComAddItem(hoItems,2)) 1 to 1
	Send Destroy to hoItems
	Send ComEndUpdate
End_Procedure
921:
How do I set a locked check-box

Procedure OnCreate
	Forward Send OnCreate
	Send ComBeginUpdate
	Variant voColumns
	Get ComColumns to voColumns
	Handle hoColumns
	Get Create (RefClass(cComColumns)) to hoColumns
	Set pvComObject of hoColumns to voColumns
		Variant voColumn
		Get ComAdd of hoColumns "Locked-Check" to voColumn
		Handle hoColumn
		Get Create (RefClass(cComColumn)) to hoColumn
		Set pvComObject of hoColumn to voColumn
			Variant voEditor
			Get ComEditor of hoColumn to voEditor
			Handle hoEditor
			Get Create (RefClass(cComEditor)) to hoEditor
			Set pvComObject of hoEditor to voEditor
				Set ComEditType of hoEditor to OLECheckValueType
				Set ComOption of hoEditor OLEexCheckValue1 to 2
				Set ComLocked of hoEditor to True
			Send Destroy to hoEditor
		Send Destroy to hoColumn
	Send Destroy to hoColumns
	Variant voColumns1
	Get ComColumns to voColumns1
	Handle hoColumns1
	Get Create (RefClass(cComColumns)) to hoColumns1
	Set pvComObject of hoColumns1 to voColumns1
		Variant voColumn1
		Get ComAdd of hoColumns1 "Unlocked-Check" to voColumn1
		Handle hoColumn1
		Get Create (RefClass(cComColumn)) to hoColumn1
		Set pvComObject of hoColumn1 to voColumn1
			Variant voEditor1
			Get ComEditor of hoColumn1 to voEditor1
			Handle hoEditor1
			Get Create (RefClass(cComEditor)) to hoEditor1
			Set pvComObject of hoEditor1 to voEditor1
				Set ComEditType of hoEditor1 to OLECheckValueType
				Set ComOption of hoEditor1 OLEexCheckValue2 to 1
			Send Destroy to hoEditor1
		Send Destroy to hoColumn1
	Send Destroy to hoColumns1
	Variant voItems
	Get ComItems to voItems
	Handle hoItems
	Get Create (RefClass(cComItems)) to hoItems
	Set pvComObject of hoItems to voItems
		Set ComCellValue of hoItems (ComAddItem(hoItems,1)) 1 to 0
		Set ComCellValue of hoItems (ComAddItem(hoItems,0)) 1 to 1
	Send Destroy to hoItems
	Send ComEndUpdate
End_Procedure
920:
Does the title of the cell's tooltip supports HTML format

Procedure OnCreate
	Forward Send OnCreate
	Send ComBeginUpdate
	Variant voColumns
	Get ComColumns to voColumns
	Handle hoColumns
	Get Create (RefClass(cComColumns)) to hoColumns
	Set pvComObject of hoColumns to voColumns
		Variant voColumn
		Get ComAdd of hoColumns "" to voColumn
		Handle hoColumn
		Get Create (RefClass(cComColumn)) to hoColumn
		Set pvComObject of hoColumn to voColumn
			Set ComCaption of hoColumn to ""
			Set ComHTMLCaption of hoColumn to "Column"
		Send Destroy to hoColumn
	Send Destroy to hoColumns
	Variant voItems
	Get ComItems to voItems
	Handle hoItems
	Get Create (RefClass(cComItems)) to hoItems
	Set pvComObject of hoItems to voItems
		Set ComCellToolTip of hoItems (ComAddItem(hoItems,"tooltip w/h different title")) 0 to "<c><b><fgcolor=FF0000>Title</fgcolor></b><br>This is bit of text that's shown when the user hovers the cell. This shows the title centered with a different color."
	Send Destroy to hoItems
	Send ComEndUpdate
End_Procedure
919:
How do I specify a different title for the cell's tooltip

Procedure OnCreate
	Forward Send OnCreate
	Send ComBeginUpdate
	Variant voColumns
	Get ComColumns to voColumns
	Handle hoColumns
	Get Create (RefClass(cComColumns)) to hoColumns
	Set pvComObject of hoColumns to voColumns
		Variant voColumn
		Get ComAdd of hoColumns "" to voColumn
		Handle hoColumn
		Get Create (RefClass(cComColumn)) to hoColumn
		Set pvComObject of hoColumn to voColumn
			Set ComCaption of hoColumn to "This is the title"
			Set ComHTMLCaption of hoColumn to "Column"
		Send Destroy to hoColumn
	Send Destroy to hoColumns
	Variant voItems
	Get ComItems to voItems
	Handle hoItems
	Get Create (RefClass(cComItems)) to hoItems
	Set pvComObject of hoItems to voItems
		Set ComCellToolTip of hoItems (ComAddItem(hoItems,"tooltip w/h different title")) 0 to "This is bit of text that's shown when the user hovers the cell."
	Send Destroy to hoItems
	Send ComEndUpdate
End_Procedure
918:
The cell's tooltip displays the column's caption in its title. How can I get ride of that

Procedure OnCreate
	Forward Send OnCreate
	Send ComBeginUpdate
	Variant voColumns
	Get ComColumns to voColumns
	Handle hoColumns
	Get Create (RefClass(cComColumns)) to hoColumns
	Set pvComObject of hoColumns to voColumns
		Get ComAdd of hoColumns "C1" to Nothing
		Get ComAdd of hoColumns "C2" to Nothing
	Send Destroy to hoColumns
	Variant voItems
	Get ComItems to voItems
	Handle hoItems
	Get Create (RefClass(cComItems)) to hoItems
	Set pvComObject of hoItems to voItems
		Variant h
		Get ComAddItem of hoItems "tooltip w/h caption" to h
		Set ComCellToolTip of hoItems h 0 to "This is bit of text that's shown when the user hovers the cell. This shows the column's caption in the title."
		Set ComCellValue of hoItems h 1 to "tooltip no caption"
		Set ComCellToolTip of hoItems h 1 to "This is bit of text that's shown when the user hovers the cell. This shows no column's caption in the title."
	Send Destroy to hoItems
	Variant voColumns1
	Get ComColumns to voColumns1
	Handle hoColumns1
	Get Create (RefClass(cComColumns)) to hoColumns1
	Set pvComObject of hoColumns1 to voColumns1
		Variant voColumn
		Get ComItem of hoColumns1 "C2" to voColumn
		Handle hoColumn
		Get Create (RefClass(cComColumn)) to hoColumn
		Set pvComObject of hoColumn to voColumn
			Set ComHTMLCaption of hoColumn to (ComCaption(hoColumn))
			Set ComCaption of hoColumn to ""
		Send Destroy to hoColumn
	Send Destroy to hoColumns1
	Send ComEndUpdate
End_Procedure
917:
How can I programmatically show the column's filter

// Fired when right mouse button is clicked
Procedure OnComRClick 
	Forward Send OnComRClick 
	Variant i
	Get ComItemFromPoint -1 -1 c hit to i
	Variant voColumns
	Get ComColumns to voColumns
	Handle hoColumns
	Get Create (RefClass(cComColumns)) to hoColumns
	Set pvComObject of hoColumns to voColumns
		Variant voColumn
		Get ComItem of hoColumns c to voColumn
		Handle hoColumn
		Get Create (RefClass(cComColumn)) to hoColumn
		Set pvComObject of hoColumn to voColumn
			Send ComShowFilter of hoColumn "-1,-1,128,128"
		Send Destroy to hoColumn
	Send Destroy to hoColumns
End_Procedure

Procedure OnCreate
	Forward Send OnCreate
	Send ComBeginUpdate
	Set ComShowFocusRect to False
	Variant voColumns1
	Get ComColumns to voColumns1
	Handle hoColumns1
	Get Create (RefClass(cComColumns)) to hoColumns1
	Set pvComObject of hoColumns1 to voColumns1
		Variant voColumn1
		Get ComAdd of hoColumns1 "Items " to voColumn1
		Handle hoColumn1
		Get Create (RefClass(cComColumn)) to hoColumn1
		Set pvComObject of hoColumn1 to voColumn1
			Set ComDisplayFilterPattern of hoColumn1 to False
			Set ComFilterList of hoColumn1 to (OLEexShowExclude + OLEexShowFocusItem + OLEexShowCheckBox)
		Send Destroy to hoColumn1
	Send Destroy to hoColumns1
	Variant voItems
	Get ComItems to voItems
	Handle hoItems
	Get Create (RefClass(cComItems)) to hoItems
	Set pvComObject of hoItems to voItems
		Get ComAddItem of hoItems "Item 1" to Nothing
		Get ComAddItem of hoItems "Item 2" to Nothing
		Get ComAddItem of hoItems "Item 3" to Nothing
	Send Destroy to hoItems
	Send ComEndUpdate
End_Procedure
916:
I want to be able to click on one of the headers, and sort by other column. How can I do that (method 2)

// Fired after the user clicks on column's header.
Procedure OnComColumnClick Variant   llColumn
	Forward Send OnComColumnClick llColumn
	// Column.SortOrder = 1
	Set ComSortOnClick to OLEexDefaultSort
	Variant voColumns
	Get ComColumns to voColumns
	Handle hoColumns
	Get Create (RefClass(cComColumns)) to hoColumns
	Set pvComObject of hoColumns to voColumns
		Variant voColumn
		Get ComItem of hoColumns "Sort" to voColumn
		Handle hoColumn
		Get Create (RefClass(cComColumn)) to hoColumn
		Set pvComObject of hoColumn to voColumn
			Set ComSortOrder of hoColumn to OLESortAscending
		Send Destroy to hoColumn
	Send Destroy to hoColumns
	Set ComSortOnClick to OLEexUserSort
End_Procedure

Procedure OnCreate
	Forward Send OnCreate
	Send ComBeginUpdate
	Set ComSortOnClick to OLEexUserSort
	Variant voColumns1
	Get ComColumns to voColumns1
	Handle hoColumns1
	Get Create (RefClass(cComColumns)) to hoColumns1
	Set pvComObject of hoColumns1 to voColumns1
		Get ComAdd of hoColumns1 "Items" to Nothing
	Send Destroy to hoColumns1
	Variant voColumns2
	Get ComColumns to voColumns2
	Handle hoColumns2
	Get Create (RefClass(cComColumns)) to hoColumns2
	Set pvComObject of hoColumns2 to voColumns2
		Variant voColumn1
		Get ComAdd of hoColumns2 "Sort" to voColumn1
		Handle hoColumn1
		Get Create (RefClass(cComColumn)) to hoColumn1
		Set pvComObject of hoColumn1 to voColumn1
			Set ComVisible of hoColumn1 to False
		Send Destroy to hoColumn1
	Send Destroy to hoColumns2
	Variant voItems
	Get ComItems to voItems
	Handle hoItems
	Get Create (RefClass(cComItems)) to hoItems
	Set pvComObject of hoItems to voItems
		Set ComCellValue of hoItems (ComAddItem(hoItems,"Item 1 (3)")) 1 to 3
		Set ComCellValue of hoItems (ComAddItem(hoItems,"Item 2 (1)")) 1 to 1
		Set ComCellValue of hoItems (ComAddItem(hoItems,"Item 3 (2)")) 1 to 2
	Send Destroy to hoItems
	Send ComEndUpdate
End_Procedure
915:
I want to be able to click on one of the headers, and sort by other column. How can I do that (method 1)

// Fired after the user clicks on column's header.
Procedure OnComColumnClick Variant   llColumn
	Forward Send OnComColumnClick llColumn
	// Column.SortOrder = 1
	Variant voItems
	Get ComItems to voItems
	Handle hoItems
	Get Create (RefClass(cComItems)) to hoItems
	Set pvComObject of hoItems to voItems
		Send ComSortChildren of hoItems 0 "Sort" True
	Send Destroy to hoItems
End_Procedure

Procedure OnCreate
	Forward Send OnCreate
	Send ComBeginUpdate
	Set ComSortOnClick to OLEexUserSort
	Variant voColumns
	Get ComColumns to voColumns
	Handle hoColumns
	Get Create (RefClass(cComColumns)) to hoColumns
	Set pvComObject of hoColumns to voColumns
		Get ComAdd of hoColumns "Items" to Nothing
	Send Destroy to hoColumns
	Variant voColumns1
	Get ComColumns to voColumns1
	Handle hoColumns1
	Get Create (RefClass(cComColumns)) to hoColumns1
	Set pvComObject of hoColumns1 to voColumns1
		Variant voColumn
		Get ComAdd of hoColumns1 "Sort" to voColumn
		Handle hoColumn
		Get Create (RefClass(cComColumn)) to hoColumn
		Set pvComObject of hoColumn to voColumn
			Set ComVisible of hoColumn to False
		Send Destroy to hoColumn
	Send Destroy to hoColumns1
	Variant voItems1
	Get ComItems to voItems1
	Handle hoItems1
	Get Create (RefClass(cComItems)) to hoItems1
	Set pvComObject of hoItems1 to voItems1
		Set ComCellValue of hoItems1 (ComAddItem(hoItems1,"Item 1 (3)")) 1 to 3
		Set ComCellValue of hoItems1 (ComAddItem(hoItems1,"Item 2 (1)")) 1 to 1
		Set ComCellValue of hoItems1 (ComAddItem(hoItems1,"Item 3 (2)")) 1 to 2
	Send Destroy to hoItems1
	Send ComEndUpdate
End_Procedure
914:
How can I highlight the cell's button with a different appearance, when cursor hovers it

Procedure OnCreate
	Forward Send OnCreate
	Send ComBeginUpdate
	Variant voAppearance
	Get ComVisualAppearance to voAppearance
	Handle hoAppearance
	Get Create (RefClass(cComAppearance)) to hoAppearance
	Set pvComObject of hoAppearance to voAppearance
		Get ComAdd of hoAppearance 1 "c:\exontrol\images\normal.ebn" to Nothing
	Send Destroy to hoAppearance
	Set ComDefaultItemHeight to 22
	Set ComTreeColumnIndex to -1
	Set ComSelForeColor to (RGB(0,0,0))
	Set ComSelBackColor to (ComBackColor(Self))
	Set ComBackground OLEexCursorHoverCellButton to |CI$1000000
	Variant voColumns
	Get ComColumns to voColumns
	Handle hoColumns
	Get Create (RefClass(cComColumns)) to hoColumns
	Set pvComObject of hoColumns to voColumns
		Variant voColumn
		Get ComAdd of hoColumns "Buttons" to voColumn
		Handle hoColumn
		Get Create (RefClass(cComColumn)) to hoColumn
		Set pvComObject of hoColumn to voColumn
			Set ComDef of hoColumn OLEexCellHasButton to True
			Set ComDef of hoColumn OLEexCellValueFormat to 1
			Set ComAlignment of hoColumn to OLECenterAlignment
			Set ComHeaderAlignment of hoColumn to OLECenterAlignment
		Send Destroy to hoColumn
	Send Destroy to hoColumns
	Variant voItems
	Get ComItems to voItems
	Handle hoItems
	Get Create (RefClass(cComItems)) to hoItems
	Set pvComObject of hoItems to voItems
		Get ComAddItem of hoItems "Button <b>1</b>" to Nothing
		Get ComAddItem of hoItems "Button <b>2</b>" to Nothing
		Get ComAddItem of hoItems "Button <b>3</b>" to Nothing
	Send Destroy to hoItems
	Send ComEndUpdate
End_Procedure
913:
How can I prevent highlighting the cell's button while cursor hovers it

// Occurs after a new Item has been inserted to Items collection.
Procedure OnComAddItem HITEM   llItem
	Forward Send OnComAddItem llItem
	Variant voItems
	Get ComItems to voItems
	Handle hoItems
	Get Create (RefClass(cComItems)) to hoItems
	Set pvComObject of hoItems to voItems
		Set ComCellValue of hoItems llItem 0 to "Button <b>A</b>"
		Set ComCellValue of hoItems llItem 1 to "Button <b>B</b>"
	Send Destroy to hoItems
End_Procedure

Procedure OnCreate
	Forward Send OnCreate
	Send ComBeginUpdate
	Set ComDefaultItemHeight to 22
	Set ComTreeColumnIndex to -1
	Set ComSelForeColor to (RGB(0,0,0))
	Set ComSelBackColor to (ComBackColor(Self))
	Set ComBackground OLEexCursorHoverCellButton to -1
	Variant voColumns
	Get ComColumns to voColumns
	Handle hoColumns
	Get Create (RefClass(cComColumns)) to hoColumns
	Set pvComObject of hoColumns to voColumns
		Variant voColumn
		Get ComAdd of hoColumns "A" to voColumn
		Handle hoColumn
		Get Create (RefClass(cComColumn)) to hoColumn
		Set pvComObject of hoColumn to voColumn
			Set ComDef of hoColumn OLEexCellHasButton to True
			Set ComDef of hoColumn OLEexCellValueFormat to 1
			Set ComAlignment of hoColumn to OLECenterAlignment
			Set ComHeaderAlignment of hoColumn to OLECenterAlignment
		Send Destroy to hoColumn
	Send Destroy to hoColumns
	Variant voColumns1
	Get ComColumns to voColumns1
	Handle hoColumns1
	Get Create (RefClass(cComColumns)) to hoColumns1
	Set pvComObject of hoColumns1 to voColumns1
		Variant voColumn1
		Get ComAdd of hoColumns1 "B" to voColumn1
		Handle hoColumn1
		Get Create (RefClass(cComColumn)) to hoColumn1
		Set pvComObject of hoColumn1 to voColumn1
			Set ComDef of hoColumn1 OLEexCellHasButton to True
			Set ComDef of hoColumn1 OLEexCellValueFormat to 1
			Set ComAlignment of hoColumn1 to OLECenterAlignment
			Set ComHeaderAlignment of hoColumn1 to OLECenterAlignment
		Send Destroy to hoColumn1
	Send Destroy to hoColumns1
	Variant voColumns2
	Get ComColumns to voColumns2
	Handle hoColumns2
	Get Create (RefClass(cComColumns)) to hoColumns2
	Set pvComObject of hoColumns2 to voColumns2
		Variant voColumn2
		Get ComAdd of hoColumns2 "" to voColumn2
		Handle hoColumn2
		Get Create (RefClass(cComColumn)) to hoColumn2
		Set pvComObject of hoColumn2 to voColumn2
			Set ComPosition of hoColumn2 to 1
		Send Destroy to hoColumn2
	Send Destroy to hoColumns2
	Variant voItems1
	Get ComItems to voItems1
	Handle hoItems1
	Get Create (RefClass(cComItems)) to hoItems1
	Set pvComObject of hoItems1 to voItems1
		Set ComCellEnabled of hoItems1 (ComAddItem(hoItems1,"")) 1 to False
		Get ComAddItem of hoItems1 "" to Nothing
		Get ComAddItem of hoItems1 "" to Nothing
	Send Destroy to hoItems1
	Send ComEndUpdate
End_Procedure
912:
How can I change the image of the icon while performing OLE Drag and Drop

// Occurs when the OLEDrag method is called.
Procedure OnComOLEStartDrag Variant   llData Integer   llAllowedEffects
	Forward Send OnComOLEStartDrag llData llAllowedEffects
	// Data.SetData("your data to drag")
	Move 2 to AllowedEffects
End_Procedure

Procedure OnCreate
	Forward Send OnCreate
	Send ComBeginUpdate
	Set ComOLEDropMode to OLEexOLEDropManual
	Set ComColumnAutoResize to False
	Set ComDefaultItemHeight to 22
	Set ComHeaderHeight to (ComDefaultItemHeight(Self))
	Variant voColumns
	Get ComColumns to voColumns
	Handle hoColumns
	Get Create (RefClass(cComColumns)) to hoColumns
	Set pvComObject of hoColumns to voColumns
		Variant voColumn
		Get ComAdd of hoColumns "Default" to voColumn
		Handle hoColumn
		Get Create (RefClass(cComColumn)) to hoColumn
		Set pvComObject of hoColumn to voColumn
			Set ComWidth of hoColumn to 128
		Send Destroy to hoColumn
	Send Destroy to hoColumns
	Variant voItems
	Get ComItems to voItems
	Handle hoItems
	Get Create (RefClass(cComItems)) to hoItems
	Set pvComObject of hoItems to voItems
		Get ComAddItem of hoItems "Item 1" to Nothing
		Get ComAddItem of hoItems "Item 2" to Nothing
		Get ComAddItem of hoItems "Item 3" to Nothing
		Get ComAddItem of hoItems "Item 4" to Nothing
		Get ComAddItem of hoItems "Item 5" to Nothing
	Send Destroy to hoItems
	Variant voAppearance
	Get ComVisualAppearance to voAppearance
	Handle hoAppearance
	Get Create (RefClass(cComAppearance)) to hoAppearance
	Set pvComObject of hoAppearance to voAppearance
		Get ComAdd of hoAppearance 1 "gBFLBCJwBAEHhEJAAChABakMACAADACAxRDQNABQKAAzQFAYaBiG6GAAGEaRYgmFgAQhFcZQSKUOQTDKMIziYBYfgkMIgSbJUgDGAkRRdDSOYDmGQYDiCIoRShOMIjHLUXxtDaIZwhEAoJb+RgAUY/cTzaAEUwHHiTKInaCQIhsC4JUJAdRURQ9EwvCIZBpEWwLChENQwWLCNj2TScBwjCyqbale45ViqdoDU8lORLUi+M4zSBPcZVTRtGShPDBKTjMLaYgkIIlVpRNa0PC1GTzQ6mazkKQLRADDIDVbAeL3LiMBy9LyLLItQALByua5mWhbcZyBCOPgBTrRb5zO58FjuTK7YLjMB7NrUNYtFaUMy2OpOCADIaecTNcaWLxPF2MY1HWYxVj2Jw3DuRJonKYB5lKAYkkYdA6hyDIjBkApaFoAAhBMfYxiGNAkFECZnm4YQBgiOgDl2URSE4KAEj2AJKigFgGgGYIIAyPQ6CCRogAAOxhAMSgSDgIRDhYFoFmGCBmBQOAMjgdgQDsUITEIIg5iISAEmIOBigiJgqgqYhoFyVILyyMgyDmYxDg4rBjgiZg6g0Dh4kiTIMGMKAwmgOQkEkFhGhGZIJAoPoQAyQ4mE6BhlAkRgXhODoZC0A4Pg6KRmCSFplkkdheDmJYTioVgACOY4uGaDwmgmJhqg8JlWmOGRmGkChyhyZxJAobYbmMI4yHqFQnkmdh+2RYp4DMIZ5gaBohmiCYGB+IJOmoNhtiPXZGG2I1tgyb4lmgGhmhqJt0Fyb4gk8CtsCiahKhYH4oXiAohiUKpKjaLt+goDJxiyaZqlaNot4OTJx3gKp2iiL5sAsBoov+KgMnOMZrisJpKjLjocnPeBLEaRI0m0SxWkSNBPEoDJ1jabJrHaXo35obOZC2OximaOZugsYpi3ga42mKO5vAuRpijsTxqAyd49m8S5mnqPuqFyd4gk+DAGn6QJwEwFp+kAT+BnmQpwgwNwOkPtYsnnrgsFcEpFnGDBnBKRRPiwUwckecgMgcIpHGMKQwnuSZygyJ1/HKOgMnyS5zAyRwykycw5g4Eg0jCA57DqTpzkydw+kIDR9AUCY9A2HQXBIUh0g0JRJ5aUxmnQZIPnkUgvDUI5tFcVoPjUOB+A4QBAICA" to Nothing
		Get ComAdd of hoAppearance 2 "gBFLBCJwBAEHhEJAAChABC8MACAADACAxRDQNABQKAAzQFAYaBiG6GAAGEaRYgmFgAQhFcZQSKUOQTDKMIziaQIRDINQlSTJcQjKKEUQTFiXIyAKKwEgmEQMQiCcbzXIUBxAAqXZZFUaKAgOMJDTLBAzUTCQbR7HiQYyBeCQOo+VoaSACEIlAZJRjoOo5DJGGQILlQJqyYrpaAxIgkEJuTqGoQaXgle53PJeLpXW5Nez9P7AMBwK7bbaqeTyXa+eDtJhif4cXjIMhyLI8UxXEKOL7jDSYPgqK48QhCEJQPQ9EyXJqnahoemCeRXBZ+aqxbBsCwCep0YBeNr3HaNaz3PK/brtWxMDpeA5IYhhF7WdZFR4tMrOdAtHL9FyPJ5TFicgXnoTAKAsRpHPeVhrAUd4LkmY5yj+fQ+i8L4zk+Y5vjCe4oD6ZoNhSRxiisVRKg+T5vnWfB6h6J5yAIf4fieWJFHyHZHHSTAygyAociMKBKEKBIeCiCZyHYFAnCAB4mBeBQJlgRIegOCgYCySAgh2WAkgINAMmMNIgCcCYoGYLoLmKaIshqCgMliEICgmDRDEiUQmkmAhWDCD5inicIVg4TQYloJg2g2ExYhoJZJEidIThMCQSFyEwkGKaRKFEJQJBkOhLCUJIDFoRiKBmBJhDeDZZDoPAlgmQhghaGZimmHhphqZopDoYw3GYEgFgGHROGOFJkCSSQCDoTAkiSaQ6C6IBJFkPIUCSJ5CDoeQ5CcVZ5gWHROmONJsCMSISByEFyjIRoYiaKYaG6HonEiOhcguJQIHoRJsh0WBWB2JIpiqShKi0OwqnqRouiyTpGhGBxiYIZKOhqGp2j4aRaAqZL3FAECAgA==" to Nothing
	Send Destroy to hoAppearance
	Set ComBackground OLEexDragDropBefore to |CI$1000000
	Set ComBackground OLEexDragDropAfter to |CI$2000000
	Set ComBackground OLEexDragDropForeColor to (RGB(0,0,1))
	Send ComEndUpdate
End_Procedure
911:
How can I sort by two-columns, one by date and one by time

Procedure OnCreate
	Forward Send OnCreate
	Send ComBeginUpdate
	Set ComSingleSort to False
	Variant voColumns
	Get ComColumns to voColumns
	Handle hoColumns
	Get Create (RefClass(cComColumns)) to hoColumns
	Set pvComObject of hoColumns to voColumns
		Variant voColumn
		Get ComAdd of hoColumns "Index" to voColumn
		Handle hoColumn
		Get Create (RefClass(cComColumn)) to hoColumn
		Set pvComObject of hoColumn to voColumn
			Set ComFormatColumn of hoColumn to "1 index ``"
		Send Destroy to hoColumn
		Variant voColumn1
		Get ComAdd of hoColumns "Date" to voColumn1
		Handle hoColumn1
		Get Create (RefClass(cComColumn)) to hoColumn1
		Set pvComObject of hoColumn1 to voColumn1
			Set ComSortType of hoColumn1 to OLESortDate
		Send Destroy to hoColumn1
		Variant voColumn2
		Get ComAdd of hoColumns "Time" to voColumn2
		Handle hoColumn2
		Get Create (RefClass(cComColumn)) to hoColumn2
		Set pvComObject of hoColumn2 to voColumn2
			Set ComSortType of hoColumn2 to OLESortTime
			Set ComFormatColumn of hoColumn2 to "time(value)"
		Send Destroy to hoColumn2
	Send Destroy to hoColumns
	Variant voItems
	Get ComItems to voItems
	Handle hoItems
	Get Create (RefClass(cComItems)) to hoItems
	Set pvComObject of hoItems to voItems
		Variant h
		Get ComAddItem of hoItems 0 to h
		Set ComCellValue of hoItems h 1 to "1/1/2001"
		Set ComCellValue of hoItems h 2 to "1/1/2001 10:00:00 AM"
		Get ComAddItem of hoItems 0 to h
		Set ComCellValue of hoItems h 1 to "12/31/2000"
		Set ComCellValue of hoItems h 2 to "1/1/2001 10:00:00 AM"
		Get ComAddItem of hoItems 0 to h
		Set ComCellValue of hoItems h 1 to "1/1/2001"
		Set ComCellValue of hoItems h 2 to "1/1/2001 6:00:00 AM"
		Get ComAddItem of hoItems 0 to h
		Set ComCellValue of hoItems h 1 to "12/31/2000"
		Set ComCellValue of hoItems h 2 to "1/1/2001 8:00:00 AM"
		Get ComAddItem of hoItems 0 to h
		Set ComCellValue of hoItems h 1 to "1/1/2001"
		Set ComCellValue of hoItems h 2 to "1/1/2001 8:00:00 AM"
		Get ComAddItem of hoItems 0 to h
		Set ComCellValue of hoItems h 1 to "12/31/2000"
		Set ComCellValue of hoItems h 2 to "1/1/2001 6:00:00 AM"
	Send Destroy to hoItems
	Set ComLayout to "multiplesort="C1:1 C2:1""
	Send ComEndUpdate
End_Procedure
910:
How can I display a context menu

// Occurs when the user releases a mouse button.
Procedure OnComMouseUp Short   llButton Short   llShift OLE_XPOS_PIXELS   llX OLE_YPOS_PIXELS   llY
	Forward Send OnComMouseUp llButton llShift llX llY
	Handle hoExContextMenu
	Get Create (RefClass(cComExContextMenu)) to hoExContextMenu // Import the 'ExContextMenu 1.0 Type Library' library
		Variant voItems
		Get ComItems of hoExContextMenu to voItems
		Handle hoItems
		Get Create (RefClass(cComItems)) to hoItems
		Set pvComObject of hoItems to voItems
			Set ComToString of hoItems to "Check[chk],[sep],Item 1,Item 2,Item 3"
		Send Destroy to hoItems
		Showln (ComSelect(hoExContextMenu,Nothing,Nothing,Nothing))
	Send Destroy to hoExContextMenu
End_Procedure

Procedure OnCreate
	Forward Send OnCreate
	Set ComColumnAutoResize to False
	Set ComScrollBySingleLine to True
	Set ComContinueColumnScroll to False
	Variant rs
	Get Comcreateobject "ADOR.Recordset" to rs
		Send ComOpen "Orders" "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Program Files\Exontrol\ExGrid\Sample\SAMPLE.MDB" OLEadOpenStatic OLEadLockOptimistic Nothing
	Set ComDataSource to rs
	Set ComReadOnly to OLEexReadOnly
End_Procedure
909:
Also, are there any plans on the ability to put borders on individual cells or rows or columns

Procedure OnCreate
	Forward Send OnCreate
	Send ComBeginUpdate
	Variant voAppearance
	Get ComVisualAppearance to voAppearance
	Handle hoAppearance
	Get Create (RefClass(cComAppearance)) to hoAppearance
	Set pvComObject of hoAppearance to voAppearance
		Get ComAdd of hoAppearance 1 "gBFLBCJwBAEHhEJAAChABOUGACAADACAxRDQNABQKAAzQFAYbBkGqGAAGIYxYgmFgAQhFcZQSpEEg7BKMYwjOJgFgmEQxDANIBQSKoaQiGQYRhkEYgEiONoaDJCM4wHIMQxHCKTZRkGYpajOPobUbGUywHRcRRvH6EZQGWg6GjqK43SCEEZhJBNGyTJ6BZbGURbCqSLAwWZAYy2RCMRxDJqLKypSwKPoGKosS5OUwzHItaRtHaJJAwKZ6ApGQpRVTAYxVfC1PzkACma4nS7oXraVJFVZTdYwTh+JABTzGLpnKw7FhGa5pABpdq0RTuOZdAbPMoyXBrXqqB46UCOGg5HRWWwHR7ZIquap9JzfCq5cRbWr5BBOPaBYKwdD1CB+iMVRnlQRY4hafZwAMH5Pl4XQnjCEBECSIBpDGHQOicIwtBIBpmiWEIJj6eJQloEgomafgyGGCI6kKYZQH+igGAKAJgEgFgGgGYIFlCf4CmCSA2A6A5hAgRgEgQYRIFYFIEmEaBmBmBghigdgQgcIZogYC4ICIKB6CSCRhiiHgogWIooi4F4AmKaIaDCDBihiTg0gsIIYmYOoOmOSJ2D6AZQBAgI=" to Nothing
		Get ComAdd of hoAppearance 2 "gBFLBCJwBAEHhEJAAChABdUIQAAYAQGKIaBoAKBQAGaAoDDYMg1QwAAxDGLEEwsACEIrjKCVIgkHYJRjGEZxNCMIhiGAaQChEZYHgkMomDAOEgyHKcEgJGyEQgkOa4ajCKYrSzAcrwTI4cRVHiQZygOZ4DBSOY8VBAcQweItJhrKqVRgriitNQjCyjZCpOaIDooAJmRZNNISBBIEQSKA0TDOQ5TSKUMYhOZTBBEbbMNBtBIUIRpajbMBiFywUxUOJYXhmG4dR7IMhyLI8UxXFo7P7mOZZXjmO49T7Kc70LQ9CyHJKnabpWoaXj2VZZV7Mda2DTNSzPKK1bZpG4bTouKZ5WjfN72fgeCzrF7HchyPJcXxnG4ZAMBA" to Nothing
		Get ComAdd of hoAppearance 3 "gBFLBCJwBAEHhEJAAChABL0GACAADACAxRDQNABQKAAzQFAYbBkGqGAAGIYxYgmFgAQhFcZQSpEEg7BKMYwjOJgEgmEQxDANIBQSKoaQiGQYRhkEYpFiONoXDJCM4wHIMQxHCKTZRkGYpajOPobUbGUygBRdExvEyEZQGWg6GjqK43SCEEZhJBNGyfH6dBpEWT7ChENQwWLLFoRDIcQyXCytIDter4boGKosS5OUwzGAtaRvHaJJAwKZ6ApGQpRVTAYxUdC1HTjJiEa4nS7oXraVJFVZTdYwTh+JABTzGKbsSycKqWaqkABZeoWbTuOZdAbPMoyXBrXgOLYzUCOGg5HRWWwHR7ZIq0Pg9Hqaa4bVbIVxbcAGH6BQa6J5hEBECSIBpDGHQOicIwtBIBpmhqEIJj2eJQloEgokiegyGGCI6kKZ5BnefA+D8L4flOa52nufg+g+f5fnPFB/ooBZ1omSAWASAJgGgJgJgIIIoDYAIDCCaBFnuBAhCgOgUgUYIoF4GIBiGKBuAcfohmgNgdggX54g4JB/F+GImCqCpikiNguguUAQICA=" to Nothing
		Get ComAdd of hoAppearance 4 "gBFLBCJwBAEHhEJAAChABBUGACAADACAxRDQNABQKAAzQFAYbBkGqGAAGIYxYgmFgAQhFcZQSpEEg7BKMYwjOJgCgmEQxDANMiwGKoaQiGQYRhkEYgFiONoaDJCM4wHIMQxHCKTZRkGYpajOPobUbAYQQSAkEgpECbZqoEZaDoaOorTZINJ0VR1Ox5KKfZyGURZPqOEQ1DBZEI2RZUbxDJquLhACj7AjeZZtRJZVp2TY9eQ3LC3aYhGqwAwSFpJVjUEBgRBJIDSMY6DpOIxaEgNZpwEITOTxUK0EhRLy5agDCJ1QrCdanahqOpaXpmW5dV7YNh2LTnfzXNq3bhuO5bXqOd59X7fN54Dg+D4LRLHbpxXIcXqvFaZZDnOb4ToPEuAZUmqcB2B2DoHGuN5Tm6d46lsPwfhOS5mnOeg9DqCAIICA" to Nothing
	Send Destroy to hoAppearance
	Set ComLinesAtRoot to OLEexGroupLinesAtRoot
	Set ComSelBackColor to (ComBackColor(Self))
	Set ComSelForeColor to (ComForeColor(Self))
	Set ComDefaultItemHeight to 22
	Variant voColumns
	Get ComColumns to voColumns
	Handle hoColumns
	Get Create (RefClass(cComColumns)) to hoColumns
	Set pvComObject of hoColumns to voColumns
		Get ComAdd of hoColumns "" to Nothing
	Send Destroy to hoColumns
	Variant voColumns1
	Get ComColumns to voColumns1
	Handle hoColumns1
	Get Create (RefClass(cComColumns)) to hoColumns1
	Set pvComObject of hoColumns1 to voColumns1
		Variant voColumn
		Get ComAdd of hoColumns1 "" to voColumn
		Handle hoColumn
		Get Create (RefClass(cComColumn)) to hoColumn
		Set pvComObject of hoColumn to voColumn
			Set ComDef of hoColumn OLEexCellBackColor to 33554432
		Send Destroy to hoColumn
	Send Destroy to hoColumns1
	Variant voColumns2
	Get ComColumns to voColumns2
	Handle hoColumns2
	Get Create (RefClass(cComColumns)) to hoColumns2
	Set pvComObject of hoColumns2 to voColumns2
		Get ComAdd of hoColumns2 "" to Nothing
	Send Destroy to hoColumns2
	Variant voItems
	Get ComItems to voItems
	Handle hoItems
	Get Create (RefClass(cComItems)) to hoItems
	Set pvComObject of hoItems to voItems
		Variant h
		Get ComAddItem of hoItems "Root 1" to h
		Set ComItemBackColor of hoItems h to |CI$1000000
		Variant hx
		Get ComSplitCell of hoItems h 0 to hx
		Set ComCellValue of hoItems 0 hx to "count(current,dir,1)"
		Set ComCellValueFormat of hoItems 0 hx to OLEexTotalField
		Set ComFormatCell of hoItems 0 hx to "'Childs: ' + value"
		Set ComCellBackColor of hoItems 0 hx to |CI$3000000
		Set ComCellHAlignment of hoItems 0 hx to OLECenterAlignment
		Get ComInsertItem of hoItems h "Child 1" to Nothing
		Get ComInsertItem of hoItems h "Child 2" to Nothing
		Set ComExpandItem of hoItems h to True
		Get ComAddItem of hoItems "Root 2" to h
		Set ComItemBackColor of hoItems h to |CI$4000000
		Get ComSplitCell of hoItems h 0 to hx
		Set ComCellValue of hoItems 0 hx to "count(current,dir,1)"
		Set ComCellValueFormat of hoItems 0 hx to OLEexTotalField
		Set ComFormatCell of hoItems 0 hx to "'Childs: ' + value"
		Set ComCellBackColor of hoItems 0 hx to |CI$3000000
		Set ComCellHAlignment of hoItems 0 hx to OLECenterAlignment
		Get ComInsertItem of hoItems h "Child 1" to Nothing
		Get ComInsertItem of hoItems h "Child 2" to Nothing
		Get ComInsertItem of hoItems h "Child 3" to Nothing
		Set ComItemBackColor of hoItems (ComInsertItem(hoItems,h,"Child 4")) to |CI$4000000
	Send Destroy to hoItems
	Send ComEndUpdate
End_Procedure
908:
How can I decode the Layout property
Procedure OnCreate
	Forward Send OnCreate
	Send ComBeginUpdate
	Variant voColumns
	Get ComColumns to voColumns
	Handle hoColumns
	Get Create (RefClass(cComColumns)) to hoColumns
	Set pvComObject of hoColumns to voColumns
		Get ComAdd of hoColumns "C1" to Nothing
		Variant voColumn
		Get ComAdd of hoColumns "C2" to voColumn
		Handle hoColumn
		Get Create (RefClass(cComColumn)) to hoColumn
		Set pvComObject of hoColumn to voColumn
			Set ComPosition of hoColumn to 1
		Send Destroy to hoColumn
	Send Destroy to hoColumns
	Variant voItems
	Get ComItems to voItems
	Handle hoItems
	Get Create (RefClass(cComItems)) to hoItems
	Set pvComObject of hoItems to voItems
		Set ComCellValue of hoItems (ComAddItem(hoItems,"SubItem 1.1")) 1 to "SubItem 1.2"
		Set ComCellValue of hoItems (ComAddItem(hoItems,"SubItem 2.1")) 1 to "SubItem 2.2"
	Send Destroy to hoItems
	Variant voColumns1
	Get ComColumns to voColumns1
	Handle hoColumns1
	Get Create (RefClass(cComColumns)) to hoColumns1
	Set pvComObject of hoColumns1 to voColumns1
		Variant voColumn1
		Get ComItem of hoColumns1 "C2" to voColumn1
		Handle hoColumn1
		Get Create (RefClass(cComColumn)) to hoColumn1
		Set pvComObject of hoColumn1 to voColumn1
			Set ComSortOrder of hoColumn1 to OLESortDescending
		Send Destroy to hoColumn1
	Send Destroy to hoColumns1
	Send ComEndUpdate
	Showln "Encoded:" (ComLayout(Self))
	Handle hoPrint
	Get Create (RefClass(cComPrint)) to hoPrint // Import the 'ExPrint 1.0 Control Library' library
		Variant vText64
			Get ComLayout to vText64
		Showln "Decoded: " (ComDecode64TextW(hoPrint,vText64))
	Send Destroy to hoPrint
End_Procedure
907:
No new line is shown if using <br> tag. How can I show a new line with-in the cell

Procedure OnCreate
	Forward Send OnCreate
	Send ComBeginUpdate
	Set ComScrollBySingleLine to True
	Set ComDrawGridLines to OLEexRowLines
	Variant voColumns
	Get ComColumns to voColumns
	Handle hoColumns
	Get Create (RefClass(cComColumns)) to hoColumns
	Set pvComObject of hoColumns to voColumns
		Variant voColumn
		Get ComAdd of hoColumns "Single-Line" to voColumn
		Handle hoColumn
		Get Create (RefClass(cComColumn)) to hoColumn
		Set pvComObject of hoColumn to voColumn
			Set ComDef of hoColumn OLEexCellSingleLine to True
			Set ComDef of hoColumn OLEexCellValueFormat to 1
		Send Destroy to hoColumn
	Send Destroy to hoColumns
	Variant voColumns1
	Get ComColumns to voColumns1
	Handle hoColumns1
	Get Create (RefClass(cComColumns)) to hoColumns1
	Set pvComObject of hoColumns1 to voColumns1
		Variant voColumn1
		Get ComAdd of hoColumns1 "Multiple-Lines" to voColumn1
		Handle hoColumn1
		Get Create (RefClass(cComColumn)) to hoColumn1
		Set pvComObject of hoColumn1 to voColumn1
			Set ComDef of hoColumn1 OLEexCellSingleLine to False
			Set ComDef of hoColumn1 OLEexCellValueFormat to 1
		Send Destroy to hoColumn1
	Send Destroy to hoColumns1
	Variant voItems
	Get ComItems to voItems
	Handle hoItems
	Get Create (RefClass(cComItems)) to hoItems
	Set pvComObject of hoItems to voItems
		Set ComCellValue of hoItems (ComAddItem(hoItems,"First-Line<br>Second-Line")) 1 to "First-Line<br>Second-Line"
		Variant h
		Get ComAddItem of hoItems "First-Line<br>Second-Line<br>Third-Line" to h
		Set ComCellSingleLine of hoItems h Nothing to False
		Set ComCellHAlignment of hoItems h 0 to OLECenterAlignment
		Set ComItemDivider of hoItems h to 0
	Send Destroy to hoItems
	Send ComEndUpdate
End_Procedure
906:
I am using exCRD to layout the columns in the grid, but is there a way where I can have the text in a cell wrap if it's exceeds the width of the cell instead of showing the ...'s

Procedure OnCreate
	Forward Send OnCreate
	Send ComBeginUpdate
	Set ComDrawGridLines to OLEexRowLines
	Set ComDefaultItemHeight to 36
	Set ComFullRowSelect to OLEexColumnSel
	Variant voColumns
	Get ComColumns to voColumns
	Handle hoColumns
	Get Create (RefClass(cComColumns)) to hoColumns
	Set pvComObject of hoColumns to voColumns
		Variant voColumn
		Get ComAdd of hoColumns "Column1" to voColumn
		Handle hoColumn
		Get Create (RefClass(cComColumn)) to hoColumn
		Set pvComObject of hoColumn to voColumn
			Set ComVisible of hoColumn to False
			Variant voEditor
			Get ComEditor of hoColumn to voEditor
			Handle hoEditor
			Get Create (RefClass(cComEditor)) to hoEditor
			Set pvComObject of hoEditor to voEditor
				Set ComEditType of hoEditor to OLEEditType
			Send Destroy to hoEditor
		Send Destroy to hoColumn
		Variant voColumn1
		Get ComAdd of hoColumns "Column2" to voColumn1
		Handle hoColumn1
		Get Create (RefClass(cComColumn)) to hoColumn1
		Set pvComObject of hoColumn1 to voColumn1
			Set ComVisible of hoColumn1 to False
			Variant voEditor1
			Get ComEditor of hoColumn1 to voEditor1
			Handle hoEditor1
			Get Create (RefClass(cComEditor)) to hoEditor1
			Set pvComObject of hoEditor1 to voEditor1
				Set ComEditType of hoEditor1 to OLEEditType
			Send Destroy to hoEditor1
		Send Destroy to hoColumn1
		Variant voColumn2
		Get ComAdd of hoColumns "Column3" to voColumn2
		Handle hoColumn2
		Get Create (RefClass(cComColumn)) to hoColumn2
		Set pvComObject of hoColumn2 to voColumn2
			Set ComVisible of hoColumn2 to False
			Set ComDef of hoColumn2 OLEexCellSingleLine to False
			Variant voEditor2
			Get ComEditor of hoColumn2 to voEditor2
			Handle hoEditor2
			Get Create (RefClass(cComEditor)) to hoEditor2
			Set pvComObject of hoEditor2 to voEditor2
				Set ComEditType of hoEditor2 to OLEEditType
			Send Destroy to hoEditor2
		Send Destroy to hoColumn2
		Variant voColumn3
		Get ComAdd of hoColumns "Column4" to voColumn3
		Handle hoColumn3
		Get Create (RefClass(cComColumn)) to hoColumn3
		Set pvComObject of hoColumn3 to voColumn3
			Set ComAlignment of hoColumn3 to OLECenterAlignment
			Set ComHeaderAlignment of hoColumn3 to OLECenterAlignment
			Set ComVisible of hoColumn3 to False
			Set ComDef of hoColumn3 OLEexCellHasButton to True
			Set ComDef of hoColumn3 OLEexCellButtonAutoWidth to True
		Send Destroy to hoColumn3
		Variant voColumn4
		Get ComAdd of hoColumns "FormatLevel" to voColumn4
		Handle hoColumn4
		Get Create (RefClass(cComColumn)) to hoColumn4
		Set pvComObject of hoColumn4 to voColumn4
			Set ComFormatLevel of hoColumn4 to "(0/1),"Information to be shown on the control's header"[a=17][ww]:128,3:128"
			Set ComDef of hoColumn4 OLEexCellFormatLevel to "(0/1),2[a=17][ww]:128,3:128"
		Send Destroy to hoColumn4
	Send Destroy to hoColumns
	Variant voItems
	Get ComItems to voItems
	Handle hoItems
	Get Create (RefClass(cComItems)) to hoItems
	Set pvComObject of hoItems to voItems
		Variant h
		Get ComAddItem of hoItems "Cell 1.1" to h
		Set ComCellValue of hoItems h 1 to "Cell 1.2"
		Set ComCellValue of hoItems h 2 to "This is just a bit of information on first row"
		Set ComCellValue of hoItems h 3 to "Cell 1.4"
		Set ComCellSingleLine of hoItems h 3 to False
		Get ComAddItem of hoItems "Cell 2.1" to h
		Set ComCellValue of hoItems h 1 to "Cell 2.2"
		Set ComCellValue of hoItems h 2 to "This is just a bit of information on second row"
		Set ComCellValue of hoItems h 3 to "Cell 2.4"
	Send Destroy to hoItems
	Send ComEndUpdate
End_Procedure
905:
How can I load pictures using URL ( http:// )
Procedure OnCreate
	Forward Send OnCreate
	Variant http
	Get Comcreateobject "Exontrol.HTTP" to http
	Set ComPictureDisplay to OLELowerRight
	Set ComPicture to http
End_Procedure
904:
How can I filter programmatically by multiple columns
Procedure OnCreate
	Forward Send OnCreate
	Send ComBeginUpdate
	Variant voColumns
	Get ComColumns to voColumns
	Handle hoColumns
	Get Create (RefClass(cComColumns)) to hoColumns
	Set pvComObject of hoColumns to voColumns
		Get ComAdd of hoColumns "Name" to Nothing
		Variant voColumn
		Get ComAdd of hoColumns "Active" to voColumn
		Handle hoColumn
		Get Create (RefClass(cComColumn)) to hoColumn
		Set pvComObject of hoColumn to voColumn
			Set ComDef of hoColumn OLEexCellHasCheckBox to True
			Set ComDisplayFilterButton of hoColumn to True
		Send Destroy to hoColumn
		Get ComAdd of hoColumns "Type" to Nothing
		Variant voColumn1
		Get ComAdd of hoColumns "Mode" to voColumn1
		Handle hoColumn1
		Get Create (RefClass(cComColumn)) to hoColumn1
		Set pvComObject of hoColumn1 to voColumn1
			Set ComFilterType of hoColumn1 to OLEexFilter
		Send Destroy to hoColumn1
	Send Destroy to hoColumns
	Variant voItems
	Get ComItems to voItems
	Handle hoItems
	Get Create (RefClass(cComItems)) to hoItems
	Set pvComObject of hoItems to voItems
		Variant h
		Get ComAddItem of hoItems "Item A" to h
		Set ComCellState of hoItems h 1 to 1
		Set ComCellValue of hoItems h 2 to "A"
		Get ComAddItem of hoItems "Item B" to h
		Set ComCellState of hoItems h 1 to 0
		Set ComCellValue of hoItems h 2 to "B"
		Get ComAddItem of hoItems "Item C" to h
		Set ComCellState of hoItems h 1 to 1
		Set ComCellValue of hoItems h 2 to "C"
		Set ComCellValue of hoItems h 3 to "None"
		Get ComAddItem of hoItems "Item D" to h
		Set ComCellState of hoItems h 1 to 1
		Set ComCellValue of hoItems h 2 to "C"
	Send Destroy to hoItems
	Variant voColumns1
	Get ComColumns to voColumns1
	Handle hoColumns1
	Get Create (RefClass(cComColumns)) to hoColumns1
	Set pvComObject of hoColumns1 to voColumns1
		Variant voColumn2
		Get ComItem of hoColumns1 1 to voColumn2
		Handle hoColumn2
		Get Create (RefClass(cComColumn)) to hoColumn2
		Set pvComObject of hoColumn2 to voColumn2
			Set ComFilterType of hoColumn2 to OLEexCheck
			Set ComFilter of hoColumn2 to 1
		Send Destroy to hoColumn2
	Send Destroy to hoColumns1
	Variant voColumns2
	Get ComColumns to voColumns2
	Handle hoColumns2
	Get Create (RefClass(cComColumns)) to hoColumns2
	Set pvComObject of hoColumns2 to voColumns2
		Variant voColumn3
		Get ComItem of hoColumns2 2 to voColumn3
		Handle hoColumn3
		Get Create (RefClass(cComColumn)) to hoColumn3
		Set pvComObject of hoColumn3 to voColumn3
			Set ComFilterType of hoColumn3 to OLEexFilter
			Set ComFilter of hoColumn3 to "C"
		Send Destroy to hoColumn3
	Send Destroy to hoColumns2
	Variant voColumns3
	Get ComColumns to voColumns3
	Handle hoColumns3
	Get Create (RefClass(cComColumns)) to hoColumns3
	Set pvComObject of hoColumns3 to voColumns3
		Variant voColumn4
		Get ComItem of hoColumns3 3 to voColumn4
		Handle hoColumn4
		Get Create (RefClass(cComColumn)) to hoColumn4
		Set pvComObject of hoColumn4 to voColumn4
			Set ComFilterType of hoColumn4 to OLEexNonBlanks
		Send Destroy to hoColumn4
	Send Destroy to hoColumns3
	Send ComApplyFilter
	Send ComEndUpdate
End_Procedure
903:
How can I add Right-To-Left Reading-Order / RTL Layout
Procedure OnCreate
	Forward Send OnCreate
	Send ComBeginUpdate
	Set ComTreeColumnIndex to -1
	Variant voColumns
	Get ComColumns to voColumns
	Handle hoColumns
	Get Create (RefClass(cComColumns)) to hoColumns
	Set pvComObject of hoColumns to voColumns
		Variant voColumn
		Get ComAdd of hoColumns "RTL - Header Caption" to voColumn
		Handle hoColumn
		Get Create (RefClass(cComColumn)) to hoColumn
		Set pvComObject of hoColumn to voColumn
			Set ComHeaderAlignment of hoColumn to (|CI$20000 + OLERightAlignment)
			Set ComAlignment of hoColumn to (|CI$20000 + OLERightAlignment)
		Send Destroy to hoColumn
	Send Destroy to hoColumns
	Set ComFullRowSelect to OLEexColumnSel
	Variant voItems
	Get ComItems to voItems
	Handle hoItems
	Get Create (RefClass(cComItems)) to hoItems
	Set pvComObject of hoItems to voItems
		Get ComAddItem of hoItems "RTL - Text Right" to Nothing
		Set ComCellHAlignment of hoItems (ComAddItem(hoItems,"RTL - Text Center")) 0 to (|CI$20000 + OLECenterAlignment)
		Set ComCellHAlignment of hoItems (ComAddItem(hoItems,"RTL - Text Left")) 0 to |CI$20000
	Send Destroy to hoItems
	Send ComEndUpdate
End_Procedure
902:
I have applied ebn to the grid using the following code, and noticed that it applies to the filter dropdownList too. Is there a way to prevent this behavior, like keeping the Filter dropdownlist intact

Procedure OnCreate
	Forward Send OnCreate
	Variant voAppearance
	Get ComVisualAppearance to voAppearance
	Handle hoAppearance
	Get Create (RefClass(cComAppearance)) to hoAppearance
	Set pvComObject of hoAppearance to voAppearance
		Get ComAdd of hoAppearance 1 "c:\exontrol\images\normal.ebn" to Nothing
	Send Destroy to hoAppearance
	Set ComAppearance to |CI$1000000
	Set ComBackColorHeader to |CI$1000000
	Set ComBackground OLEexBackColorFilter to |CI$8000000f
	Variant voColumns
	Get ComColumns to voColumns
	Handle hoColumns
	Get Create (RefClass(cComColumns)) to hoColumns
	Set pvComObject of hoColumns to voColumns
		Variant voColumn
		Get ComAdd of hoColumns "Filter" to voColumn
		Handle hoColumn
		Get Create (RefClass(cComColumn)) to hoColumn
		Set pvComObject of hoColumn to voColumn
			Set ComDisplayFilterButton of hoColumn to True
		Send Destroy to hoColumn
	Send Destroy to hoColumns
	Variant voItems
	Get ComItems to voItems
	Handle hoItems
	Get Create (RefClass(cComItems)) to hoItems
	Set pvComObject of hoItems to voItems
		Get ComAddItem of hoItems "Item 1" to Nothing
		Get ComAddItem of hoItems "Item 2" to Nothing
	Send Destroy to hoItems
End_Procedure
901:
The tree lines from the group parent to its children are missing and no identation is present: the parent and all its children are on the same offset from left. What canbe done

// Occurs after a new Group Item has been inserted to Items collection.
Procedure OnComAddGroupItem HITEM   llItem
	Forward Send OnComAddGroupItem llItem
	Variant voItems
	Get ComItems to voItems
	Handle hoItems
	Get Create (RefClass(cComItems)) to hoItems
	Set pvComObject of hoItems to voItems
		Variant nGroupColumn
		Get ComGroupItem of hoItems llItem to nGroupColumn
		Set ComItemDivider of hoItems llItem to -1
		Set ComFormatCell of hoItems llItem 0 to (ComFormatCell(hoItems,llItem,nGroupColumn))
		Variant v
			Variant voColumns
			Get ComColumns to voColumns
			Handle hoColumns
			Get Create (RefClass(cComColumns)) to hoColumns
			Set pvComObject of hoColumns to voColumns
				Variant voColumn
				Get ComItem of hoColumns nGroupColumn to voColumn
				Handle hoColumn
				Get Create (RefClass(cComColumn)) to hoColumn
				Set pvComObject of hoColumn to voColumn
					Variant voColumn1
					Get ComItem of hoColumn nGroupColumn to voColumn1
					Handle hoColumn1
					Get Create (RefClass(cComColumn)) to hoColumn1
					Set pvComObject of hoColumn1 to voColumn1
						Get ComGroupByTotalField of hoColumn1 to v
					Send Destroy to hoColumn1
				Send Destroy to hoColumn
			Send Destroy to hoColumns
		Set ComCellValue of hoItems llItem 0 to v
		Set ComCellValueFormat of hoItems llItem 0 to (ComCellValueFormat(hoItems,llItem,nGroupColumn))
	Send Destroy to hoItems
End_Procedure

Procedure OnCreate
	Forward Send OnCreate
	Send ComBeginUpdate
	Set ComReadOnly to OLEexReadOnly
	Set ComColumnAutoResize to False
	Variant rs
	Get Comcreateobject "ADOR.Recordset" to rs
		Send ComOpen "Orders" "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Program Files\Exontrol\ExGrid\Sample\SAMPLE.MDB" OLEadOpenStatic OLEadLockOptimistic Nothing
	Set ComDataSource to rs
	Set ComSortBarVisible to True
	Set ComSortBarCaption to "Drag a <b>column</b> header here to group by that column."
	Set ComAllowGroupBy to True
	Variant voColumns1
	Get ComColumns to voColumns1
	Handle hoColumns1
	Get Create (RefClass(cComColumns)) to hoColumns1
	Set pvComObject of hoColumns1 to voColumns1
		Variant voColumn2
		Get ComItem of hoColumns1 0 to voColumn2
		Handle hoColumn2
		Get Create (RefClass(cComColumn)) to hoColumn2
		Set pvComObject of hoColumn2 to voColumn2
			Set ComAllowGroupBy of hoColumn2 to False
			Set ComWidth of hoColumn2 to 96
		Send Destroy to hoColumn2
	Send Destroy to hoColumns1
	Variant voColumns2
	Get ComColumns to voColumns2
	Handle hoColumns2
	Get Create (RefClass(cComColumns)) to hoColumns2
	Set pvComObject of hoColumns2 to voColumns2
		Variant voColumn3
		Get ComItem of hoColumns2 1 to voColumn3
		Handle hoColumn3
		Get Create (RefClass(cComColumn)) to hoColumn3
		Set pvComObject of hoColumn3 to voColumn3
			Set ComSortOrder of hoColumn3 to OLESortAscending
		Send Destroy to hoColumn3
	Send Destroy to hoColumns2
	Set ComLinesAtRoot to OLEexLinesAtRoot
	Send ComEndUpdate
End_Procedure