1218
How can I save the changes, such as column's width, order

' Occurs when the user presses and then releases the left mouse button over the grid control.
function Click as v ()
	oGrid = topparent:CONTROL_ACTIVEX1.activex
	oGrid.Layout = "Select=\"0\";SingleSort=\"C0:2\";Columns=1"
end function

Dim oGrid as P
Dim var_Items as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.BeginUpdate()
oGrid.Columns.Add("Column")
var_Items = oGrid.Items
	var_Items.AddItem("Item 1")
	var_Items.AddItem("Item 2")
	var_Items.AddItem("Item 3")
oGrid.EndUpdate()

1217
How can I add totals to groups without having to go through the AddGroupItem grid function

Dim g1 as N
Dim g2 as N
Dim h as N
Dim oGrid as P
Dim r as N
Dim var_Column as P
Dim var_Column1 as P
Dim var_Column2 as P
Dim var_Columns as P
Dim var_ConditionalFormat as P
Dim var_ConditionalFormat1 as P
Dim var_ConditionalFormat2 as P
Dim var_ConditionalFormats as P
Dim var_Items as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.FreezeEvents(.t.)
oGrid.BeginUpdate()
oGrid.HeaderAppearance = 4
oGrid.HeaderHeight = 24
oGrid.LinesAtRoot = -1
var_ConditionalFormats = oGrid.ConditionalFormats
	var_ConditionalFormat = var_ConditionalFormats.Add("%CT1")
		var_ConditionalFormat.ForeColor = 8421504
		var_ConditionalFormat.ApplyTo = 1 '1 + 
	var_ConditionalFormat1 = var_ConditionalFormats.Add("%CT2")
		var_ConditionalFormat1.ForeColor = 8421504
		var_ConditionalFormat1.ApplyTo = 2 '2 + 
	var_ConditionalFormat2 = var_ConditionalFormats.Add("%CT3")
		var_ConditionalFormat2.ForeColor = 8421504
		var_ConditionalFormat2.ApplyTo = 3 '3 + 
var_Columns = oGrid.Columns
	var_Columns.Add("Description")
	var_Column = var_Columns.Add("Qty")
		var_Column.Editor.EditType = 4
		' var_Column.Def(20) = "sum(current,rec,%1)"
		oGrid.TemplateDef = "dim var_Column"
		oGrid.TemplateDef = var_Column
		oGrid.Template = "var_Column.Def(20) = `sum(current,rec,%1)`"

	var_Column1 = var_Columns.Add("Price")
		' var_Column1.Def(20) = "avg(current,rec,%2)"
		oGrid.TemplateDef = "dim var_Column1"
		oGrid.TemplateDef = var_Column1
		oGrid.Template = "var_Column1.Def(20) = `avg(current,rec,%2)`"

		var_Column1.Editor.EditType = 4
	var_Column2 = var_Columns.Add("Amount")
		var_Column2.ComputedField = "%1 * %2"
		' var_Column2.Def(20) = "sum(current,rec,%3)"
		oGrid.TemplateDef = "dim var_Column2"
		oGrid.TemplateDef = var_Column2
		oGrid.Template = "var_Column2.Def(20) = `sum(current,rec,%3)`"

var_Items = oGrid.Items
	r = var_Items.AddItem("Root")
	g1 = var_Items.InsertItem(r,,"Group 1")
	h = var_Items.InsertItem(g1,,"Item 1")
	' var_Items.CellValue(h,1) = 1
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellValue(h,1) = 1"

	' var_Items.CellValue(h,2) = 10
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellValue(h,2) = 10"

	h = var_Items.InsertItem(g1,,"Item 2")
	' var_Items.CellValue(h,1) = 2
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellValue(h,1) = 2"

	' var_Items.CellValue(h,2) = 11
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellValue(h,2) = 11"

	g2 = var_Items.InsertItem(r,,"Group 2")
	h = var_Items.InsertItem(g2,,"Item 1")
	' var_Items.CellValue(h,1) = 3
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellValue(h,1) = 3"

	' var_Items.CellValue(h,2) = 12
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellValue(h,2) = 12"

	h = var_Items.InsertItem(g2,,"Item 2")
	' var_Items.CellValue(h,1) = 4
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellValue(h,1) = 4"

	' var_Items.CellValue(h,2) = 13
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellValue(h,2) = 13"

	' var_Items.ExpandItem(0) = .t.
	oGrid.TemplateDef = "dim var_Items"
	oGrid.TemplateDef = var_Items
	oGrid.Template = "var_Items.ExpandItem(0) = True"

oGrid.EndUpdate()
oGrid.FreezeEvents(.f.)

1216
How can I configure the filters in the text columns to search by content

Dim oGrid as P
Dim var_Items as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.BeginUpdate()
oGrid.FilterBarPromptVisible = 1
oGrid.HeaderAppearance = 0
oGrid.FilterBarPromptType = 1
oGrid.Columns.Add("Names")
var_Items = oGrid.Items
	var_Items.AddItem("Mantel")
	var_Items.AddItem("Mechanik")
	var_Items.AddItem("Motor")
	var_Items.AddItem("Murks")
	var_Items.AddItem("Märchen")
	var_Items.AddItem("Möhren")
	var_Items.AddItem("Mühle")
	var_Items.AddItem("Sérigraphie")
oGrid.FilterBarPromptPattern = "a"
oGrid.EndUpdate()

1215
How can I display the control's captions in Spanish

Dim oGrid as P
Dim var_Column as P
Dim var_Items as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.BeginUpdate()
oGrid.FilterBarPromptVisible = 1
oGrid.HeaderAppearance = 0
oGrid.Template = "Description(0) = `(todo) `" // oGrid.Description(0) = "(todo) "
oGrid.Template = "Description(3) = `filtrar por...`" // oGrid.Description(3) = "filtrar por..."
oGrid.FilterBarPrompt = "<i><fgcolor=808080>iniciar filtro...</fgcolor></i>"
var_Column = oGrid.Columns.Add("Names")
	var_Column.DisplayFilterButton = .t.
	var_Column.FilterType = 3
var_Items = oGrid.Items
	var_Items.AddItem("Mantel")
	var_Items.AddItem("Mechanik")
	var_Items.AddItem("Motor")
	var_Items.AddItem("Murks")
	var_Items.AddItem("Märchen")
	var_Items.AddItem("Möhren")
	var_Items.AddItem("Mühle")
	var_Items.AddItem("Sérigraphie")
oGrid.EndUpdate()

1214
How can I zoom in the control

Dim oGrid as P
Dim s1 as 
Dim s2 as 
Dim var_Column as P
Dim var_Items as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.BeginUpdate()
s1 = 16
s2 = oGrid.FormatABC("2 * value",s1)
oGrid.ImageSize = s2
oGrid.DefaultItemHeight = s2
oGrid.HeaderHeight = s2
oGrid.SortBarHeight = s2
oGrid.Indent = s2
oGrid.Font.Size = s1
oGrid.FilterBarFont.Size = s1
oGrid.ToolTipFont.Size = s1
oGrid.FilterBarPromptVisible = 1
oGrid.HeaderAppearance = 0
var_Column = oGrid.Columns.Add("Names")
	var_Column.DisplayFilterButton = .t.
	var_Column.FilterType = 3
var_Items = oGrid.Items
	var_Items.AddItem("Mantel")
	var_Items.AddItem("Mechanik")
	var_Items.AddItem("Motor")
	var_Items.AddItem("Murks")
	var_Items.AddItem("Märchen")
	var_Items.AddItem("Möhren")
	var_Items.AddItem("Mühle")
	var_Items.AddItem("Sérigraphie")
oGrid.EndUpdate()

1213
Can I set a filter that automatically adds a * before and after the word, so the user can just search for 'cat' and it becomes '*cat*' automatically

Dim h as N
Dim oGrid as P
Dim var_Column as P
Dim var_Items as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.BeginUpdate()
oGrid.HeaderAppearance = 4
oGrid.HeaderHeight = 24
oGrid.LinesAtRoot = -1
var_Column = oGrid.Columns.Add("Items")
	var_Column.DisplayFilterButton = .t.
	var_Column.DisplayFilterPattern = .t.
	' var_Column.Def(21) = "*<%filter%>*"
	oGrid.TemplateDef = "dim var_Column"
	oGrid.TemplateDef = var_Column
	oGrid.Template = "var_Column.Def(21) = `*<%filter%>*`"

	var_Column.FilterType = 3
	var_Column.Filter = "1"
var_Items = oGrid.Items
	h = var_Items.AddItem("Root 1")
	var_Items.InsertItem(h,,"Child 1")
	var_Items.InsertItem(h,,"Child 2")
	' var_Items.ExpandItem(h) = .t.
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.ExpandItem(h) = True"

	h = var_Items.AddItem("Root 2")
	var_Items.InsertItem(h,,"Child 1")
	var_Items.InsertItem(h,,"Child 2")
oGrid.ApplyFilter()
oGrid.EndUpdate()

1212
The fine dotted lines in the control appear much thicker than the standard ones we've been using. How can we fix this

Dim oGrid as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.BeginUpdate()
oGrid.HeaderAppearance = 4
oGrid.HeaderHeight = 24
oGrid.DrawGridLines = -1
oGrid.GridLineStyle = 512
oGrid.ColumnAutoResize = .f.
oGrid.Columns.Add("Column 1")
oGrid.Columns.Add("Column 2")
oGrid.Columns.Add("Column 3")
oGrid.Columns.Add("Column 4")
oGrid.EndUpdate()

1211
Load data as a tree using a parent-id relationship

Dim oGrid as P
Dim rs as P
Dim var_Items as local

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.BeginUpdate()
oGrid.ColumnAutoResize = .f.
oGrid.HeaderAppearance = 4
oGrid.HeaderHeight = 24
oGrid.DrawGridLines = 2
oGrid.LinesAtRoot = -1
rs = OLE.Create("ADODB.Recordset")
	rs.Open("Select * FROM Employees WHERE 1=0","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExGrid\Sample\Access\misc.mdb",3,3)
oGrid.DataSource = rs
oGrid.Columns.Item(0).Width = 128
rs = OLE.Create("ADODB.Recordset")
	rs.Open("Employees","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExGrid\Sample\Access\misc.mdb",3,3)
oGrid.PutItems(rs.GetRows(),";0;17")
' oGrid.Items.ExpandItem(0) = .t.
var_Items = oGrid.Items
oGrid.TemplateDef = "dim var_Items"
oGrid.TemplateDef = var_Items
oGrid.Template = "var_Items.ExpandItem(0) = True"

oGrid.EndUpdate()

1210
Is there a way to change the contents of the drop down editor based on a value in another column

' Occurs after a new Item has been inserted to Items collection.
function AddItem as v (Item  as  OLE::Exontrol.Grid.1::HITEM)
	Dim var_Items as local
	Dim var_Items1 as local
	oGrid = topparent:CONTROL_ACTIVEX1.activex
	' oGrid.Items.CellEditorVisible(Item,0) = 1
	var_Items = oGrid.Items
	oGrid.TemplateDef = "dim var_Items"
	oGrid.TemplateDef = var_Items
	oGrid.Template = "var_Items.CellEditorVisible(Item,0) = 1"
	' oGrid.Items.CellEditorVisible(Item,1) = 1
	var_Items1 = oGrid.Items
	oGrid.TemplateDef = "dim var_Items1"
	oGrid.TemplateDef = var_Items1
	oGrid.Template = "var_Items1.CellEditorVisible(Item,1) = 1"

end function

' Occurs when the edit operation starts.
function EditOpen as v ()
	Dim c as 
	Dim v as 
	Dim var_Editor as P
	Dim var_Items as P
	oGrid = topparent:CONTROL_ACTIVEX1.activex
	var_Items = oGrid.Items
		v = var_Items.CellValue(var_Items.FocusItem,0)
		c = var_Items.CellCaption(var_Items.FocusItem,0)
	var_Editor = oGrid.Columns.Item(1).Editor
		var_Editor.ClearItems()
		var_Editor.AddItem(v,c)
end function

Dim h as N
Dim oGrid as P
Dim var_Column as P
Dim var_Editor as P
Dim var_Editor1 as local
Dim var_Items as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.BeginUpdate()
oGrid.HeaderAppearance = 4
oGrid.HeaderHeight = 24
oGrid.GridLineStyle = 512
var_Column = oGrid.Columns.Add("DropDownList")
	var_Editor = var_Column.Editor
		var_Editor.EditType = 3
		var_Editor.AddItem(1,"First")
		var_Editor.AddItem(2,"Second")
		var_Editor.AddItem(3,"Third")
oGrid.DrawGridLines = -1
' oGrid.Columns.Add("DropDownList-Related").Editor.EditType = 3
var_Editor1 = oGrid.Columns.Add("DropDownList-Related").Editor
oGrid.TemplateDef = "dim var_Editor1"
oGrid.TemplateDef = var_Editor1
oGrid.Template = "var_Editor1.EditType = 3"

var_Items = oGrid.Items
	' var_Items.CellValue(var_Items.AddItem(1),1) = -1
	oGrid.TemplateDef = "dim var_Items"
	oGrid.TemplateDef = var_Items
	oGrid.Template = "var_Items.CellValue(AddItem(1),1) = -1"

	' var_Items.CellValue(var_Items.AddItem(2),1) = -1
	oGrid.TemplateDef = "dim var_Items"
	oGrid.TemplateDef = var_Items
	oGrid.Template = "var_Items.CellValue(AddItem(2),1) = -1"

	' var_Items.CellValue(var_Items.AddItem(3),1) = -1
	oGrid.TemplateDef = "dim var_Items"
	oGrid.TemplateDef = var_Items
	oGrid.Template = "var_Items.CellValue(AddItem(3),1) = -1"

	' var_Items.LockedItemCount(2) = 1
	oGrid.TemplateDef = "dim var_Items"
	oGrid.TemplateDef = var_Items
	oGrid.Template = "var_Items.LockedItemCount(2) = 1"

	h = var_Items.LockedItem(2,0)
	' var_Items.ItemDivider(h) = 0
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.ItemDivider(h) = 0"

	' var_Items.ItemDividerLineAlignment(h) = 2
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.ItemDividerLineAlignment(h) = 2"

	' var_Items.CellEditorVisible(h,0) = .f.
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellEditorVisible(h,0) = False"

	' var_Items.CellSingleLine(h,0) = .f.
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellSingleLine(h,0) = False"

	' var_Items.CellValueFormat(h,0) = 1
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellValueFormat(h,0) = 1"

	' var_Items.CellValue(h,0) = "The drop down editor in the second column is filled during the <b>EditOpen event</b>, and the values are based on the selection on the first column."
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellValue(h,0) = `The drop down editor in the second column is filled during the <b>EditOpen event</b>, and the values are based on the selection on the first column.`"

oGrid.EndUpdate()

1209
Highlight the editable fields

' Occurs when the user changes the cell's content.
function Change as v (Item  as  OLE::Exontrol.Grid.1::HITEM,ColIndex  as  N,NewValue  as  A)
	oGrid = topparent:CONTROL_ACTIVEX1.activex
	oGrid.Refresh()
end function

Dim g1 as N
Dim g2 as N
Dim h as N
Dim oGrid as P
Dim r as N
Dim var_Column as P
Dim var_Column1 as P
Dim var_Column2 as P
Dim var_Columns as P
Dim var_ConditionalFormat as P
Dim var_ConditionalFormat1 as P
Dim var_ConditionalFormat2 as P
Dim var_ConditionalFormats as P
Dim var_Items as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.FreezeEvents(.t.)
oGrid.BeginUpdate()
oGrid.HeaderAppearance = 4
oGrid.HeaderHeight = 24
oGrid.LinesAtRoot = -1
var_ConditionalFormats = oGrid.ConditionalFormats
	var_ConditionalFormat = var_ConditionalFormats.Add("%CE1")
		var_ConditionalFormat.Bold = .t.
		var_ConditionalFormat.BackColor = 16119285
		var_ConditionalFormat.ApplyTo = 1 '1 + 
	var_ConditionalFormat1 = var_ConditionalFormats.Add("%CE2")
		var_ConditionalFormat1.Bold = .t.
		var_ConditionalFormat1.BackColor = 16119285
		var_ConditionalFormat1.ApplyTo = 2 '2 + 
	var_ConditionalFormat2 = var_ConditionalFormats.Add("%CE3")
		var_ConditionalFormat2.Bold = .t.
		var_ConditionalFormat2.BackColor = 16119285
		var_ConditionalFormat2.ApplyTo = 3 '3 + 
var_Columns = oGrid.Columns
	var_Columns.Add("Description")
	var_Column = var_Columns.Add("Qty")
		var_Column.Editor.EditType = 4
		' var_Column.Def(20) = "sum(current,rec,%1)"
		oGrid.TemplateDef = "dim var_Column"
		oGrid.TemplateDef = var_Column
		oGrid.Template = "var_Column.Def(20) = `sum(current,rec,%1)`"

	var_Column1 = var_Columns.Add("Price")
		' var_Column1.Def(20) = "avg(current,rec,%2)"
		oGrid.TemplateDef = "dim var_Column1"
		oGrid.TemplateDef = var_Column1
		oGrid.Template = "var_Column1.Def(20) = `avg(current,rec,%2)`"

		var_Column1.Editor.EditType = 4
	var_Column2 = var_Columns.Add("Amount")
		var_Column2.ComputedField = "%1 * %2"
		' var_Column2.Def(20) = "sum(current,rec,%3)"
		oGrid.TemplateDef = "dim var_Column2"
		oGrid.TemplateDef = var_Column2
		oGrid.Template = "var_Column2.Def(20) = `sum(current,rec,%3)`"

var_Items = oGrid.Items
	r = var_Items.AddItem("Root")
	g1 = var_Items.InsertItem(r,,"Group 1")
	h = var_Items.InsertItem(g1,,"Item 1")
	' var_Items.CellValue(h,1) = 1
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellValue(h,1) = 1"

	' var_Items.CellValue(h,2) = 10
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellValue(h,2) = 10"

	h = var_Items.InsertItem(g1,,"Item 2")
	' var_Items.CellValue(h,1) = 2
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellValue(h,1) = 2"

	' var_Items.CellValue(h,2) = 11
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellValue(h,2) = 11"

	g2 = var_Items.InsertItem(r,,"Group 2")
	h = var_Items.InsertItem(g2,,"Item 1")
	' var_Items.CellValue(h,1) = 3
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellValue(h,1) = 3"

	' var_Items.CellValue(h,2) = 12
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellValue(h,2) = 12"

	h = var_Items.InsertItem(g2,,"Item 2")
	' var_Items.CellValue(h,1) = 4
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellValue(h,1) = 4"

	' var_Items.CellValue(h,2) = 13
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellValue(h,2) = 13"

	' var_Items.ExpandItem(0) = .t.
	oGrid.TemplateDef = "dim var_Items"
	oGrid.TemplateDef = var_Items
	oGrid.Template = "var_Items.ExpandItem(0) = True"

oGrid.EndUpdate()
oGrid.FreezeEvents(.f.)

1208
Highlight the total fields

' Occurs when the user changes the cell's content.
function Change as v (Item  as  OLE::Exontrol.Grid.1::HITEM,ColIndex  as  N,NewValue  as  A)
	oGrid = topparent:CONTROL_ACTIVEX1.activex
	oGrid.Refresh()
end function

Dim g1 as N
Dim g2 as N
Dim h as N
Dim oGrid as P
Dim r as N
Dim var_Column as P
Dim var_Column1 as P
Dim var_Column2 as P
Dim var_Columns as P
Dim var_ConditionalFormat as P
Dim var_ConditionalFormat1 as P
Dim var_ConditionalFormat2 as P
Dim var_ConditionalFormats as P
Dim var_Items as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.FreezeEvents(.t.)
oGrid.BeginUpdate()
oGrid.HeaderAppearance = 4
oGrid.HeaderHeight = 24
oGrid.LinesAtRoot = -1
var_ConditionalFormats = oGrid.ConditionalFormats
	var_ConditionalFormat = var_ConditionalFormats.Add("%CT1")
		var_ConditionalFormat.ForeColor = 8421504
		var_ConditionalFormat.ApplyTo = 1 '1 + 
	var_ConditionalFormat1 = var_ConditionalFormats.Add("%CT2")
		var_ConditionalFormat1.ForeColor = 8421504
		var_ConditionalFormat1.ApplyTo = 2 '2 + 
	var_ConditionalFormat2 = var_ConditionalFormats.Add("%CT3")
		var_ConditionalFormat2.ForeColor = 8421504
		var_ConditionalFormat2.ApplyTo = 3 '3 + 
var_Columns = oGrid.Columns
	var_Columns.Add("Description")
	var_Column = var_Columns.Add("Qty")
		var_Column.Editor.EditType = 4
		' var_Column.Def(20) = "sum(current,rec,%1)"
		oGrid.TemplateDef = "dim var_Column"
		oGrid.TemplateDef = var_Column
		oGrid.Template = "var_Column.Def(20) = `sum(current,rec,%1)`"

	var_Column1 = var_Columns.Add("Price")
		' var_Column1.Def(20) = "avg(current,rec,%2)"
		oGrid.TemplateDef = "dim var_Column1"
		oGrid.TemplateDef = var_Column1
		oGrid.Template = "var_Column1.Def(20) = `avg(current,rec,%2)`"

		var_Column1.Editor.EditType = 4
	var_Column2 = var_Columns.Add("Amount")
		var_Column2.ComputedField = "%1 * %2"
		' var_Column2.Def(20) = "sum(current,rec,%3)"
		oGrid.TemplateDef = "dim var_Column2"
		oGrid.TemplateDef = var_Column2
		oGrid.Template = "var_Column2.Def(20) = `sum(current,rec,%3)`"

var_Items = oGrid.Items
	r = var_Items.AddItem("Root")
	g1 = var_Items.InsertItem(r,,"Group 1")
	h = var_Items.InsertItem(g1,,"Item 1")
	' var_Items.CellValue(h,1) = 1
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellValue(h,1) = 1"

	' var_Items.CellValue(h,2) = 10
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellValue(h,2) = 10"

	h = var_Items.InsertItem(g1,,"Item 2")
	' var_Items.CellValue(h,1) = 2
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellValue(h,1) = 2"

	' var_Items.CellValue(h,2) = 11
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellValue(h,2) = 11"

	g2 = var_Items.InsertItem(r,,"Group 2")
	h = var_Items.InsertItem(g2,,"Item 1")
	' var_Items.CellValue(h,1) = 3
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellValue(h,1) = 3"

	' var_Items.CellValue(h,2) = 12
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellValue(h,2) = 12"

	h = var_Items.InsertItem(g2,,"Item 2")
	' var_Items.CellValue(h,1) = 4
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellValue(h,1) = 4"

	' var_Items.CellValue(h,2) = 13
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellValue(h,2) = 13"

	' var_Items.ExpandItem(0) = .t.
	oGrid.TemplateDef = "dim var_Items"
	oGrid.TemplateDef = var_Items
	oGrid.Template = "var_Items.ExpandItem(0) = True"

oGrid.EndUpdate()
oGrid.FreezeEvents(.f.)

1207
Highlight the leaf items

Dim h as N
Dim hR as N
Dim oGrid as P
Dim var_Column as local
Dim var_Columns as P
Dim var_ConditionalFormat as local
Dim var_Items as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.BeginUpdate()
' oGrid.ConditionalFormats.Add("%CC0=0").ForeColor = 8421504
var_ConditionalFormat = oGrid.ConditionalFormats.Add("%CC0=0")
oGrid.TemplateDef = "dim var_ConditionalFormat"
oGrid.TemplateDef = var_ConditionalFormat
oGrid.Template = "var_ConditionalFormat.ForeColor = 8421504"

oGrid.HeaderAppearance = 4
oGrid.HeaderHeight = 24
oGrid.LinesAtRoot = -1
var_Columns = oGrid.Columns
	' var_Columns.Add("Item").Width = 16
	var_Column = var_Columns.Add("Item")
	oGrid.TemplateDef = "dim var_Column"
	oGrid.TemplateDef = var_Column
	oGrid.Template = "var_Column.Width = 16"

	var_Columns.Add("Desc")
var_Items = oGrid.Items
	hR = var_Items.AddItem("Root")
	' var_Items.CellValue(hR,1) = "The root directory /"
	oGrid.TemplateDef = "dim var_Items,hR"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = hR
	oGrid.Template = "var_Items.CellValue(hR,1) = `The root directory /`"

	' var_Items.ExpandItem(hR) = .t.
	oGrid.TemplateDef = "dim var_Items,hR"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = hR
	oGrid.Template = "var_Items.ExpandItem(hR) = True"

	h = var_Items.InsertItem(hR,,"Home")
	' var_Items.CellValue(h,1) = "The home directory with user directories Alice and Bob"
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellValue(h,1) = `The home directory with user directories Alice and Bob`"

	var_Items.InsertItem(h,,"Alice")
	var_Items.InsertItem(h,,"Bob")
	' var_Items.ExpandItem(h) = .t.
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.ExpandItem(h) = True"

	h = var_Items.InsertItem(hR,,"Etc")
	' var_Items.CellValue(h,1) = "The etc directory with one configuration file"
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellValue(h,1) = `The etc directory with one configuration file`"

	h = var_Items.InsertItem(h,,"nginx.conf")
	' var_Items.CellValue(var_Items.InsertItem(hR,,"Var"),1) = "The var directory"
	oGrid.TemplateDef = "dim var_Items"
	oGrid.TemplateDef = var_Items
	oGrid.Template = "var_Items.CellValue(InsertItem(hR,,`Var`),1) = `The var directory`"

oGrid.EndUpdate()

1206
Highlight the parent items

Dim h as N
Dim hR as N
Dim oGrid as P
Dim var_Column as local
Dim var_Columns as P
Dim var_ConditionalFormat as local
Dim var_Items as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.BeginUpdate()
' oGrid.ConditionalFormats.Add("%CC0").ForeColor = 255
var_ConditionalFormat = oGrid.ConditionalFormats.Add("%CC0")
oGrid.TemplateDef = "dim var_ConditionalFormat"
oGrid.TemplateDef = var_ConditionalFormat
oGrid.Template = "var_ConditionalFormat.ForeColor = 255"

oGrid.HeaderAppearance = 4
oGrid.HeaderHeight = 24
oGrid.LinesAtRoot = -1
var_Columns = oGrid.Columns
	' var_Columns.Add("Item").Width = 16
	var_Column = var_Columns.Add("Item")
	oGrid.TemplateDef = "dim var_Column"
	oGrid.TemplateDef = var_Column
	oGrid.Template = "var_Column.Width = 16"

	var_Columns.Add("Desc")
var_Items = oGrid.Items
	hR = var_Items.AddItem("Root")
	' var_Items.CellValue(hR,1) = "The root directory /"
	oGrid.TemplateDef = "dim var_Items,hR"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = hR
	oGrid.Template = "var_Items.CellValue(hR,1) = `The root directory /`"

	' var_Items.ExpandItem(hR) = .t.
	oGrid.TemplateDef = "dim var_Items,hR"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = hR
	oGrid.Template = "var_Items.ExpandItem(hR) = True"

	h = var_Items.InsertItem(hR,,"Home")
	' var_Items.CellValue(h,1) = "The home directory with user directories Alice and Bob"
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellValue(h,1) = `The home directory with user directories Alice and Bob`"

	var_Items.InsertItem(h,,"Alice")
	var_Items.InsertItem(h,,"Bob")
	' var_Items.ExpandItem(h) = .t.
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.ExpandItem(h) = True"

	h = var_Items.InsertItem(hR,,"Etc")
	' var_Items.CellValue(h,1) = "The etc directory with one configuration file"
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellValue(h,1) = `The etc directory with one configuration file`"

	h = var_Items.InsertItem(h,,"nginx.conf")
	' var_Items.CellValue(var_Items.InsertItem(hR,,"Var"),1) = "The var directory"
	oGrid.TemplateDef = "dim var_Items"
	oGrid.TemplateDef = var_Items
	oGrid.Template = "var_Items.CellValue(InsertItem(hR,,`Var`),1) = `The var directory`"

oGrid.EndUpdate()

1205
Highlight the item being expanded or collapsed

Dim h as N
Dim hR as N
Dim oGrid as P
Dim var_Column as local
Dim var_Columns as P
Dim var_ConditionalFormat as local
Dim var_Items as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.BeginUpdate()
' oGrid.ConditionalFormats.Add("%CX0").Bold = .t.
var_ConditionalFormat = oGrid.ConditionalFormats.Add("%CX0")
oGrid.TemplateDef = "dim var_ConditionalFormat"
oGrid.TemplateDef = var_ConditionalFormat
oGrid.Template = "var_ConditionalFormat.Bold = True"

oGrid.HeaderAppearance = 4
oGrid.HeaderHeight = 24
oGrid.LinesAtRoot = -1
var_Columns = oGrid.Columns
	' var_Columns.Add("Item").Width = 16
	var_Column = var_Columns.Add("Item")
	oGrid.TemplateDef = "dim var_Column"
	oGrid.TemplateDef = var_Column
	oGrid.Template = "var_Column.Width = 16"

	var_Columns.Add("Desc")
var_Items = oGrid.Items
	hR = var_Items.AddItem("Root")
	' var_Items.CellValue(hR,1) = "The root directory /"
	oGrid.TemplateDef = "dim var_Items,hR"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = hR
	oGrid.Template = "var_Items.CellValue(hR,1) = `The root directory /`"

	' var_Items.ExpandItem(hR) = .t.
	oGrid.TemplateDef = "dim var_Items,hR"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = hR
	oGrid.Template = "var_Items.ExpandItem(hR) = True"

	h = var_Items.InsertItem(hR,,"Home")
	' var_Items.CellValue(h,1) = "The home directory with user directories Alice and Bob"
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellValue(h,1) = `The home directory with user directories Alice and Bob`"

	var_Items.InsertItem(h,,"Alice")
	var_Items.InsertItem(h,,"Bob")
	' var_Items.ExpandItem(h) = .t.
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.ExpandItem(h) = True"

	h = var_Items.InsertItem(hR,,"Etc")
	' var_Items.CellValue(h,1) = "The etc directory with one configuration file"
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellValue(h,1) = `The etc directory with one configuration file`"

	h = var_Items.InsertItem(h,,"nginx.conf")
	' var_Items.CellValue(var_Items.InsertItem(hR,,"Var"),1) = "The var directory"
	oGrid.TemplateDef = "dim var_Items"
	oGrid.TemplateDef = var_Items
	oGrid.Template = "var_Items.CellValue(InsertItem(hR,,`Var`),1) = `The var directory`"

oGrid.EndUpdate()

1204
I am using exTotalColumn. Is there an option to exclude specific cells to display the total

' Occurs when the user changes the cell's content.
function Change as v (Item  as  OLE::Exontrol.Grid.1::HITEM,ColIndex  as  N,NewValue  as  A)
	oGrid = topparent:CONTROL_ACTIVEX1.activex
	oGrid.Refresh()
end function

Dim g1 as N
Dim g2 as N
Dim h as N
Dim oGrid as P
Dim r as N
Dim var_Column as P
Dim var_Column1 as P
Dim var_Column2 as P
Dim var_Columns as P
Dim var_Items as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.FreezeEvents(.t.)
oGrid.BeginUpdate()
oGrid.HeaderAppearance = 4
oGrid.HeaderHeight = 24
oGrid.LinesAtRoot = -1
var_Columns = oGrid.Columns
	var_Columns.Add("Description")
	var_Column = var_Columns.Add("Qty")
		var_Column.Editor.EditType = 4
		' var_Column.Def(20) = "sum(current,rec,%1)"
		oGrid.TemplateDef = "dim var_Column"
		oGrid.TemplateDef = var_Column
		oGrid.Template = "var_Column.Def(20) = `sum(current,rec,%1)`"

	var_Column1 = var_Columns.Add("Price")
		' var_Column1.Def(20) = "avg(current,rec,%2)"
		oGrid.TemplateDef = "dim var_Column1"
		oGrid.TemplateDef = var_Column1
		oGrid.Template = "var_Column1.Def(20) = `avg(current,rec,%2)`"

		var_Column1.Editor.EditType = 4
	var_Column2 = var_Columns.Add("Amount")
		var_Column2.ComputedField = "%1 * %2"
		' var_Column2.Def(20) = "sum(current,rec,%3)"
		oGrid.TemplateDef = "dim var_Column2"
		oGrid.TemplateDef = var_Column2
		oGrid.Template = "var_Column2.Def(20) = `sum(current,rec,%3)`"

var_Items = oGrid.Items
	r = var_Items.AddItem("Root")
	g1 = var_Items.InsertItem(r,,"Group 1")
	' var_Items.FormatCell(g1,2) = "`<average missing>`"
	oGrid.TemplateDef = "dim var_Items,g1"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = g1
	oGrid.Template = "var_Items.FormatCell(g1,2) = ```<average missing>```"

	' var_Items.CellEditorVisible(g1,2) = .f.
	oGrid.TemplateDef = "dim var_Items,g1"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = g1
	oGrid.Template = "var_Items.CellEditorVisible(g1,2) = False"

	' var_Items.CellBold(g1,2) = .t.
	oGrid.TemplateDef = "dim var_Items,g1"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = g1
	oGrid.Template = "var_Items.CellBold(g1,2) = True"

	' var_Items.CellForeColor(g1,2) = 255
	oGrid.TemplateDef = "dim var_Items,g1"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = g1
	oGrid.Template = "var_Items.CellForeColor(g1,2) = 255"

	h = var_Items.InsertItem(g1,,"Item 1")
	' var_Items.CellValue(h,1) = 1
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellValue(h,1) = 1"

	' var_Items.CellValue(h,2) = 10
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellValue(h,2) = 10"

	h = var_Items.InsertItem(g1,,"Item 2")
	' var_Items.CellValue(h,1) = 2
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellValue(h,1) = 2"

	' var_Items.CellValue(h,2) = 11
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellValue(h,2) = 11"

	g2 = var_Items.InsertItem(r,,"Group 2")
	h = var_Items.InsertItem(g2,,"Item 1")
	' var_Items.CellValue(h,1) = 3
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellValue(h,1) = 3"

	' var_Items.CellValue(h,2) = 12
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellValue(h,2) = 12"

	h = var_Items.InsertItem(g2,,"Item 2")
	' var_Items.CellValue(h,1) = 4
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellValue(h,1) = 4"

	' var_Items.CellValue(h,2) = 13
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellValue(h,2) = 13"

	' var_Items.ExpandItem(0) = .t.
	oGrid.TemplateDef = "dim var_Items"
	oGrid.TemplateDef = var_Items
	oGrid.Template = "var_Items.ExpandItem(0) = True"

oGrid.EndUpdate()
oGrid.FreezeEvents(.f.)

1203
How can I add a total column

' Occurs when the user changes the cell's content.
function Change as v (Item  as  OLE::Exontrol.Grid.1::HITEM,ColIndex  as  N,NewValue  as  A)
	oGrid = topparent:CONTROL_ACTIVEX1.activex
	oGrid.Refresh()
end function

Dim g1 as N
Dim g2 as N
Dim h as N
Dim oGrid as P
Dim r as N
Dim var_Column as P
Dim var_Column1 as P
Dim var_Column2 as P
Dim var_Columns as P
Dim var_Items as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.FreezeEvents(.t.)
oGrid.BeginUpdate()
oGrid.HeaderAppearance = 4
oGrid.HeaderHeight = 24
oGrid.LinesAtRoot = -1
var_Columns = oGrid.Columns
	var_Columns.Add("Description")
	var_Column = var_Columns.Add("Qty")
		var_Column.Editor.EditType = 4
		' var_Column.Def(20) = "sum(current,rec,%1)"
		oGrid.TemplateDef = "dim var_Column"
		oGrid.TemplateDef = var_Column
		oGrid.Template = "var_Column.Def(20) = `sum(current,rec,%1)`"

	var_Column1 = var_Columns.Add("Price")
		' var_Column1.Def(20) = "avg(current,rec,%2)"
		oGrid.TemplateDef = "dim var_Column1"
		oGrid.TemplateDef = var_Column1
		oGrid.Template = "var_Column1.Def(20) = `avg(current,rec,%2)`"

		var_Column1.Editor.EditType = 4
	var_Column2 = var_Columns.Add("Amount")
		var_Column2.ComputedField = "%1 * %2"
		' var_Column2.Def(20) = "sum(current,rec,%3)"
		oGrid.TemplateDef = "dim var_Column2"
		oGrid.TemplateDef = var_Column2
		oGrid.Template = "var_Column2.Def(20) = `sum(current,rec,%3)`"

var_Items = oGrid.Items
	r = var_Items.AddItem("Root")
	g1 = var_Items.InsertItem(r,,"Group 1")
	h = var_Items.InsertItem(g1,,"Item 1")
	' var_Items.CellValue(h,1) = 1
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellValue(h,1) = 1"

	' var_Items.CellValue(h,2) = 10
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellValue(h,2) = 10"

	h = var_Items.InsertItem(g1,,"Item 2")
	' var_Items.CellValue(h,1) = 2
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellValue(h,1) = 2"

	' var_Items.CellValue(h,2) = 11
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellValue(h,2) = 11"

	g2 = var_Items.InsertItem(r,,"Group 2")
	h = var_Items.InsertItem(g2,,"Item 1")
	' var_Items.CellValue(h,1) = 3
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellValue(h,1) = 3"

	' var_Items.CellValue(h,2) = 12
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellValue(h,2) = 12"

	h = var_Items.InsertItem(g2,,"Item 2")
	' var_Items.CellValue(h,1) = 4
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellValue(h,1) = 4"

	' var_Items.CellValue(h,2) = 13
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellValue(h,2) = 13"

	' var_Items.ExpandItem(0) = .t.
	oGrid.TemplateDef = "dim var_Items"
	oGrid.TemplateDef = var_Items
	oGrid.Template = "var_Items.ExpandItem(0) = True"

oGrid.EndUpdate()
oGrid.FreezeEvents(.f.)

1202
Is it possible to disable sizing(size) the column
Dim oGrid as P
Dim var_Column as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.BeginUpdate()
oGrid.HeaderAppearance = 4
oGrid.DrawGridLines = 2
var_Column = oGrid.Columns.Add("32px")
	var_Column.Width = 32
	var_Column.AllowSizing = .f.
oGrid.Columns.Add("Rest")
oGrid.ColumnAutoResize = .t.
oGrid.EndUpdate()

1201
How can I add two columns of 25% and the third of 50%

Dim oGrid as P
Dim var_Column as local
Dim var_Column1 as local
Dim var_Column2 as local

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.BeginUpdate()
oGrid.HeaderAppearance = 4
oGrid.DrawGridLines = 2
' oGrid.Columns.Add("25%").Width = 25
var_Column = oGrid.Columns.Add("25%")
oGrid.TemplateDef = "dim var_Column"
oGrid.TemplateDef = var_Column
oGrid.Template = "var_Column.Width = 25"

' oGrid.Columns.Add("25%").Width = 25
var_Column1 = oGrid.Columns.Add("25%")
oGrid.TemplateDef = "dim var_Column1"
oGrid.TemplateDef = var_Column1
oGrid.Template = "var_Column1.Width = 25"

' oGrid.Columns.Add("50%").Width = 50
var_Column2 = oGrid.Columns.Add("50%")
oGrid.TemplateDef = "dim var_Column2"
oGrid.TemplateDef = var_Column2
oGrid.Template = "var_Column2.Width = 50"

oGrid.ColumnAutoResize = .t.
oGrid.EndUpdate()

1200
I add two columns but I see a third column

Dim oGrid as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.BeginUpdate()
oGrid.HeaderAppearance = 4
oGrid.DrawGridLines = 2
oGrid.Columns.Add("C1")
oGrid.Columns.Add("C2")
oGrid.ColumnAutoResize = .t.
oGrid.EndUpdate()

1199
I lose the hierarchy, all items are on the same 1st level, while I use PutItems

Dim oGrid as P
Dim var_Items as P
Dim var_Items1 as local

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.BeginUpdate()
oGrid.LinesAtRoot = -1
oGrid.Columns.Add("C1")
oGrid.Columns.Add("C2")
var_Items = oGrid.Items
	' var_Items.CellValue(var_Items.AddItem("Emily"),1) = "William"
	oGrid.TemplateDef = "dim var_Items"
	oGrid.TemplateDef = var_Items
	oGrid.Template = "var_Items.CellValue(AddItem(`Emily`),1) = `William`"

	' var_Items.CellValue(var_Items.AddItem("Sophia"),1) = "Alexander"
	oGrid.TemplateDef = "dim var_Items"
	oGrid.TemplateDef = var_Items
	oGrid.Template = "var_Items.CellValue(AddItem(`Sophia`),1) = `Alexander`"

oGrid.PutItems(oGrid.GetItems(""),oGrid.Items.ItemByIndex(0))
oGrid.PutItems(oGrid.GetItems(""),oGrid.Items.ItemByIndex(1))
oGrid.PutItems(oGrid.GetItems(""),oGrid.Items.ItemByIndex(6))
' oGrid.Items.ExpandItem(0) = .t.
var_Items1 = oGrid.Items
oGrid.TemplateDef = "dim var_Items1"
oGrid.TemplateDef = var_Items1
oGrid.Template = "var_Items1.ExpandItem(0) = True"

oGrid.EndUpdate()

1198
Column width set by code is ignored or it seems that does not work

Dim oGrid as P
Dim var_Column as local
Dim var_Column1 as local
Dim var_Column2 as local

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.BeginUpdate()
oGrid.ColumnAutoResize = .f.
oGrid.HeaderAppearance = 4
oGrid.DrawGridLines = 2
' oGrid.Columns.Add("C1").Width = 32
var_Column = oGrid.Columns.Add("C1")
oGrid.TemplateDef = "dim var_Column"
oGrid.TemplateDef = var_Column
oGrid.Template = "var_Column.Width = 32"

' oGrid.Columns.Add("C2").Width = 132
var_Column1 = oGrid.Columns.Add("C2")
oGrid.TemplateDef = "dim var_Column1"
oGrid.TemplateDef = var_Column1
oGrid.Template = "var_Column1.Width = 132"

' oGrid.Columns.Add("C3").Width = 264
var_Column2 = oGrid.Columns.Add("C3")
oGrid.TemplateDef = "dim var_Column2"
oGrid.TemplateDef = var_Column2
oGrid.Template = "var_Column2.Width = 264"

oGrid.EndUpdate()

1197
I want to display this computed value in a TextBox outside the grid and get it updated with any change of its value. How can this be done
' Occurs when the user changes the cell's content.
function Change as v (Item  as  OLE::Exontrol.Grid.1::HITEM,ColIndex  as  N,NewValue  as  A)
	Dim var_Items as P
	oGrid = topparent:CONTROL_ACTIVEX1.activex
	oGrid.Refresh()
	var_Items = oGrid.Items
		? "Total: " 
		? var_Items.CellCaption(var_Items.LockedItem(0,0),0) 
end function

Dim h as N
Dim oGrid as P
Dim var_Column as P
Dim var_Editor as P
Dim var_Items as P
Dim var_Items1 as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.BeginUpdate()
var_Column = oGrid.Columns.Add("Numbers")
	var_Editor = var_Column.Editor
		var_Editor.Numeric = -1
		var_Editor.EditType = 4
	var_Column.SortType = 1
var_Items = oGrid.Items
	' var_Items.LockedItemCount(0) = 1
	oGrid.TemplateDef = "dim var_Items"
	oGrid.TemplateDef = var_Items
	oGrid.Template = "var_Items.LockedItemCount(0) = 1"

	h = var_Items.LockedItem(0,0)
	' var_Items.ItemBackColor(h) = 15790320
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.ItemBackColor(h) = 15790320"

	' var_Items.CellValue(h,0) = "sum(all,dir,dbl(%0))"
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellValue(h,0) = `sum(all,dir,dbl(%0))`"

	' var_Items.CellValueFormat(h,0) = 4
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellValueFormat(h,0) = 4"

	' var_Items.CellHAlignment(h,0) = 2
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellHAlignment(h,0) = 2"

	' var_Items.FormatCell(h,0) = "'Total: '+value"
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.FormatCell(h,0) = `'Total: '+value`"

var_Items1 = oGrid.Items
	var_Items1.AddItem(10)
	var_Items1.AddItem(25)
	var_Items1.AddItem(31)
	var_Items1.AddItem(48)
oGrid.EndUpdate()

1196
Disable temporarily the column's sort, resize and drag and drop

Dim oGrid as P
Dim var_Column as local
Dim var_Column1 as local
Dim var_Editor as local

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.BeginUpdate()
oGrid.SortBarVisible = .t.
oGrid.SortBarCaption = "<fgcolor 808080><c>the header and the sort-bar are disabled (no drag and drop is allowed)"
oGrid.AllowGroupBy = .t.
oGrid.HeaderEnabled = .f.
oGrid.HeaderAppearance = 4
' oGrid.Columns.Add("Index").FormatColumn = "1 index ``"
var_Column = oGrid.Columns.Add("Index")
oGrid.TemplateDef = "dim var_Column"
oGrid.TemplateDef = var_Column
oGrid.Template = "var_Column.FormatColumn = `1 index `````"

' oGrid.Columns.Add("Pos").FormatColumn = "1 apos ``"
var_Column1 = oGrid.Columns.Add("Pos")
oGrid.TemplateDef = "dim var_Column1"
oGrid.TemplateDef = var_Column1
oGrid.Template = "var_Column1.FormatColumn = `1 apos `````"

' oGrid.Columns.Add("Edit").Editor.EditType = 1
var_Editor = oGrid.Columns.Add("Edit").Editor
oGrid.TemplateDef = "dim var_Editor"
oGrid.TemplateDef = var_Editor
oGrid.Template = "var_Editor.EditType = 1"

oGrid.GridLineStyle = 512
oGrid.DrawGridLines = 2
oGrid.GridLineColor = 14737632
oGrid.EndUpdate()

1195
I wonder if it’s possible to highlight/select a column like Excel
' Fired after the user clicks on column's header.
function ColumnClick as v (Column  as  OLE::Exontrol.Grid.1::IColumn)
	' Column.Selected = True
	' FocusColumnIndex = Column.Index
	oGrid = topparent:CONTROL_ACTIVEX1.activex
	oGrid.Columns.Item(0).Selected = .f.
	oGrid.Columns.Item(1).Selected = .f.
	oGrid.Columns.Item(2).Selected = .f.
	oGrid.Items.SelectAll()
end function

Dim oGrid as P
Dim var_Items as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.BeginUpdate()
oGrid.Template = "Background(32) = -1" // oGrid.Background(32) = -1
oGrid.HeaderAppearance = 4
oGrid.MarkSearchColumn = .f.
oGrid.SingleSel = .f.
oGrid.FullRowSelect = 1
oGrid.SortOnClick = 0
oGrid.Columns.Add("Column1")
oGrid.Columns.Add("Column2")
oGrid.Columns.Add("Column3")
var_Items = oGrid.Items
	var_Items.DefaultItem = var_Items.AddItem(0)
	' var_Items.CellValue(0,1) = 1
	oGrid.TemplateDef = "dim var_Items"
	oGrid.TemplateDef = var_Items
	oGrid.Template = "var_Items.CellValue(0,1) = 1"

	' var_Items.CellValue(0,2) = 2
	oGrid.TemplateDef = "dim var_Items"
	oGrid.TemplateDef = var_Items
	oGrid.Template = "var_Items.CellValue(0,2) = 2"

	var_Items.DefaultItem = var_Items.AddItem(3)
	' var_Items.CellValue(0,1) = 4
	oGrid.TemplateDef = "dim var_Items"
	oGrid.TemplateDef = var_Items
	oGrid.Template = "var_Items.CellValue(0,1) = 4"

	' var_Items.CellValue(0,2) = 5
	oGrid.TemplateDef = "dim var_Items"
	oGrid.TemplateDef = var_Items
	oGrid.Template = "var_Items.CellValue(0,2) = 5"

	var_Items.DefaultItem = var_Items.AddItem(6)
	' var_Items.CellValue(0,1) = 7
	oGrid.TemplateDef = "dim var_Items"
	oGrid.TemplateDef = var_Items
	oGrid.Template = "var_Items.CellValue(0,1) = 7"

	' var_Items.CellValue(0,2) = 8
	oGrid.TemplateDef = "dim var_Items"
	oGrid.TemplateDef = var_Items
	oGrid.Template = "var_Items.CellValue(0,2) = 8"

oGrid.EndUpdate()

1194
Is it possible to change the color of the border

Dim oGrid as P
Dim var_Items as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.BeginUpdate()
oGrid.VisualAppearance.Add(1,"gBFLBCJwBAEHhEJAAEhABc8IQAAYAQGKIcBiAKBQAGaAoDDMMwyQwAAxDMK8EwsACEIrjKCRShyCYZRhGcTALBIBQSHAZZKgOJIRDENg2SANACRfIUaw1DqBZwkGZoWhGKgAShIEDwSKkQBlECeJpnKaqIomJYnDLQUw0NL9HQ3JaaKqnWLBVCWEQyVzEIyjBT0EzHMqtKrjaA6NpaP4oT7LEIydKFCRJNi0bSnGqaOj6UJSURRVq3TTFcTyAC3ahuOo4cpXB4SWrOd41fYNOTQACzbCsSIcPxCe6GXjiNwjPKMWhnIq+M5wXIrJyKCYUaTcejzfgdU5XWqeMoyewMXxmZqbXw/fBYRrEL5vTqNXTzSA4BEB")
oGrid.Appearance = 16842496 '100ff00 + 
oGrid.ColumnAutoResize = .t.
oGrid.HeaderAppearance = 4
oGrid.TreeColumnIndex = -1
oGrid.DrawGridLines = -1
oGrid.GridLineStyle = 512
oGrid.Columns.Add("Default")
var_Items = oGrid.Items
	var_Items.AddItem("before item")
	var_Items.AddItem("item")
	var_Items.AddItem("after item")
oGrid.EndUpdate()

1193
Expandable-caption

' Occurs when an anchor element is clicked.
function AnchorClick as v (AnchorID  as  C,Options  as  C)
	oGrid = topparent:CONTROL_ACTIVEX1.activex
	? AnchorID 
end function

Dim h as N
Dim oGrid as P
Dim var_Items as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.BeginUpdate()
oGrid.ColumnAutoResize = .t.
oGrid.TreeColumnIndex = -1
oGrid.DrawGridLines = -1
oGrid.GridLineStyle = 512
oGrid.BackColorAlternate = 15790320
oGrid.ShowFocusRect = .f.
oGrid.Columns.Add("Default")
var_Items = oGrid.Items
	var_Items.AddItem("before item")
	h = var_Items.AddItem("<solidline> <c><b>Bank Account</b></solidline><br>+ owner: String <r><a 1;e64=gA8ABzABvABsABpABkg8JABuABlAA+AAgAECMcTi4AMwAM4AjMGhEGOUVAA4AAwk8plcqihwAElg0wiUlOkOiUEgQvgcFhsKhkIhUQiUUnccj0gn0jmMagUlowAMNOpEfkMNkkmlEqrctjQmAAjAA5AA2sssHcbnkdq1Ln1QtVSjQAAEBA==>▲</a><br><solidline>+ balance: Currency = 0</solidline><br>+ deposit(amount: Currency)<r><a 2;e64=gA8ABjAA+AECMwAM8DABvABshoAOQAEAAHAAGEWjEajMGNoAMoAOgANERMgAOcHAAvAEJhcEh0Qh0Tg0CmkqMMFlUuhkxiMTisXjNCjk6EwAEYAHIAG1MjY7lUsnkwh8/nUClk5gwAAEBA==>▲</a><br>+ withdraw(amount: Currency)")
	' var_Items.CellValueFormat(h,0) = 1
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellValueFormat(h,0) = 1"

	' var_Items.CellSingleLine(h,0) = .f.
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellSingleLine(h,0) = False"

	var_Items.AddItem("after item")
oGrid.EndUpdate()

1192
Expandable-caption

Dim h as N
Dim oGrid as P
Dim var_Items as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.BeginUpdate()
oGrid.ColumnAutoResize = .t.
oGrid.TreeColumnIndex = -1
oGrid.DrawGridLines = -1
oGrid.GridLineStyle = 512
oGrid.BackColorAlternate = 15790320
oGrid.ShowFocusRect = .f.
oGrid.Columns.Add("Default")
var_Items = oGrid.Items
	var_Items.AddItem("before item")
	h = var_Items.AddItem("<solidline><b>Header</b></solidline><br>Line1<r><a ;exp=show lines>+</a><br>Line2<br>Line3")
	' var_Items.CellValueFormat(h,0) = 1
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellValueFormat(h,0) = 1"

	' var_Items.CellSingleLine(h,0) = .f.
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellSingleLine(h,0) = False"

	var_Items.AddItem("after item")
oGrid.EndUpdate()

1191
Force hover-all feature
Dim oGrid as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.Template = "Background(500) = -1" // oGrid.Background(500) = -1

1190
Disable hover-all feature (Windows 11 or greater)
Dim oGrid as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.Template = "Background(500) = 1" // oGrid.Background(500) = 1

1189
Display a custom tooltip
' Occurs when the user moves the mouse.
function MouseMove as v (Button  as  N,Shift  as  N,X  as  OLE::Exontrol.Grid.1::OLE_XPOS_PIXELS,Y  as  OLE::Exontrol.Grid.1::OLE_YPOS_PIXELS)
	oGrid = topparent:CONTROL_ACTIVEX1.activex
	oGrid.ShowToolTip("new content","",,"+8","+8")
end function

Dim oGrid as P

oGrid = topparent:CONTROL_ACTIVEX1.activex

1188
Shows the tooltip of the object moved relative to its default position
' Occurs when the user moves the mouse.
function MouseMove as v (Button  as  N,Shift  as  N,X  as  OLE::Exontrol.Grid.1::OLE_XPOS_PIXELS,Y  as  OLE::Exontrol.Grid.1::OLE_YPOS_PIXELS)
	oGrid = topparent:CONTROL_ACTIVEX1.activex
	oGrid.ShowToolTip("<null>","<null>",,"+8","+8")
end function

Dim oGrid as P
Dim var_Column as local

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.ColumnAutoResize = .f.
' oGrid.Columns.Add("tootip").ToolTip = "this is a tooltip assigned to a column"
var_Column = oGrid.Columns.Add("tootip")
oGrid.TemplateDef = "dim var_Column"
oGrid.TemplateDef = var_Column
oGrid.Template = "var_Column.ToolTip = `this is a tooltip assigned to a column`"


1187
Delete all records
' Occurs when user clicks on the cell's button.
function ButtonClick as v (Item  as  OLE::Exontrol.Grid.1::HITEM,ColIndex  as  N,Key  as  A)
	Dim cmd as P
	oGrid = topparent:CONTROL_ACTIVEX1.activex
	cmd = OLE.Create("ADODB.Command")
		cmd.ActiveConnection = oGrid.DataSource.ActiveConnection
		cmd.CommandText = "Delete * from ORDERS"
		cmd.CommandType = 1
		cmd.Execute()
	oGrid.DataSource.Requery()
end function

' Fired when an internal error occurs.
function Error as v (Error  as  N,Description  as  C)
	oGrid = topparent:CONTROL_ACTIVEX1.activex
	? Description 
end function

Dim h as N
Dim oGrid as P
Dim rs as P
Dim var_ConditionalFormat as local
Dim var_Items as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.BeginUpdate()
oGrid.HeaderAppearance = 4
oGrid.ColumnAutoResize = .f.
rs = OLE.Create("ADODB.Recordset")
	rs.Open("Select * From Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExGrid\Sample\Access\misc.accdb",1,3)
oGrid.DataSource = rs
' oGrid.ConditionalFormats.Add("%1=12345").BackColor = 15790320
var_ConditionalFormat = oGrid.ConditionalFormats.Add("%1=12345")
oGrid.TemplateDef = "dim var_ConditionalFormat"
oGrid.TemplateDef = var_ConditionalFormat
oGrid.Template = "var_ConditionalFormat.BackColor = 15790320"

var_Items = oGrid.Items
	' var_Items.LockedItemCount(0) = 1
	oGrid.TemplateDef = "dim var_Items"
	oGrid.TemplateDef = var_Items
	oGrid.Template = "var_Items.LockedItemCount(0) = 1"

	h = var_Items.LockedItem(0,0)
	' var_Items.ItemDivider(h) = 0
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.ItemDivider(h) = 0"

	' var_Items.CellHasButton(h,0) = .t.
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellHasButton(h,0) = True"

	' var_Items.CellValue(h,0) = "Requery (delete all records, using ADODB.Command)"
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellValue(h,0) = `Requery (delete all records, using ADODB.Command)`"

	' var_Items.CellHAlignment(h,0) = 1
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellHAlignment(h,0) = 1"

oGrid.EndUpdate()

1186
How can I get a cell that shows the sum of a column of minutes in hours + minutes format

Dim h as N
Dim oGrid as P
Dim var_Column as P
Dim var_Editor as P
Dim var_Items as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.BeginUpdate()
oGrid.HeaderAppearance = 4
var_Column = oGrid.Columns.Add("Minutes")
	var_Column.SortType = 1
	var_Editor = var_Column.Editor
		var_Editor.EditType = 1
		var_Editor.Numeric = -1
var_Items = oGrid.Items
	var_Items.AddItem(10)
	var_Items.AddItem(20)
	var_Items.AddItem(30)
	var_Items.AddItem(40)
	var_Items.AddItem(50)
	h = var_Items.AddItem("sum(all,dir,dbl(%0))")
	' var_Items.SelectableItem(h) = .f.
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.SelectableItem(h) = False"

	' var_Items.SortableItem(h) = .f.
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.SortableItem(h) = False"

	' var_Items.CellValueFormat(h,0) = 5 'exTotalField + exHTML
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellValueFormat(h,0) = 5"

	' var_Items.CellHAlignment(h,0) = 2
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellHAlignment(h,0) = 2"

	' var_Items.FormatCell(h,0) = "'<b>HH:NN</b>: '+ (int(value/60) lpad '00') + ':' + ((value mod 60) lpad '00')"
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.FormatCell(h,0) = `'<b>HH:NN</b>: '+ (int(value/60) lpad '00') + ':' + ((value mod 60) lpad '00')`"

oGrid.EndUpdate()

1185
Highlight the match once the filter is applied

' Occurs when filter was changed.
function FilterChange as v ()
	Dim format as 
	oGrid = topparent:CONTROL_ACTIVEX1.activex
	format = oGrid.FormatABC("`lower(value) replace lower('` + value + `') with '<bgcolor 000000><fgcolor FFFFFF>` + value  + `</fgcolor></bgcolor>'`",oGrid.FilterBarPromptPattern)
	oGrid.Columns.Item(0).FormatColumn = format
	oGrid.Columns.Item(1).FormatColumn = format
	oGrid.Columns.Item(2).FormatColumn = format
end function

Dim h0 as N
Dim oGrid as P
Dim var_Column as P
Dim var_Column1 as P
Dim var_Column2 as P
Dim var_Columns as P
Dim var_Items as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.BeginUpdate()
oGrid.SelBackColor = oGrid.BackColor
oGrid.SelForeColor = oGrid.ForeColor
oGrid.ColumnAutoResize = .t.
oGrid.ContinueColumnScroll = .f.
oGrid.MarkSearchColumn = .f.
oGrid.SearchColumnIndex = 1
oGrid.HeaderAppearance = 4
oGrid.HeaderHeight = 23
oGrid.BackColorLevelHeader = oGrid.BackColor
oGrid.FilterBarCaption = "`<b>` + value + `</b><r><fgcolor=808080>` + ( matchitemcount < 0 ? abs(matchitemcount + 1) + ` result(s)` : ``)"
oGrid.FilterBarPromptVisible = 2055 'exFilterBarCompact + exFilterBarCaptionVisible + exFilterBarVisible + exFilterBarPromptVisible
oGrid.FilterBarBackColor = oGrid.BackColor
oGrid.FilterBarPromptPattern = "and"
var_Columns = oGrid.Columns
	var_Column = var_Columns.Add("Name")
		' var_Column.Def(17) = 1
		oGrid.TemplateDef = "dim var_Column"
		oGrid.TemplateDef = var_Column
		oGrid.Template = "var_Column.Def(17) = 1"

		var_Column.FormatColumn = "lower(value)"
	var_Column1 = var_Columns.Add("Title")
		' var_Column1.Def(17) = 1
		oGrid.TemplateDef = "dim var_Column1"
		oGrid.TemplateDef = var_Column1
		oGrid.Template = "var_Column1.Def(17) = 1"

		var_Column1.FormatColumn = "lower(value)"
	var_Column2 = var_Columns.Add("City")
		' var_Column2.Def(17) = 1
		oGrid.TemplateDef = "dim var_Column2"
		oGrid.TemplateDef = var_Column2
		oGrid.Template = "var_Column2.Def(17) = 1"

		var_Column2.FormatColumn = "lower(value)"
var_Items = oGrid.Items
	h0 = var_Items.AddItem("Nancy Davolio")
	' var_Items.CellValue(h0,1) = "Sales Representative"
	oGrid.TemplateDef = "dim var_Items,h0"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h0
	oGrid.Template = "var_Items.CellValue(h0,1) = `Sales Representative`"

	' var_Items.CellValue(h0,2) = "Seattle"
	oGrid.TemplateDef = "dim var_Items,h0"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h0
	oGrid.Template = "var_Items.CellValue(h0,2) = `Seattle`"

	h0 = var_Items.AddItem("Andrew Fuller")
	' var_Items.CellValue(h0,1) = "Vice President, Sales"
	oGrid.TemplateDef = "dim var_Items,h0"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h0
	oGrid.Template = "var_Items.CellValue(h0,1) = `Vice President, Sales`"

	' var_Items.CellValue(h0,2) = "Tacoma"
	oGrid.TemplateDef = "dim var_Items,h0"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h0
	oGrid.Template = "var_Items.CellValue(h0,2) = `Tacoma`"

	' var_Items.SelectItem(h0) = .t.
	oGrid.TemplateDef = "dim var_Items,h0"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h0
	oGrid.Template = "var_Items.SelectItem(h0) = 1"

	h0 = var_Items.AddItem("Janet Leverling")
	' var_Items.CellValue(h0,1) = "Sales Representative"
	oGrid.TemplateDef = "dim var_Items,h0"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h0
	oGrid.Template = "var_Items.CellValue(h0,1) = `Sales Representative`"

	' var_Items.CellValue(h0,2) = "Kirkland"
	oGrid.TemplateDef = "dim var_Items,h0"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h0
	oGrid.Template = "var_Items.CellValue(h0,2) = `Kirkland`"

	h0 = var_Items.AddItem("Margaret Peacock")
	' var_Items.CellValue(h0,1) = "Sales Representative"
	oGrid.TemplateDef = "dim var_Items,h0"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h0
	oGrid.Template = "var_Items.CellValue(h0,1) = `Sales Representative`"

	' var_Items.CellValue(h0,2) = "Redmond"
	oGrid.TemplateDef = "dim var_Items,h0"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h0
	oGrid.Template = "var_Items.CellValue(h0,2) = `Redmond`"

	h0 = var_Items.AddItem("Steven Buchanan")
	' var_Items.CellValue(h0,1) = "Sales Manager"
	oGrid.TemplateDef = "dim var_Items,h0"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h0
	oGrid.Template = "var_Items.CellValue(h0,1) = `Sales Manager`"

	' var_Items.CellValue(h0,2) = "London"
	oGrid.TemplateDef = "dim var_Items,h0"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h0
	oGrid.Template = "var_Items.CellValue(h0,2) = `London`"

	h0 = var_Items.AddItem("Michael Suyama")
	' var_Items.CellValue(h0,1) = "Sales Representative"
	oGrid.TemplateDef = "dim var_Items,h0"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h0
	oGrid.Template = "var_Items.CellValue(h0,1) = `Sales Representative`"

	' var_Items.CellValue(h0,2) = "London"
	oGrid.TemplateDef = "dim var_Items,h0"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h0
	oGrid.Template = "var_Items.CellValue(h0,2) = `London`"

	h0 = var_Items.AddItem("Robert King")
	' var_Items.CellValue(h0,1) = "Sales Representative"
	oGrid.TemplateDef = "dim var_Items,h0"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h0
	oGrid.Template = "var_Items.CellValue(h0,1) = `Sales Representative`"

	' var_Items.CellValue(h0,2) = "London"
	oGrid.TemplateDef = "dim var_Items,h0"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h0
	oGrid.Template = "var_Items.CellValue(h0,2) = `London`"

	h0 = var_Items.AddItem("Laura Callahan")
	' var_Items.CellValue(h0,1) = "Inside Sales Coordinator"
	oGrid.TemplateDef = "dim var_Items,h0"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h0
	oGrid.Template = "var_Items.CellValue(h0,1) = `Inside Sales Coordinator`"

	' var_Items.CellValue(h0,2) = "Seattle"
	oGrid.TemplateDef = "dim var_Items,h0"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h0
	oGrid.Template = "var_Items.CellValue(h0,2) = `Seattle`"

	h0 = var_Items.AddItem("Anne Dodsworth")
	' var_Items.CellValue(h0,1) = "Sales Representative"
	oGrid.TemplateDef = "dim var_Items,h0"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h0
	oGrid.Template = "var_Items.CellValue(h0,1) = `Sales Representative`"

	' var_Items.CellValue(h0,2) = "London"
	oGrid.TemplateDef = "dim var_Items,h0"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h0
	oGrid.Template = "var_Items.CellValue(h0,2) = `London`"

oGrid.EndUpdate()

1184
The count of filtered items includes the group-parents. How can I exclude them from count

Dim oGrid as P
Dim var_Items as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.BeginUpdate()
oGrid.DrawGridLines = 2
oGrid.HeaderAppearance = 1
oGrid.HeaderHeight = 24
oGrid.SortBarHeight = 28
oGrid.SortBarVisible = .t.
oGrid.AllowGroupBy = .t.
oGrid.Columns.Add("Col 1")
oGrid.Columns.Add("Col 2")
var_Items = oGrid.Items
	' var_Items.CellValue(var_Items.AddItem("219 Smith"),1) = "Ignacio 1234"
	oGrid.TemplateDef = "dim var_Items"
	oGrid.TemplateDef = var_Items
	oGrid.Template = "var_Items.CellValue(AddItem(`219 Smith`),1) = `Ignacio 1234`"

	' var_Items.CellValue(var_Items.AddItem("1666 County Road 309A"),1) = "897 Manassa"
	oGrid.TemplateDef = "dim var_Items"
	oGrid.TemplateDef = var_Items
	oGrid.Template = "var_Items.CellValue(AddItem(`1666 County Road 309A`),1) = `897 Manassa`"

	' var_Items.CellValue(var_Items.AddItem("38 Lone Pine"),1) = "Durango 11"
	oGrid.TemplateDef = "dim var_Items"
	oGrid.TemplateDef = var_Items
	oGrid.Template = "var_Items.CellValue(AddItem(`38 Lone Pine`),1) = `Durango 11`"

	' var_Items.CellValue(var_Items.AddItem("612 Jachim Street"),1) = "Lamar 222"
	oGrid.TemplateDef = "dim var_Items"
	oGrid.TemplateDef = var_Items
	oGrid.Template = "var_Items.CellValue(AddItem(`612 Jachim Street`),1) = `Lamar 222`"

oGrid.Layout = "MultipleSort=\"C1:1\""
oGrid.FilterBarCaption = "`<b>` + value + `</b><r><fgcolor=808080>` + ( matchitemcount < 0 ? leafitemcount + ` result(s)` : ``)"
oGrid.FilterBarPromptVisible = 2055 'exFilterBarCompact + exFilterBarCaptionVisible + exFilterBarVisible + exFilterBarPromptVisible
oGrid.FilterBarPromptType = 257 'exFilterPromptCaseSensitive + exFilterPromptContainsAll
oGrid.FilterBarPromptPattern = "12"
oGrid.FilterBarBackColor = oGrid.BackColor
oGrid.EndUpdate()

1183
Is it possible to display the count of filtered items

Dim oGrid as P
Dim var_Items as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.BeginUpdate()
oGrid.DrawGridLines = 2
oGrid.HeaderAppearance = 4
oGrid.HeaderHeight = 24
oGrid.Columns.Add("Col 1")
oGrid.Columns.Add("Col 2")
var_Items = oGrid.Items
	' var_Items.CellValue(var_Items.AddItem("219 Smith"),1) = "Ignacio 1234"
	oGrid.TemplateDef = "dim var_Items"
	oGrid.TemplateDef = var_Items
	oGrid.Template = "var_Items.CellValue(AddItem(`219 Smith`),1) = `Ignacio 1234`"

	' var_Items.CellValue(var_Items.AddItem("1666 County Road 309A"),1) = "897 Manassa"
	oGrid.TemplateDef = "dim var_Items"
	oGrid.TemplateDef = var_Items
	oGrid.Template = "var_Items.CellValue(AddItem(`1666 County Road 309A`),1) = `897 Manassa`"

	' var_Items.CellValue(var_Items.AddItem("38 Lone Pine"),1) = "Durango 11"
	oGrid.TemplateDef = "dim var_Items"
	oGrid.TemplateDef = var_Items
	oGrid.Template = "var_Items.CellValue(AddItem(`38 Lone Pine`),1) = `Durango 11`"

	' var_Items.CellValue(var_Items.AddItem("612 Jachim Street"),1) = "Lamar 222"
	oGrid.TemplateDef = "dim var_Items"
	oGrid.TemplateDef = var_Items
	oGrid.Template = "var_Items.CellValue(AddItem(`612 Jachim Street`),1) = `Lamar 222`"

oGrid.FilterBarCaption = "`<b>` + value + `</b><r><fgcolor=808080>` + ( matchitemcount < 0 ? abs(matchitemcount + 1) + ` result(s)` : ``)"
oGrid.FilterBarPromptVisible = 2055 'exFilterBarCompact + exFilterBarCaptionVisible + exFilterBarVisible + exFilterBarPromptVisible
oGrid.FilterBarPromptType = 257 'exFilterPromptCaseSensitive + exFilterPromptContainsAll
oGrid.FilterBarPromptPattern = "12"
oGrid.FilterBarBackColor = oGrid.BackColor
oGrid.EndUpdate()

1182
GroupBy code

Dim oGrid as P
Dim rs as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.BeginUpdate()
oGrid.ColumnAutoResize = .f.
oGrid.ContinueColumnScroll = .f.
oGrid.CountLockedColumns = 1
oGrid.BackColorLock = 16316664
oGrid.HasLines = 1
oGrid.LinesAtRoot = 5
rs = OLE.Create("ADOR.Recordset")
	rs.Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExGrid\Sample\Access\misc.accdb",3,3)
oGrid.DataSource = rs
oGrid.SortBarVisible = .t.
oGrid.SingleSort = .f.
oGrid.AllowGroupBy = .t.
oGrid.Columns.Item(0).Width = 128
oGrid.Layout = "MultipleSort = \"C12:1 C1:2\""
oGrid.EndUpdate()

1181
ADOR, MDB (JET)
Dim oGrid as P
Dim rs as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.BeginUpdate()
oGrid.ColumnAutoResize = .f.
rs = OLE.Create("ADOR.Recordset")
	rs.Open("Orders","Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Program Files\Exontrol\ExGrid\Sample\Access\misc.mdb",3,3)
oGrid.DataSource = rs
oGrid.EndUpdate()

1180
Editors (ImageSize = 32)

Dim h as N
Dim oGrid as P
Dim var_Appearance as P
Dim var_Column as local
Dim var_Editor as local
Dim var_Editor1 as local
Dim var_Editor10 as P
Dim var_Editor11 as P
Dim var_Editor12 as local
Dim var_Editor13 as local
Dim var_Editor14 as local
Dim var_Editor15 as local
Dim var_Editor16 as P
Dim var_Editor17 as local
Dim var_Editor18 as P
Dim var_Editor19 as P
Dim var_Editor2 as P
Dim var_Editor20 as local
Dim var_Editor21 as local
Dim var_Editor22 as P
Dim var_Editor23 as P
Dim var_Editor24 as local
Dim var_Editor3 as P
Dim var_Editor4 as P
Dim var_Editor5 as P
Dim var_Editor6 as P
Dim var_Editor7 as local
Dim var_Editor8 as local
Dim var_Editor9 as P
Dim var_Items as P
Dim var_Object as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.BeginUpdate()
oGrid.ImageSize = 32
oGrid.DefaultItemHeight = 36
oGrid.HeaderHeight = oGrid.DefaultItemHeight
oGrid.SortBarHeight = oGrid.DefaultItemHeight
oGrid.Font.Size = 16
oGrid.FilterBarFont.Size = oGrid.Font.Size
oGrid.ToolTipFont.Size = oGrid.Font.Size
oGrid.Indent = 26
oGrid.Images("gBJJgBAIDAAEg4AEEKAD/hz/EMNh8TIRNGwAjEZAEXjAojKAjMLjABhkaABAk0plUrlktl0vmExmUzmk1m03nE5nU7nk9miAoE+oVDolFo1HpFJpU5h8Sf9OqFNqUOqNUqdPq9VrFWrlbr1QpdhAFAkFis1ntFptVrtkrpszrNvmVxqk3uVtm1kmF3sdBvF/wGBmV+j9BYGHwWJulfxdax2NyFdx2JlV6l9Nw7AAGZymdz2Cy2GxErvWcz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GZ1QTGID2XaYaxWK4oZjsVSc4KDHbETbHFi9Fo3NaaxGisew+GYc4HlCR5NAAAIIEkQJSGMOgdE4RhYDwJJsAaAYQgmPpolCWgSCiBJzjcEIAkQXIBm8d5UhOQgCDUIBDDJDhgggJgKgKYJIDSVoDk8KBFF4OohEMZgWDsYYDj4GoGmGSB2B6B5iAiBgYDsYRjGSbIJo4RgqDuIpIAoLoLmMCJGDKDJjJiLA7xqUAAgGTwYnYPoPmQCQGEKEJkEkFg9gGY44BoRoSmSSQ2EKEggHgRhShSZRJFYVoVmWCRmFKFAgGOTheheZgJgYYoYmYSYWGaF4lkMMJ0hqZpJjYbobmcCZGHKHJmjmJh0h2Z4JmYcIaE8WZ2H6H5oAoBoCiCaBKBYfdjGoJoKiKaJKDaDojmkChGgmIgpCoVoWiWaJZiSd4mmmSh2h6J5qAqBoiiiaY5iSeIpmqComiqKpqkqNouiuah6hqMIsmsSpWiuGhP1kOoumuSp2j6L5sAsBo54gKwWkaMZsgsJpKjKbJLDaRYxYWRpSjSbIZiSe41m2CxmlqNptksdpejebR5iSfI4m4S4W16boLiaao6m5fJ9jubwLkaco8m8S5WnaPZunuOp4j6b5Lnac4SA0PAGlgP4wEwFwGkGcIMCcCpCnCCxiA8NYAAmMJfkSbhFCcFpFnGDBnBqRpUhuEwTDeZ5lHCfw6HIQxLCaAxygyJwqgGcATE4FA6hWY4tjEAAQBAgIA==")
oGrid.BackColorHeader = 80135878
oGrid.SelBackColor = 67108864
oGrid.SelForeColor = 65536
oGrid.ShowFocusRect = .f.
oGrid.Template = "CheckImage(0) = 16777216" // oGrid.CheckImage(0) = 16777216
oGrid.Template = "CheckImage(1) = 33554432" // oGrid.CheckImage(1) = 33554432
oGrid.Template = "CheckImage(2) = 50331648" // oGrid.CheckImage(2) = 50331648
' oGrid.Columns.Add("Editors").Def(17) = 1
var_Column = oGrid.Columns.Add("Editors")
oGrid.TemplateDef = "dim var_Column"
oGrid.TemplateDef = var_Column
oGrid.Template = "var_Column.Def(17) = 1"

var_Items = oGrid.Items
	' var_Items.CellEditor(var_Items.AddItem("(ReadOnly)"),0).EditType = 0
	var_Editor = var_Items.CellEditor(var_Items.AddItem("(ReadOnly)"),0)
	oGrid.TemplateDef = "dim var_Editor"
	oGrid.TemplateDef = var_Editor
	oGrid.Template = "var_Editor.EditType = 0"

	' var_Items.CellEditor(var_Items.AddItem("(EditType)"),0).EditType = 1
	var_Editor1 = var_Items.CellEditor(var_Items.AddItem("(EditType)"),0)
	oGrid.TemplateDef = "dim var_Editor1"
	oGrid.TemplateDef = var_Editor1
	oGrid.Template = "var_Editor1.EditType = 1"

	h = var_Items.AddItem("Value 1")
	var_Editor2 = var_Items.CellEditor(h,0)
		var_Editor2.EditType = 2
		var_Editor2.AddItem(1,"Value 1",1)
		var_Editor2.AddItem(2,"Value 2",2)
		var_Editor2.AddItem(3,"Value 3",3)
	' var_Items.FormatCell(h,0) = "value + ' (DropDownType)'"
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.FormatCell(h,0) = `value + ' (DropDownType)'`"

	h = var_Items.AddItem(1)
	var_Editor3 = var_Items.CellEditor(h,0)
		var_Editor3.EditType = 3
		var_Editor3.DropDownAutoWidth = 0
		var_Editor3.AddItem(1,"Nancy Davolio",1)
		var_Editor3.AddItem(2,"Andrew Fuller",2)
		var_Editor3.AddItem(3,"Janet Leverling",3)
		var_Editor3.AddItem(4,"Peacock Margaret",3)
		var_Editor3.AddItem(5,"Steven Buchanan",2)
		var_Editor3.AddItem(6,"Michael Suyama",1)
		var_Editor3.AddItem(7,"Robert King",2)
		var_Editor3.AddItem(8,"Laura Callahan",3)
		var_Editor3.AddItem(9,"Anne Dodsworth",2)
	' var_Items.FormatCell(h,0) = "value + ' (DropDownList - single column list)'"
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.FormatCell(h,0) = `value + ' (DropDownList - single column list)'`"

	h = var_Items.AddItem(1)
	var_Editor4 = var_Items.CellEditor(h,0)
		var_Editor4.EditType = 3
		var_Editor4.DropDownAutoWidth = 0
		var_Editor4.AddItem(1,"Nancy Davolio",1)
		var_Editor4.AddItem(2,"Andrew Fuller",2)
		var_Editor4.InsertItem(3,"Janet Leverling",3,2)
		var_Editor4.InsertItem(4,"Peacock Margaret",3,2)
		var_Editor4.InsertItem(5,"Steven Buchanan",2,2)
		var_Editor4.InsertItem(6,"Michael Suyama",1,5)
		var_Editor4.InsertItem(7,"Robert King",2,2)
		var_Editor4.InsertItem(8,"Laura Callahan",3,2)
		var_Editor4.InsertItem(9,"Anne Dodsworth",2,5)
		var_Editor4.ExpandAll()
	' var_Items.FormatCell(h,0) = "value + ' (DropDownList - single column tree)'"
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.FormatCell(h,0) = `value + ' (DropDownList - single column tree)'`"

	h = var_Items.AddItem(1)
	var_Editor5 = var_Items.CellEditor(h,0)
		var_Editor5.EditType = 3
		var_Editor5.DropDownAutoWidth = 0
		' var_Editor5.Option(57) = "Name¦Title¦City¦Phone"
		oGrid.TemplateDef = "dim var_Editor5"
		oGrid.TemplateDef = var_Editor5
		oGrid.Template = "var_Editor5.Option(57) = `Name¦Title¦City¦Phone`"

		' var_Editor5.Option(58) = "312¦¦¦96"
		oGrid.TemplateDef = "dim var_Editor5"
		oGrid.TemplateDef = var_Editor5
		oGrid.Template = "var_Editor5.Option(58) = `312¦¦¦96`"

		var_Editor5.AddItem(1,"Nancy Davolio¦Sales Representative¦Seattle¦(206) 555-9857",1)
		var_Editor5.AddItem(2,"Andrew Fuller¦<b>Vice President</b>, Sales¦Tacoma¦(206) 555-9482",2)
		var_Editor5.AddItem(3,"Janet Leverling¦Sales Representative¦Kirkland¦(206) 555-3412",3)
		var_Editor5.AddItem(4,"Peacock Margaret¦Sales Representative¦Redmond¦(206) 555-8122",3)
		var_Editor5.AddItem(5,"Steven Buchanan¦Sales Manager¦London¦(71) 555-4848",2)
		var_Editor5.AddItem(6,"Michael Suyama¦Sales Representative¦London¦(71) 555-7773",1)
		var_Editor5.AddItem(7,"Robert King¦Sales Representative¦Kirkland¦(71) 555-5598",2)
		var_Editor5.AddItem(8,"Laura Callahan¦Inside Sales Coordinator¦Seattle¦(206) 555-1189",3)
		var_Editor5.AddItem(9,"Anne Dodsworth¦Sales Representative¦London¦(71) 555-4444",2)
	' var_Items.FormatCell(h,0) = "value + ' (DropDownList - multiple columns list)'"
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.FormatCell(h,0) = `value + ' (DropDownList - multiple columns list)'`"

	h = var_Items.AddItem(1)
	var_Editor6 = var_Items.CellEditor(h,0)
		var_Editor6.EditType = 3
		var_Editor6.DropDownAutoWidth = 0
		' var_Editor6.Option(57) = "Name¦Title¦City¦Phone"
		oGrid.TemplateDef = "dim var_Editor6"
		oGrid.TemplateDef = var_Editor6
		oGrid.Template = "var_Editor6.Option(57) = `Name¦Title¦City¦Phone`"

		' var_Editor6.Option(58) = "312¦¦¦96"
		oGrid.TemplateDef = "dim var_Editor6"
		oGrid.TemplateDef = var_Editor6
		oGrid.Template = "var_Editor6.Option(58) = `312¦¦¦96`"

		var_Editor6.AddItem(1,"Nancy Davolio¦Sales Representative¦Seattle¦(206) 555-9857",1)
		var_Editor6.AddItem(2,"Andrew Fuller¦<b>Vice President</b>, Sales¦Tacoma¦(206) 555-9482",2)
		var_Editor6.InsertItem(3,"Janet Leverling¦Sales Representative¦Kirkland¦(206) 555-3412",3,2)
		var_Editor6.InsertItem(4,"Peacock Margaret¦Sales Representative¦Redmond¦(206) 555-8122",3,2)
		var_Editor6.InsertItem(5,"Steven Buchanan¦Sales Manager¦London¦(71) 555-4848",2,2)
		var_Editor6.InsertItem(6,"Michael Suyama¦Sales Representative¦London¦(71) 555-7773",1,5)
		var_Editor6.InsertItem(7,"Robert King¦Sales Representative¦Kirkland¦(71) 555-5598",2,2)
		var_Editor6.InsertItem(8,"Laura Callahan¦Inside Sales Coordinator¦Seattle¦(206) 555-1189",3,2)
		var_Editor6.InsertItem(9,"Anne Dodsworth¦Sales Representative¦London¦(71) 555-4444",2,5)
		var_Editor6.ExpandAll()
	' var_Items.FormatCell(h,0) = "value + ' (DropDownList - multiple columns tree)'"
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.FormatCell(h,0) = `value + ' (DropDownList - multiple columns tree)'`"

	h = var_Items.AddItem(100)
	' var_Items.CellEditor(h,0).EditType = 4
	var_Editor7 = var_Items.CellEditor(h,0)
	oGrid.TemplateDef = "dim var_Editor7"
	oGrid.TemplateDef = var_Editor7
	oGrid.Template = "var_Editor7.EditType = 4"

	' var_Items.FormatCell(h,0) = "value + ' (SpinType)'"
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.FormatCell(h,0) = `value + ' (SpinType)'`"

	' var_Items.CellEditor(var_Items.AddItem("(MemoType)"),0).EditType = 5
	var_Editor8 = var_Items.CellEditor(var_Items.AddItem("(MemoType)"),0)
	oGrid.TemplateDef = "dim var_Editor8"
	oGrid.TemplateDef = var_Editor8
	oGrid.Template = "var_Editor8.EditType = 5"

	h = var_Items.AddItem(3)
	var_Editor9 = var_Items.CellEditor(h,0)
		var_Editor9.EditType = 6
		var_Editor9.AddItem(1,"Border",1)
		var_Editor9.AddItem(2,"Single",2)
		var_Editor9.AddItem(4,"Frame",3)
	' var_Items.FormatCell(h,0) = "value + ' (CheckListType)'"
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.FormatCell(h,0) = `value + ' (CheckListType)'`"

	h = var_Items.AddItem("193.226.40.161")
	var_Editor10 = var_Items.CellEditor(h,0)
		var_Editor10.Mask = "{0,255}.{0,255}.{0,255}.{0,255}"
		var_Editor10.EditType = 8
	' var_Items.FormatCell(h,0) = "value + ' (MaskType)'"
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.FormatCell(h,0) = `value + ' (MaskType)'`"

	h = var_Items.AddItem(65280)
	var_Editor11 = var_Items.CellEditor(h,0)
		var_Editor11.EditType = 9
		var_Editor11.Mask = "`RGB(`{0,255}\,{0,255}\,{0,255}`)`;;0"
	' var_Items.FormatCell(h,0) = "value + ' (ColorType)'"
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.FormatCell(h,0) = `value + ' (ColorType)'`"

	h = var_Items.AddItem("Tahoma")
	' var_Items.CellEditor(h,0).EditType = 10
	var_Editor12 = var_Items.CellEditor(h,0)
	oGrid.TemplateDef = "dim var_Editor12"
	oGrid.TemplateDef = var_Editor12
	oGrid.Template = "var_Editor12.EditType = 10"

	' var_Items.FormatCell(h,0) = "value + ' (FontType)'"
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.FormatCell(h,0) = `value + ' (FontType)'`"

	h = var_Items.AddItem("gBHJJGHA5MIwAEIe4AAAFhwbiAliQwig7ixFjBQjRbjhljxwkB7kSFkiQkyblCllSwli7lzFmDQmTbmjlmzwnD7nQBnk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTqlVq1XrFZrVbrldr1YhgAEL5AgBhj/AAssMJthABFof4JDhIWCgYKDBATFT8M6hUIFAQAEQCCDwYF/QoWDZCRBgOKgIYHCQXMisKBAEQAAgOBZaSgQhjERANKQiZhIWamYyIBQ6FzcNKxQLJT4ADA4RjwObAAidBYdHwABQgUxMQYZEI0cD4OgnYKaKyzIRFNQx2YCKoFHScYD0ADXQwUAgwLoLQDqaCWBJoNQ9NBxFJTVQORgiarqSABbamGwtDAwBUWhQmqYALnOFQvGYPA4m6AwKhkZxKj2PBWC0SZCgmVY6CwIJgieBAniubRKHgaYgiwQwGiCfxGDWbBRmGZYIi2VwGnAexxGUSwUFiaR+hQPbBgOCoLCIHh4DAARCmQG4AlgNxuhwWgpFAEQUhuOxOk0NrhAaQoBmgPYdFSIZPjYGYbn+HhgEoAA7HMBIOjUM51AoPojHkEwVlET5slgWZtAEUBdjeSoeF6X5/rQRRSi+QB6GychsEAfZshKYABGQZorlAOgMBqEgAjYHB2jqSoigmYBLk+QZnBqGhggAEwImgbojgoIwSE+MxUHiS4REQCQWluD48B+JJoL+YQikuaI9AALgLmsJQfnSdAvDkCJEhIIIBgOegLEiPBqCyCAAjcCwgAAIJBhQBQkHGL4gDaNBokkZQMiwUAuioJQiCAQYsHMcwwEIeoigAYIogsGIwFKIYICIWguEoPgQhsawBASGgwCuJwLH8K4LigAIaDwbxMAOKxbisPwfASQATFASoagIEYwgcSoKGiAA/mEdIuiGPxCmObIlhMIJNHONxFH8EpPCGeB+noEpBBSSRjCsPZEiyKhgjAH5whSdLEjwDxjC8TxVEMFRzFWJJZBUSI0gQEQLBOM4VHkIg1D0CAJDQNg/p4AAdoC")
	' var_Items.CellEditor(h,0).EditType = 11
	var_Editor13 = var_Items.CellEditor(h,0)
	oGrid.TemplateDef = "dim var_Editor13"
	oGrid.TemplateDef = var_Editor13
	oGrid.Template = "var_Editor13.EditType = 11"

	' var_Items.FormatCell(h,0) = "value + ' (PictureType)'"
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.FormatCell(h,0) = `value + ' (PictureType)'`"

	' var_Items.CellEditor(var_Items.AddItem("(ButtonType)"),0).EditType = 12
	var_Editor14 = var_Items.CellEditor(var_Items.AddItem("(ButtonType)"),0)
	oGrid.TemplateDef = "dim var_Editor14"
	oGrid.TemplateDef = var_Editor14
	oGrid.Template = "var_Editor14.EditType = 12"

	h = var_Items.AddItem(25)
	' var_Items.CellEditor(h,0).EditType = 13
	var_Editor15 = var_Items.CellEditor(h,0)
	oGrid.TemplateDef = "dim var_Editor15"
	oGrid.TemplateDef = var_Editor15
	oGrid.Template = "var_Editor15.EditType = 13"

	' var_Items.FormatCell(h,0) = "value + ' (ProgressBarType)'"
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.FormatCell(h,0) = `value + ' (ProgressBarType)'`"

	h = var_Items.AddItem("Value 1")
	var_Editor16 = var_Items.CellEditor(h,0)
		var_Editor16.EditType = 14
		var_Editor16.AddItem(1,"Value 1",1)
		var_Editor16.AddItem(2,"Value 2",2)
		var_Editor16.AddItem(3,"Value 3",3)
	' var_Items.FormatCell(h,0) = "value + ' (PickEditType)'"
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.FormatCell(h,0) = `value + ' (PickEditType)'`"

	' var_Items.CellEditor(var_Items.AddItem("(LinkEditType)"),0).EditType = 15
	var_Editor17 = var_Items.CellEditor(var_Items.AddItem("(LinkEditType)"),0)
	oGrid.TemplateDef = "dim var_Editor17"
	oGrid.TemplateDef = var_Editor17
	oGrid.Template = "var_Editor17.EditType = 15"

	var_Editor18 = var_Items.CellEditor(var_Items.AddItem("(UserEditorType)"),0)
		var_Editor18.EditType = 16
		var_Editor18.UserEditor("Exontrol.ComboBox","")
		var_Object = var_Editor18.UserEditorObject
	h = var_Items.AddItem(255)
	var_Editor19 = var_Items.CellEditor(h,0)
		var_Editor19.EditType = 17
		' var_Editor19.Option(4) = .t.
		oGrid.TemplateDef = "dim var_Editor19"
		oGrid.TemplateDef = var_Editor19
		oGrid.Template = "var_Editor19.Option(4) = True"

	' var_Items.FormatCell(h,0) = "value + ' (ColorListType)'"
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.FormatCell(h,0) = `value + ' (ColorListType)'`"

	' var_Items.CellEditor(var_Items.AddItem(65280),0).EditType = 17
	var_Editor20 = var_Items.CellEditor(var_Items.AddItem(65280),0)
	oGrid.TemplateDef = "dim var_Editor20"
	oGrid.TemplateDef = var_Editor20
	oGrid.Template = "var_Editor20.EditType = 17"

	' var_Items.CellEditor(var_Items.AddItem("(MemoDropDownType)"),0).EditType = 18
	var_Editor21 = var_Items.CellEditor(var_Items.AddItem("(MemoDropDownType)"),0)
	oGrid.TemplateDef = "dim var_Editor21"
	oGrid.TemplateDef = var_Editor21
	oGrid.Template = "var_Editor21.EditType = 18"

	var_Editor22 = var_Items.CellEditor(var_Items.AddItem(-1),0)
		var_Editor22.EditType = 19
		' var_Editor22.Option(17) = 1
		oGrid.TemplateDef = "dim var_Editor22"
		oGrid.TemplateDef = var_Editor22
		oGrid.Template = "var_Editor22.Option(17) = 1"

	h = var_Items.AddItem(50)
	var_Editor23 = var_Items.CellEditor(h,0)
		var_Editor23.EditType = 20
		' var_Editor23.Option(41) = -60
		oGrid.TemplateDef = "dim var_Editor23"
		oGrid.TemplateDef = var_Editor23
		oGrid.Template = "var_Editor23.Option(41) = -60"

		' var_Editor23.Option(53) = 10
		oGrid.TemplateDef = "dim var_Editor23"
		oGrid.TemplateDef = var_Editor23
		oGrid.Template = "var_Editor23.Option(53) = 10"

		' var_Editor23.Option(63) = 2
		oGrid.TemplateDef = "dim var_Editor23"
		oGrid.TemplateDef = var_Editor23
		oGrid.Template = "var_Editor23.Option(63) = 2"

	' var_Items.FormatCell(h,0) = "value + ' (SliderType)'"
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.FormatCell(h,0) = `value + ' (SliderType)'`"

	h = var_Items.AddItem(100)
	' var_Items.CellEditor(h,0).EditType = 21
	var_Editor24 = var_Items.CellEditor(h,0)
	oGrid.TemplateDef = "dim var_Editor24"
	oGrid.TemplateDef = var_Editor24
	oGrid.Template = "var_Editor24.EditType = 21"

	' var_Items.FormatCell(h,0) = "value + ' (CalculatorType)'"
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.FormatCell(h,0) = `value + ' (CalculatorType)'`"

	var_Items.EnsureVisibleItem(h)
oGrid.EndUpdate()

1179
Editors (ImageSize = 16, default)

Dim h as N
Dim oGrid as P
Dim var_Appearance as P
Dim var_Column as local
Dim var_Editor as local
Dim var_Editor1 as local
Dim var_Editor10 as P
Dim var_Editor11 as P
Dim var_Editor12 as local
Dim var_Editor13 as local
Dim var_Editor14 as local
Dim var_Editor15 as local
Dim var_Editor16 as P
Dim var_Editor17 as local
Dim var_Editor18 as P
Dim var_Editor19 as P
Dim var_Editor2 as P
Dim var_Editor20 as local
Dim var_Editor21 as local
Dim var_Editor22 as P
Dim var_Editor23 as P
Dim var_Editor24 as local
Dim var_Editor3 as P
Dim var_Editor4 as P
Dim var_Editor5 as P
Dim var_Editor6 as P
Dim var_Editor7 as local
Dim var_Editor8 as local
Dim var_Editor9 as P
Dim var_Items as P
Dim var_Object as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.BeginUpdate()
oGrid.ImageSize = 16
oGrid.Images("gBJJgBAIDAAEg4ACEKAD/hz/EMNh8TIRNGwAjEZAEXjAojJAjMLjABAAgjUYkUnlUrlktl0vmExmUzmk1m03nE5nU7nkrQCAntBoVDolFo1HoM/ADAplLptImdMYFOqdSqlXq1QrVbrlGpVWsFNrNdnNjsk7pQAtNroFnt0sh8Yr9iulTuNxs1Eu8OiT/vsnsNVutXlk/oGGtVKxGLxWNtsZtN8iUYuNvy0Zvd+xNYwdwvl4p870GCqc8vOeuVttmp1knyOayWVy+WzN/ze1wOElenm+12WUz/Bv2/3UyyWrzeutux2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AgGTwYnYPoPmQCQGEKEJkEkFg9gGY44BoRoSmSSQ2EKEggHgRhShSZRJFYVoVmWCRmFKFAgGOTheheZgJgYYoYmYSYWGaF4lkMMJ0hqZpJjYbobmcCZGHKHJmjmJh0h2Z4JmYcIaE8WZ2H6H5oAoBoCiCaBKBYfdjGoJoKiKaJKDaDojmkChGgmIgpCoVoWiWaJZiSd4mmmSh2h6J5qAqBoiiiaY5iSeIpmqComiqKpqkqNouiuah6hqMIsmsSpWiuGhP1kOoumuSp2j6L5sAsBo54gKwWkaMZsgsJpKjKbJLDaRYxYWRpSjSbIZiSe41m2CxmlqNptksdpejebR5iSfI4m4S4W16boLiaao6m5fJ9jubwLkaco8m8S5WnaPZunuOp4j6b5Lnac4SA0PAGlgP4wEwFwGkGcIMCcCpCnCCxiA8NYAAmMJfkSbhFCcFpFnGDBnBqRpUhuEwTDeZ5lHCfw6HIQxLCaAxygyJwqgGcATE4FA6hWY4tjEAAQBAgIA==")
' oGrid.Columns.Add("Editors").Def(17) = 1
var_Column = oGrid.Columns.Add("Editors")
oGrid.TemplateDef = "dim var_Column"
oGrid.TemplateDef = var_Column
oGrid.Template = "var_Column.Def(17) = 1"

oGrid.BackColorHeader = 80135878
var_Items = oGrid.Items
	' var_Items.CellEditor(var_Items.AddItem("(ReadOnly)"),0).EditType = 0
	var_Editor = var_Items.CellEditor(var_Items.AddItem("(ReadOnly)"),0)
	oGrid.TemplateDef = "dim var_Editor"
	oGrid.TemplateDef = var_Editor
	oGrid.Template = "var_Editor.EditType = 0"

	' var_Items.CellEditor(var_Items.AddItem("(EditType)"),0).EditType = 1
	var_Editor1 = var_Items.CellEditor(var_Items.AddItem("(EditType)"),0)
	oGrid.TemplateDef = "dim var_Editor1"
	oGrid.TemplateDef = var_Editor1
	oGrid.Template = "var_Editor1.EditType = 1"

	h = var_Items.AddItem("Value 1")
	var_Editor2 = var_Items.CellEditor(h,0)
		var_Editor2.EditType = 2
		var_Editor2.AddItem(1,"Value 1",1)
		var_Editor2.AddItem(2,"Value 2",2)
		var_Editor2.AddItem(3,"Value 3",3)
	' var_Items.FormatCell(h,0) = "value + ' (DropDownType)'"
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.FormatCell(h,0) = `value + ' (DropDownType)'`"

	h = var_Items.AddItem(1)
	var_Editor3 = var_Items.CellEditor(h,0)
		var_Editor3.EditType = 3
		var_Editor3.DropDownAutoWidth = 0
		var_Editor3.AddItem(1,"Nancy Davolio",1)
		var_Editor3.AddItem(2,"Andrew Fuller",2)
		var_Editor3.AddItem(3,"Janet Leverling",3)
		var_Editor3.AddItem(4,"Peacock Margaret",3)
		var_Editor3.AddItem(5,"Steven Buchanan",2)
		var_Editor3.AddItem(6,"Michael Suyama",1)
		var_Editor3.AddItem(7,"Robert King",2)
		var_Editor3.AddItem(8,"Laura Callahan",3)
		var_Editor3.AddItem(9,"Anne Dodsworth",2)
	' var_Items.FormatCell(h,0) = "value + ' (DropDownList - single column list)'"
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.FormatCell(h,0) = `value + ' (DropDownList - single column list)'`"

	h = var_Items.AddItem(1)
	var_Editor4 = var_Items.CellEditor(h,0)
		var_Editor4.EditType = 3
		var_Editor4.DropDownAutoWidth = 0
		var_Editor4.AddItem(1,"Nancy Davolio",1)
		var_Editor4.AddItem(2,"Andrew Fuller",2)
		var_Editor4.InsertItem(3,"Janet Leverling",3,2)
		var_Editor4.InsertItem(4,"Peacock Margaret",3,2)
		var_Editor4.InsertItem(5,"Steven Buchanan",2,2)
		var_Editor4.InsertItem(6,"Michael Suyama",1,5)
		var_Editor4.InsertItem(7,"Robert King",2,2)
		var_Editor4.InsertItem(8,"Laura Callahan",3,2)
		var_Editor4.InsertItem(9,"Anne Dodsworth",2,5)
		var_Editor4.ExpandAll()
	' var_Items.FormatCell(h,0) = "value + ' (DropDownList - single column tree)'"
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.FormatCell(h,0) = `value + ' (DropDownList - single column tree)'`"

	h = var_Items.AddItem(1)
	var_Editor5 = var_Items.CellEditor(h,0)
		var_Editor5.EditType = 3
		var_Editor5.DropDownAutoWidth = 0
		' var_Editor5.Option(57) = "Name¦Title¦City¦Phone"
		oGrid.TemplateDef = "dim var_Editor5"
		oGrid.TemplateDef = var_Editor5
		oGrid.Template = "var_Editor5.Option(57) = `Name¦Title¦City¦Phone`"

		' var_Editor5.Option(58) = "312¦¦¦96"
		oGrid.TemplateDef = "dim var_Editor5"
		oGrid.TemplateDef = var_Editor5
		oGrid.Template = "var_Editor5.Option(58) = `312¦¦¦96`"

		var_Editor5.AddItem(1,"Nancy Davolio¦Sales Representative¦Seattle¦(206) 555-9857",1)
		var_Editor5.AddItem(2,"Andrew Fuller¦<b>Vice President</b>, Sales¦Tacoma¦(206) 555-9482",2)
		var_Editor5.AddItem(3,"Janet Leverling¦Sales Representative¦Kirkland¦(206) 555-3412",3)
		var_Editor5.AddItem(4,"Peacock Margaret¦Sales Representative¦Redmond¦(206) 555-8122",3)
		var_Editor5.AddItem(5,"Steven Buchanan¦Sales Manager¦London¦(71) 555-4848",2)
		var_Editor5.AddItem(6,"Michael Suyama¦Sales Representative¦London¦(71) 555-7773",1)
		var_Editor5.AddItem(7,"Robert King¦Sales Representative¦Kirkland¦(71) 555-5598",2)
		var_Editor5.AddItem(8,"Laura Callahan¦Inside Sales Coordinator¦Seattle¦(206) 555-1189",3)
		var_Editor5.AddItem(9,"Anne Dodsworth¦Sales Representative¦London¦(71) 555-4444",2)
	' var_Items.FormatCell(h,0) = "value + ' (DropDownList - multiple columns list)'"
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.FormatCell(h,0) = `value + ' (DropDownList - multiple columns list)'`"

	h = var_Items.AddItem(1)
	var_Editor6 = var_Items.CellEditor(h,0)
		var_Editor6.EditType = 3
		var_Editor6.DropDownAutoWidth = 0
		' var_Editor6.Option(57) = "Name¦Title¦City¦Phone"
		oGrid.TemplateDef = "dim var_Editor6"
		oGrid.TemplateDef = var_Editor6
		oGrid.Template = "var_Editor6.Option(57) = `Name¦Title¦City¦Phone`"

		' var_Editor6.Option(58) = "312¦¦¦96"
		oGrid.TemplateDef = "dim var_Editor6"
		oGrid.TemplateDef = var_Editor6
		oGrid.Template = "var_Editor6.Option(58) = `312¦¦¦96`"

		var_Editor6.AddItem(1,"Nancy Davolio¦Sales Representative¦Seattle¦(206) 555-9857",1)
		var_Editor6.AddItem(2,"Andrew Fuller¦<b>Vice President</b>, Sales¦Tacoma¦(206) 555-9482",2)
		var_Editor6.InsertItem(3,"Janet Leverling¦Sales Representative¦Kirkland¦(206) 555-3412",3,2)
		var_Editor6.InsertItem(4,"Peacock Margaret¦Sales Representative¦Redmond¦(206) 555-8122",3,2)
		var_Editor6.InsertItem(5,"Steven Buchanan¦Sales Manager¦London¦(71) 555-4848",2,2)
		var_Editor6.InsertItem(6,"Michael Suyama¦Sales Representative¦London¦(71) 555-7773",1,5)
		var_Editor6.InsertItem(7,"Robert King¦Sales Representative¦Kirkland¦(71) 555-5598",2,2)
		var_Editor6.InsertItem(8,"Laura Callahan¦Inside Sales Coordinator¦Seattle¦(206) 555-1189",3,2)
		var_Editor6.InsertItem(9,"Anne Dodsworth¦Sales Representative¦London¦(71) 555-4444",2,5)
		var_Editor6.ExpandAll()
	' var_Items.FormatCell(h,0) = "value + ' (DropDownList - multiple columns tree)'"
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.FormatCell(h,0) = `value + ' (DropDownList - multiple columns tree)'`"

	h = var_Items.AddItem(100)
	' var_Items.CellEditor(h,0).EditType = 4
	var_Editor7 = var_Items.CellEditor(h,0)
	oGrid.TemplateDef = "dim var_Editor7"
	oGrid.TemplateDef = var_Editor7
	oGrid.Template = "var_Editor7.EditType = 4"

	' var_Items.FormatCell(h,0) = "value + ' (SpinType)'"
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.FormatCell(h,0) = `value + ' (SpinType)'`"

	' var_Items.CellEditor(var_Items.AddItem("(MemoType)"),0).EditType = 5
	var_Editor8 = var_Items.CellEditor(var_Items.AddItem("(MemoType)"),0)
	oGrid.TemplateDef = "dim var_Editor8"
	oGrid.TemplateDef = var_Editor8
	oGrid.Template = "var_Editor8.EditType = 5"

	h = var_Items.AddItem(3)
	var_Editor9 = var_Items.CellEditor(h,0)
		var_Editor9.EditType = 6
		var_Editor9.AddItem(1,"Border",1)
		var_Editor9.AddItem(2,"Single",2)
		var_Editor9.AddItem(4,"Frame",3)
	' var_Items.FormatCell(h,0) = "value + ' (CheckListType)'"
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.FormatCell(h,0) = `value + ' (CheckListType)'`"

	h = var_Items.AddItem("193.226.40.161")
	var_Editor10 = var_Items.CellEditor(h,0)
		var_Editor10.Mask = "{0,255}.{0,255}.{0,255}.{0,255}"
		var_Editor10.EditType = 8
	' var_Items.FormatCell(h,0) = "value + ' (MaskType)'"
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.FormatCell(h,0) = `value + ' (MaskType)'`"

	h = var_Items.AddItem(65280)
	var_Editor11 = var_Items.CellEditor(h,0)
		var_Editor11.EditType = 9
		var_Editor11.Mask = "`RGB(`{0,255}\,{0,255}\,{0,255}`)`;;0"
	' var_Items.FormatCell(h,0) = "value + ' (ColorType)'"
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.FormatCell(h,0) = `value + ' (ColorType)'`"

	h = var_Items.AddItem("Tahoma")
	' var_Items.CellEditor(h,0).EditType = 10
	var_Editor12 = var_Items.CellEditor(h,0)
	oGrid.TemplateDef = "dim var_Editor12"
	oGrid.TemplateDef = var_Editor12
	oGrid.Template = "var_Editor12.EditType = 10"

	' var_Items.FormatCell(h,0) = "value + ' (FontType)'"
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.FormatCell(h,0) = `value + ' (FontType)'`"

	h = var_Items.AddItem("gBHJJGHA5MIwAEIe4AAAFhwbiAliQwig7ixFjBQjRbjhljxwkB7kSFkiQkyblCllSwli7lzFmDQmTbmjlmzwnD7nQBnk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTqlVq1XrFZrVbrldr1YhgAEL5AgBhj/AAssMJthABFof4JDhIWCgYKDBATFT8M6hUIFAQAEQCCDwYF/QoWDZCRBgOKgIYHCQXMisKBAEQAAgOBZaSgQhjERANKQiZhIWamYyIBQ6FzcNKxQLJT4ADA4RjwObAAidBYdHwABQgUxMQYZEI0cD4OgnYKaKyzIRFNQx2YCKoFHScYD0ADXQwUAgwLoLQDqaCWBJoNQ9NBxFJTVQORgiarqSABbamGwtDAwBUWhQmqYALnOFQvGYPA4m6AwKhkZxKj2PBWC0SZCgmVY6CwIJgieBAniubRKHgaYgiwQwGiCfxGDWbBRmGZYIi2VwGnAexxGUSwUFiaR+hQPbBgOCoLCIHh4DAARCmQG4AlgNxuhwWgpFAEQUhuOxOk0NrhAaQoBmgPYdFSIZPjYGYbn+HhgEoAA7HMBIOjUM51AoPojHkEwVlET5slgWZtAEUBdjeSoeF6X5/rQRRSi+QB6GychsEAfZshKYABGQZorlAOgMBqEgAjYHB2jqSoigmYBLk+QZnBqGhggAEwImgbojgoIwSE+MxUHiS4REQCQWluD48B+JJoL+YQikuaI9AALgLmsJQfnSdAvDkCJEhIIIBgOegLEiPBqCyCAAjcCwgAAIJBhQBQkHGL4gDaNBokkZQMiwUAuioJQiCAQYsHMcwwEIeoigAYIogsGIwFKIYICIWguEoPgQhsawBASGgwCuJwLH8K4LigAIaDwbxMAOKxbisPwfASQATFASoagIEYwgcSoKGiAA/mEdIuiGPxCmObIlhMIJNHONxFH8EpPCGeB+noEpBBSSRjCsPZEiyKhgjAH5whSdLEjwDxjC8TxVEMFRzFWJJZBUSI0gQEQLBOM4VHkIg1D0CAJDQNg/p4AAdoC")
	' var_Items.CellEditor(h,0).EditType = 11
	var_Editor13 = var_Items.CellEditor(h,0)
	oGrid.TemplateDef = "dim var_Editor13"
	oGrid.TemplateDef = var_Editor13
	oGrid.Template = "var_Editor13.EditType = 11"

	' var_Items.FormatCell(h,0) = "value + ' (PictureType)'"
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.FormatCell(h,0) = `value + ' (PictureType)'`"

	' var_Items.CellEditor(var_Items.AddItem("(ButtonType)"),0).EditType = 12
	var_Editor14 = var_Items.CellEditor(var_Items.AddItem("(ButtonType)"),0)
	oGrid.TemplateDef = "dim var_Editor14"
	oGrid.TemplateDef = var_Editor14
	oGrid.Template = "var_Editor14.EditType = 12"

	h = var_Items.AddItem(25)
	' var_Items.CellEditor(h,0).EditType = 13
	var_Editor15 = var_Items.CellEditor(h,0)
	oGrid.TemplateDef = "dim var_Editor15"
	oGrid.TemplateDef = var_Editor15
	oGrid.Template = "var_Editor15.EditType = 13"

	' var_Items.FormatCell(h,0) = "value + ' (ProgressBarType)'"
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.FormatCell(h,0) = `value + ' (ProgressBarType)'`"

	h = var_Items.AddItem("Value 1")
	var_Editor16 = var_Items.CellEditor(h,0)
		var_Editor16.EditType = 14
		var_Editor16.AddItem(1,"Value 1",1)
		var_Editor16.AddItem(2,"Value 2",2)
		var_Editor16.AddItem(3,"Value 3",3)
	' var_Items.FormatCell(h,0) = "value + ' (PickEditType)'"
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.FormatCell(h,0) = `value + ' (PickEditType)'`"

	' var_Items.CellEditor(var_Items.AddItem("(LinkEditType)"),0).EditType = 15
	var_Editor17 = var_Items.CellEditor(var_Items.AddItem("(LinkEditType)"),0)
	oGrid.TemplateDef = "dim var_Editor17"
	oGrid.TemplateDef = var_Editor17
	oGrid.Template = "var_Editor17.EditType = 15"

	var_Editor18 = var_Items.CellEditor(var_Items.AddItem("(UserEditorType)"),0)
		var_Editor18.EditType = 16
		var_Editor18.UserEditor("Exontrol.ComboBox","")
		var_Object = var_Editor18.UserEditorObject
	h = var_Items.AddItem(255)
	var_Editor19 = var_Items.CellEditor(h,0)
		var_Editor19.EditType = 17
		' var_Editor19.Option(4) = .t.
		oGrid.TemplateDef = "dim var_Editor19"
		oGrid.TemplateDef = var_Editor19
		oGrid.Template = "var_Editor19.Option(4) = True"

	' var_Items.FormatCell(h,0) = "value + ' (ColorListType)'"
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.FormatCell(h,0) = `value + ' (ColorListType)'`"

	' var_Items.CellEditor(var_Items.AddItem(65280),0).EditType = 17
	var_Editor20 = var_Items.CellEditor(var_Items.AddItem(65280),0)
	oGrid.TemplateDef = "dim var_Editor20"
	oGrid.TemplateDef = var_Editor20
	oGrid.Template = "var_Editor20.EditType = 17"

	' var_Items.CellEditor(var_Items.AddItem("(MemoDropDownType)"),0).EditType = 18
	var_Editor21 = var_Items.CellEditor(var_Items.AddItem("(MemoDropDownType)"),0)
	oGrid.TemplateDef = "dim var_Editor21"
	oGrid.TemplateDef = var_Editor21
	oGrid.Template = "var_Editor21.EditType = 18"

	var_Editor22 = var_Items.CellEditor(var_Items.AddItem(-1),0)
		var_Editor22.EditType = 19
		' var_Editor22.Option(17) = 1
		oGrid.TemplateDef = "dim var_Editor22"
		oGrid.TemplateDef = var_Editor22
		oGrid.Template = "var_Editor22.Option(17) = 1"

	h = var_Items.AddItem(50)
	var_Editor23 = var_Items.CellEditor(h,0)
		var_Editor23.EditType = 20
		' var_Editor23.Option(41) = -60
		oGrid.TemplateDef = "dim var_Editor23"
		oGrid.TemplateDef = var_Editor23
		oGrid.Template = "var_Editor23.Option(41) = -60"

		' var_Editor23.Option(53) = 10
		oGrid.TemplateDef = "dim var_Editor23"
		oGrid.TemplateDef = var_Editor23
		oGrid.Template = "var_Editor23.Option(53) = 10"

		' var_Editor23.Option(63) = 2
		oGrid.TemplateDef = "dim var_Editor23"
		oGrid.TemplateDef = var_Editor23
		oGrid.Template = "var_Editor23.Option(63) = 2"

	' var_Items.FormatCell(h,0) = "value + ' (SliderType)'"
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.FormatCell(h,0) = `value + ' (SliderType)'`"

	h = var_Items.AddItem(100)
	' var_Items.CellEditor(h,0).EditType = 21
	var_Editor24 = var_Items.CellEditor(h,0)
	oGrid.TemplateDef = "dim var_Editor24"
	oGrid.TemplateDef = var_Editor24
	oGrid.Template = "var_Editor24.EditType = 21"

	' var_Items.FormatCell(h,0) = "value + ' (CalculatorType)'"
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.FormatCell(h,0) = `value + ' (CalculatorType)'`"

	var_Items.EnsureVisibleItem(h)
oGrid.EndUpdate()

1178
Re-order the cell's caption, icons and images/pictures

Dim h as N
Dim oGrid as P
Dim var_Column as P
Dim var_Column1 as P
Dim var_Items as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.BeginUpdate()
oGrid.Images("gBJJgBAICAADAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEahkZAIAEEbjMjlErlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTqlVq1XrFZrVbrlTiFdib/sNjr9gs1nldlrlqtFtt0stlguNvulyh91ud1vVVvNuvt7wFHr9/vl3luEwOJouIq+Dw2KyGRyWTymVy2XzGZzUuiw+lmej0gkUaksljaAnmDcD/cEbf7w1+ufD/fEbeB028bYAO3enB6AB++4EoA4A4sb4vHjXJ4nG5vKAHA4ca6XBjTAD/Y2x/eB/jcB")
var_Column = oGrid.Columns.Add("ToLeft")
	' var_Column.Def(0) = .t.
	oGrid.TemplateDef = "dim var_Column"
	oGrid.TemplateDef = var_Column
	oGrid.Template = "var_Column.Def(0) = True"

var_Column1 = oGrid.Columns.Add("ToRight")
	' var_Column1.Def(0) = .t.
	oGrid.TemplateDef = "dim var_Column1"
	oGrid.TemplateDef = var_Column1
	oGrid.Template = "var_Column1.Def(0) = True"

	' var_Column1.Def(34) = "caption,picture,icons,icon,check"
	oGrid.TemplateDef = "dim var_Column1"
	oGrid.TemplateDef = var_Column1
	oGrid.Template = "var_Column1.Def(34) = `caption,picture,icons,icon,check`"

oGrid.DefaultItemHeight = 32
oGrid.DrawGridLines = 2
oGrid.HeaderAppearance = 4
var_Items = oGrid.Items
	h = var_Items.AddItem("Caption")
	' var_Items.CellImage(h,0) = 2
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellImage(h,0) = 2"

	' var_Items.CellImages(h,0) = "1,2"
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellImages(h,0) = `1,2`"

	' var_Items.CellPicture(h,0) = oGrid.ExecuteTemplate("loadpicture(`gCJKBOI4NBQaBQAhQNJJIIhShQAEEREAIA0ROZ6PT0hQKYZpIZDKBJkIgK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ABBEAB/DAXS4HgPAgLUSCzGkPjkIATyXPQoCeNYfR6Do7QGI8Zj+CAHiyCY2SkIQTSSCIyDQCkpDBJQJinMMuAUPgOxGOcpA/AkoTzJwyiYFMiDwJEsShFAURFCwJRVFceQXKQIS8P8STlBgLggAcrAQCQATjIgZA0JgVSxL0OAmKI6CpEc4SuOkeBeOwMRnLQuQhOApDJAImYmD44BPIgAzFMYiR3LcQw4JwqhQAknAMFAxwEEwJwUO4ljCHgmxzNwNQ3EU3ScLYEAACocDePwZgCLI+yFN8jg7FEQTtKMcwrAAOhgHw6SQI4OCmJgjDmNAjj5Gw+wbHkkTpEw7gpFgIAA2sABJEUThEK4QhgIJAQ==``)`)"

	' var_Items.CellValue(h,1) = var_Items.CellValue(h,0)
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellValue(h,1) = CellValue(h,0)"

	' var_Items.CellHAlignment(h,1) = 2
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellHAlignment(h,1) = 2"

	' var_Items.CellImage(h,1) = var_Items.CellImage(h,0)
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellImage(h,1) = CellImage(h,0)"

	' var_Items.CellImages(h,1) = "2,1"
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellImages(h,1) = `2,1`"

	' var_Items.CellPicture(h,1) = var_Items.CellPicture(h,0)
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellPicture(h,1) = CellPicture(h,0)"

	h = var_Items.AddItem("<b>HTML</b> <off 4>Caption")
	' var_Items.CellValueFormat(h,0) = 1
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellValueFormat(h,0) = 1"

	' var_Items.CellImage(h,0) = 2
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellImage(h,0) = 2"

	' var_Items.CellImages(h,0) = "1,2"
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellImages(h,0) = `1,2`"

	' var_Items.CellPicture(h,0) = oGrid.ExecuteTemplate("loadpicture(`gCJKBOI4NBQaBQAhQNJJIIhShQAEEREAIA0ROZ6PT0hQKYZpIZDKBJkIgKByN5mNJsMsKPABVqXBI4KjrD7HL6GWKPJKiCIhMiySidKxbOzZZJWMLsGL2FqyLjZMonNa2CyiZDOUqsQqUEq0ZCNISFXDIFxzZ4hUrbdrefZ/fz3ZgzZ75Tz3XjvHZnZznPieb55AKgAqmRyOOzEhR7XirWaWQQMTa+QIhDbZOZAAoYUCPDAQG7FXI4JRrNCoIRdPyyFr0AYifDUKZ+PCufK4RReALLUbtdBHSrGTCCNKqT4MbRqUxxQx+CAAEQ2VCBbxqGaLYDZNgzFbCbLDarRCrqMYMM6cWqpHKUDqhZjnVijEoLcp0FCjVg2OYhTjN/QWk4bo4iseBsAcABIDoPA5g2HgADIkQfDCNxwkEQYnFmAIAB4OJHGcKAPioGRKFKdh2g6UB8iiZ5QkYQp3gKWhDlsWYmAARBcgCIAUniVpmiSA5AF3A4wG8P41nGWwDDAW4MAAIpSG+bRzBoGx3AeCJhh6C4ljCUJGnSRBUFKAIQA6EgIHMWBoHqYgAngHJDCALBmhCCAfHOARAScUBvAmc5zHYXxoguXQ8DEMIAH8dI8HmP4/AyQJAEAYAoHqRByEQGJiECBAzAkKIpBYNIcikAp8kcZhDn4EBChmUoMgqHIqhiWoIgaDImgyVQImaRw/F0EZGCc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R+jDoJHGWlKkU+ajXpgg1yq2FQDFigSEBROwkCKnQwGwjliIU45x2HGyIB4dnM0UmUC+PhaLxefwOdia5zMT3+8wwYCQmEwdi4vQKqHKvigKHoKnc9Rs7GMDUOhhGOnAYjWkzKKRGyxsDUA01QCw0QCOF0uh0OkfRUMMbyRNwTBiCYZwKMIYyZAUkSlBYkxsCYAAHG4qwCBwMQfBYlxsNgsDhLEgwHA8PiPNg1ygP4uywIgMSwK4zSQG46BnFAATDJcL3IHM6DQBsPR3O83j/AsJyGH8w4ZJY5TsN8EAdFojTwJ0AAoA4MgATIMDqAcrQPMEwTDBgVy0LYtiuK8qyrFs6QtCocnLCs8wAGAChOGM+CZJ0HAaoQHQYocBiaHtJT3LEfgCLYIgQNYgw4IQiSaBcAABBEAB/DAXS4HgPAgLUSCzGkPjkIATyXPQoCeNYfR6Do7QGI8Zj+CAHiyCY2SkIQTSSCIyDQCkpDBJQJinMMuAUPgOxGOcpA/AkoTzJwyiYFMiDwJEsShFAURFCwJRVFceQXKQIS8P8STlBgLggAcrAQCQATjIgZA0JgVSxL0OAmKI6CpEc4SuOkeBeOwMRnLQuQhOApDJAImYmD44BPIgAzFMYiR3LcQw4JwqhQAknAMFAxwEEwJwUO4ljCHgmxzNwNQ3EU3ScLYEAACocDePwZgCLI+yFN8jg7FEQTtKMcwrAAOhgHw6SQI4OCmJgjDmNAjj5Gw+wbHkkTpEw7gpFgIAA2sABJEUThEK4QhgIJAQ==``)`)"

	' var_Items.CellValue(h,1) = var_Items.CellValue(h,0)
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellValue(h,1) = CellValue(h,0)"

	' var_Items.CellValueFormat(h,1) = 1
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellValueFormat(h,1) = 1"

	' var_Items.CellHAlignment(h,1) = 2
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellHAlignment(h,1) = 2"

	' var_Items.CellImage(h,1) = var_Items.CellImage(h,0)
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellImage(h,1) = CellImage(h,0)"

	' var_Items.CellImages(h,1) = "2,1"
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellImages(h,1) = `2,1`"

	' var_Items.CellPicture(h,1) = var_Items.CellPicture(h,0)
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellPicture(h,1) = CellPicture(h,0)"

oGrid.EndUpdate()

1177
ImageSize property on 32 (specifies the size of control' icons/images/check-boxes/radio-buttons)

' Fired after a new column has been added.
function AddColumn as v (Column  as  OLE::Exontrol.Grid.1::IColumn)
	' Column.Def(48) = 2
	' Column.Def(49) = 2
	oGrid = topparent:CONTROL_ACTIVEX1.activex
end function

Dim h as N
Dim hR as N
Dim oGrid as P
Dim var_Appearance as P
Dim var_Column as P
Dim var_Column1 as P
Dim var_Column2 as P
Dim var_Column3 as P
Dim var_Items as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.BeginUpdate()
oGrid.ImageSize = 32
oGrid.DefaultItemHeight = 36
oGrid.HeaderHeight = oGrid.DefaultItemHeight
oGrid.SortBarHeight = oGrid.DefaultItemHeight
oGrid.Font.Size = 16
oGrid.FilterBarFont.Size = oGrid.Font.Size
oGrid.ToolTipFont.Size = oGrid.Font.Size
oGrid.Indent = 26
oGrid.Images("gBJJgBAIDAAEg4AEEKAD/hz/EMNh8TIRNGwAjEZAEXjAojKAjMLjABhkaABAk0plUrlktl0vmExmUzmk1m03nE5nU7nk9miAoE+oVDolFo1HpFJpU5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2TScBwjCyqbale45ViqdoDU5EUiXJJ8ZxnECfYyrGjaMpCeKBUrGYTVRBIMxLLSia5oeJqMrnBpNVrIUgXCAGFwHK6BcauXIIDp6XoWWRbAAWDpVVzNNC3YzkCIceADHKiXxmVz4JLdGZ1QTGID2XaYaxWK4oZjsVSc4KDHbETbHFi9Fo3NaaxGisew+GYc4HlCR5NAAAIIEkQJSGMOgdE4RhYDwJJsAaAYQgmPpolCWgSCiBJzjcEIAkQXIBm8d5UhOQgCDUIBDDJDhgggJgKgKYJIDSVoDk8KBFF4OohEMZgWDsYYDj4GoGmGSB2B6B5iAiBgYDsYRjGSbIJo4RgqDuIpIAoLoLmMCJGDKDJjJiLA7xqUAAgGTwYnYPoPmQCQGEKEJkEkFg9gGY44BoRoSmSSQ2EKEggHgRhShSZRJFYVoVmWCRmFKFAgGOTheheZgJgYYoYmYSYWGaF4lkMMJ0hqZpJjYbobmcCZGHKHJmjmJh0h2Z4JmYcIaE8WZ2H6H5oAoBoCiCaBKBYfdjGoJoKiKaJKDaDojmkChGgmIgpCoVoWiWaJZiSd4mmmSh2h6J5qAqBoiiiaY5iSeIpmqComiqKpqkqNouiuah6hqMIsmsSpWiuGhP1kOoumuSp2j6L5sAsBo54gKwWkaMZsgsJpKjKbJLDaRYxYWRpSjSbIZiSe41m2CxmlqNptksdpejebR5iSfI4m4S4W16boLiaao6m5fJ9jubwLkaco8m8S5WnaPZunuOp4j6b5Lnac4SA0PAGlgP4wEwFwGkGcIMCcCpCnCCxiA8NYAAmMJfkSbhFCcFpFnGDBnBqRpUhuEwTDeZ5lHCfw6HIQxLCaAxygyJwqgGcATE4FA6hWY4tjEAAQBAgIA==")
oGrid.BackColorHeader = 80135878
oGrid.SelBackColor = 67108864
oGrid.SelForeColor = 65536
oGrid.Template = "CheckImage(0) = 16777216" // oGrid.CheckImage(0) = 16777216
oGrid.Template = "CheckImage(1) = 33554432" // oGrid.CheckImage(1) = 33554432
oGrid.Template = "CheckImage(2) = 50331648" // oGrid.CheckImage(2) = 50331648
oGrid.Template = "Background(20) = SelBackColor" // oGrid.Background(20) = oGrid.SelBackColor
oGrid.Template = "Background(21) = SelForeColor" // oGrid.Background(21) = oGrid.SelForeColor
oGrid.Template = "Background(26) = BackColor" // oGrid.Background(26) = oGrid.BackColor
oGrid.Template = "Background(27) = ForeColor" // oGrid.Background(27) = oGrid.ForeColor
oGrid.Template = "Background(32) = -1" // oGrid.Background(32) = -1
oGrid.Template = "Background(0) = 67108864" // oGrid.Background(0) = 67108864
oGrid.Template = "Background(41) = 67174657" // oGrid.Background(41) = 67174657
oGrid.Template = "Background(1) = 67109119" // oGrid.Background(1) = 67109119
oGrid.HeaderAppearance = 4
oGrid.ShowFocusRect = .f.
oGrid.SortBarVisible = .t.
oGrid.AllowGroupBy = .t.
oGrid.BackColorSortBar = oGrid.BackColor
oGrid.BackColorLevelHeader = oGrid.BackColor
oGrid.FilterBarDropDownHeight = 1
var_Column = oGrid.Columns.Add("Check")
	' var_Column.Def(0) = .t.
	oGrid.TemplateDef = "dim var_Column"
	oGrid.TemplateDef = var_Column
	oGrid.Template = "var_Column.Def(0) = True"

	var_Column.PartialCheck = .t.
	var_Column.Width = 128
	var_Column.DisplayFilterButton = .t.
	var_Column.FilterList = 256
var_Column1 = oGrid.Columns.Add("Pos")
	var_Column1.FormatColumn = "1 pos ``"
	var_Column1.AllowSort = .f.
	var_Column1.Width = 48
	var_Column1.AllowSizing = .f.
	var_Column1.Alignment = 1
	var_Column1.HeaderAlignment = 1
var_Column2 = oGrid.Columns.Add("Image")
	var_Column2.DisplayFilterButton = .t.
	var_Column2.FilterList = 8480 'exShowExclude + exShowCheckBox + exSortItemsAsc
	var_Column2.FilterType = 10
	var_Column2.DisplayExpandButton = .t.
	var_Column2.ExpandColumns = "1,2,3"
	var_Column2.Width = 128
	var_Column2.HeaderImage = 1
var_Column3 = oGrid.Columns.Add("Images")
	' var_Column3.Def(0) = .t.
	oGrid.TemplateDef = "dim var_Column3"
	oGrid.TemplateDef = var_Column3
	oGrid.Template = "var_Column3.Def(0) = True"

	var_Column3.Width = 196
	var_Column3.HTMLCaption = "<img>1</img><img>2</img><img>3</img> Images"
oGrid.Columns.Item("Pos").Position = 3
var_Items = oGrid.Items
	hR = var_Items.AddItem("Root")
	' var_Items.ItemDivider(hR) = 0
	oGrid.TemplateDef = "dim var_Items,hR"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = hR
	oGrid.Template = "var_Items.ItemDivider(hR) = 0"

	' var_Items.ItemDividerLine(hR) = 0
	oGrid.TemplateDef = "dim var_Items,hR"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = hR
	oGrid.Template = "var_Items.ItemDividerLine(hR) = 0"

	h = var_Items.InsertItem(hR,,"Child A")
	' var_Items.CellImage(h,2) = 1
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellImage(h,2) = 1"

	' var_Items.CellImages(h,3) = "1,2,3"
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellImages(h,3) = `1,2,3`"

	' var_Items.CellValue(h,3) = "123"
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellValue(h,3) = `123`"

	h = var_Items.InsertItem(hR,,"Child B")
	' var_Items.CellState(h,0) = 1
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellState(h,0) = 1"

	' var_Items.CellImage(h,2) = 3
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellImage(h,2) = 3"

	' var_Items.CellImages(h,3) = "2,3,1"
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellImages(h,3) = `2,3,1`"

	' var_Items.CellValue(h,3) = "231"
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellValue(h,3) = `231`"

	' var_Items.SelectItem(h) = .t.
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.SelectItem(h) = True"

	h = var_Items.InsertItem(hR,,"Child C")
	' var_Items.CellImage(h,2) = 2
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellImage(h,2) = 2"

	' var_Items.CellState(h,3) = 1
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellState(h,3) = 1"

	' var_Items.CellValue(h,3) = "312"
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellValue(h,3) = `312`"

	' var_Items.CellImages(h,3) = "3,1,2"
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellImages(h,3) = `3,1,2`"

	' var_Items.ExpandItem(hR) = .t.
	oGrid.TemplateDef = "dim var_Items,hR"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = hR
	oGrid.Template = "var_Items.ExpandItem(hR) = True"

oGrid.EndUpdate()

1176
ImageSize property on 16 (default) (specifies the size of control' icons/images/check-boxes/radio-buttons)

' Fired after a new column has been added.
function AddColumn as v (Column  as  OLE::Exontrol.Grid.1::IColumn)
	' Column.Def(48) = 2
	' Column.Def(49) = 2
	oGrid = topparent:CONTROL_ACTIVEX1.activex
end function

Dim h as N
Dim hR as N
Dim oGrid as P
Dim var_Appearance as P
Dim var_Column as P
Dim var_Column1 as P
Dim var_Column2 as P
Dim var_Column3 as P
Dim var_Items as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.BeginUpdate()
oGrid.ImageSize = 16
oGrid.Images("gBJJgBAIDAAEg4ACEKAD/hz/EMNh8TIRNGwAjEZAEXjAojJAjMLjABAAgjUYkUnlUrlktl0vmExmUzmk1m03nE5nU7nkrQCAntBoVDolFo1HoM/ADAplLptImdMYFOqdSqlXq1QrVbrlGpVWsFNrNdnNjsk7pQAtNroFnt0sh8Yr9iulTuNxs1Eu8OiT/vsnsNVutXlk/oGGtVKxGLxWNtsZtN8iUYuNvy0Zvd+xNYwdwvl4p870GCqc8vOeuVttmp1knyOayWVy+WzN/ze1wOElenm+12WUz/Bv2/3UyyWrzeutux2GSyGP2dQ33C1ur3GD3M4zUNzHdlWjq/E3nGzVpjWv4HA7fRy/Tv2IrN8rPW6nZ3ve7mUlfu20Z8acvQyb+vY9jasYoDwMm+LytVBDqKG3z8O3Cb8P+mkAuY9cCQ2uL4KaxDKvkp8RNLEjqugnrwQo/UWPzFyeQw5sNLZFENrI4kOqU66pw8uzmOKvTqNqjULJvGL1JO48GtTGsbLdEL3scxLlyiw8dQeoUVxdLTtyKmUjwGlslRPJsnK1HbAKbKCrsQo8uQk/CeP44iaR/ATnTNPLvyxPU+z9P9AUDQVBowiofJXQ6Oo+kKMpIkjztE4TKn4P6JowfgPnwD5/nAjB8AOeAPo0eAA1IAFH07UhAIMpYAVIYFHqBUhwVjV1S1EtQAHxW65V0AZwAeuQAnwB5gAPYViEDVhwAHTQBkCjB4gOhwDmCyhH0sACAg==")
var_Appearance = oGrid.VisualAppearance
	var_Appearance.Add(4,"gBFLBCJwBAEHhEJAAEhABUYCg6AADACAxRDgMQBQKAAzQFAYbhkGCGAAGMZxRgmFgAQhFcZQSKUOQTDKMIziYBYfgkMIgSbJUgDGAkRRdDSOYDmGQYDiCIoRShOMIjHLUXxtDaIZwhEAoJb+RgAUY/cTzaAEUwHHiTKInaCQShsFYJUJAdRURQ9EwvCIZBpEWwLChENQwWLCNj2TScBwjCyqbale45ViqdoDU5EUiXJJ8ZxnECfYyrGjaMpCeKBUrGYTVRBIMxLLSia5oeJqMrnBpNVrIUgXCAGFwHK6BcauXIIDp6XoWWRbAAWDpVVzNNC3YzkCIceADHKiXxmVz4JLdGZ1QTGID2XaYaxWK4oZjsVSc4KDHbETbHFi9Fo3NaaxGisew+GYc4HlCR5NAAAIIEkQJSGMOgdE4RhYDwJJsAaAYQgmPpolCWgSCiBJzjcEIAkQXIBm8d5UhOQgCDUIBDDJDhgggJgKgKYJIDSVoDk8KBFF4OohEMZgWDsYYDj4GoGmGSB2B6B5iAiBgYDsYRjGSbIJo4RgqDuIpIAoLoLmMCJGDKDJjJiLA7xqUAAgGTwYnYPoPmQCQGEKEJkEkFg9gGY44BoRoSmSSQ2EKEggHgRhShSZRJFYVoVmWCRmFKFAgGOTheheZgJgYYoYmYSYWGaF4lkMMJ0hqZpJjYbobmcCZGHKHJmjmJh0h2Z4JmYcIaE8WZ2H6H5oAoBoCiCaBKBYfdjGoJoKiKaJKDaDojmkChGgmIgpCoVoWiWaJZiSd4mmmSh2h6J5qAqBoiiiaY5iSeIpmqComiqKpqkqNouiuah6hqMIsmsSpWiuGhP1kOoumuSp2j6L5sAsBo54gKwWkaMZsgsJpKjKbJLDaRYxYWRpSjSbIZiSe41m2CxmlqNptksdpejebR5iSfI4m4S4W16boLiaao6m5fJ9jubwLkaco8m8S5WnaPZunuOp4j6b5Lnac4SA0PAGlgP4wEwFwGkGcIMCcCpCnCCxiA8NYAAmMJfkSbhFCcFpFnGDBnBqRpUhuEwTDeZ5lHCfw6HIQxLCaAxygyJwqgGcATE4FA6hWY4tjEAAQBAgIA==")
oGrid.BackColorHeader = 80135878
oGrid.SelBackColor = 67108864
oGrid.SelForeColor = 65536
oGrid.Template = "Background(20) = SelBackColor" // oGrid.Background(20) = oGrid.SelBackColor
oGrid.Template = "Background(21) = SelForeColor" // oGrid.Background(21) = oGrid.SelForeColor
oGrid.Template = "Background(26) = BackColor" // oGrid.Background(26) = oGrid.BackColor
oGrid.Template = "Background(27) = ForeColor" // oGrid.Background(27) = oGrid.ForeColor
oGrid.Template = "Background(32) = -1" // oGrid.Background(32) = -1
oGrid.Template = "Background(0) = 67108864" // oGrid.Background(0) = 67108864
oGrid.Template = "Background(41) = 67174657" // oGrid.Background(41) = 67174657
oGrid.Template = "Background(1) = 67109119" // oGrid.Background(1) = 67109119
oGrid.HeaderAppearance = 4
oGrid.ShowFocusRect = .f.
oGrid.SortBarVisible = .t.
oGrid.AllowGroupBy = .t.
oGrid.BackColorSortBar = oGrid.BackColor
oGrid.BackColorLevelHeader = oGrid.BackColor
oGrid.FilterBarDropDownHeight = 1
var_Column = oGrid.Columns.Add("Check")
	' var_Column.Def(0) = .t.
	oGrid.TemplateDef = "dim var_Column"
	oGrid.TemplateDef = var_Column
	oGrid.Template = "var_Column.Def(0) = True"

	var_Column.PartialCheck = .t.
	var_Column.Width = 128
	var_Column.DisplayFilterButton = .t.
	var_Column.FilterList = 256
var_Column1 = oGrid.Columns.Add("Pos")
	var_Column1.FormatColumn = "1 pos ``"
	var_Column1.AllowSort = .f.
	var_Column1.Width = 48
	var_Column1.AllowSizing = .f.
	var_Column1.Alignment = 1
	var_Column1.HeaderAlignment = 1
var_Column2 = oGrid.Columns.Add("Image")
	var_Column2.DisplayFilterButton = .t.
	var_Column2.FilterList = 8480 'exShowExclude + exShowCheckBox + exSortItemsAsc
	var_Column2.FilterType = 10
	var_Column2.DisplayExpandButton = .t.
	var_Column2.ExpandColumns = "1,2,3"
	var_Column2.Width = 128
	var_Column2.HeaderImage = 1
var_Column3 = oGrid.Columns.Add("Images")
	' var_Column3.Def(0) = .t.
	oGrid.TemplateDef = "dim var_Column3"
	oGrid.TemplateDef = var_Column3
	oGrid.Template = "var_Column3.Def(0) = True"

	var_Column3.Width = 196
	var_Column3.HTMLCaption = "<img>1</img><img>2</img><img>3</img> Images"
oGrid.Columns.Item("Pos").Position = 3
var_Items = oGrid.Items
	hR = var_Items.AddItem("Root")
	' var_Items.ItemDivider(hR) = 0
	oGrid.TemplateDef = "dim var_Items,hR"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = hR
	oGrid.Template = "var_Items.ItemDivider(hR) = 0"

	' var_Items.ItemDividerLine(hR) = 0
	oGrid.TemplateDef = "dim var_Items,hR"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = hR
	oGrid.Template = "var_Items.ItemDividerLine(hR) = 0"

	h = var_Items.InsertItem(hR,,"Child A")
	' var_Items.CellImage(h,2) = 1
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellImage(h,2) = 1"

	' var_Items.CellImages(h,3) = "1,2,3"
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellImages(h,3) = `1,2,3`"

	' var_Items.CellValue(h,3) = "123"
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellValue(h,3) = `123`"

	h = var_Items.InsertItem(hR,,"Child B")
	' var_Items.CellState(h,0) = 1
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellState(h,0) = 1"

	' var_Items.CellImage(h,2) = 3
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellImage(h,2) = 3"

	' var_Items.CellImages(h,3) = "2,3,1"
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellImages(h,3) = `2,3,1`"

	' var_Items.CellValue(h,3) = "231"
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellValue(h,3) = `231`"

	' var_Items.SelectItem(h) = .t.
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.SelectItem(h) = True"

	h = var_Items.InsertItem(hR,,"Child C")
	' var_Items.CellImage(h,2) = 2
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellImage(h,2) = 2"

	' var_Items.CellState(h,3) = 1
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellState(h,3) = 1"

	' var_Items.CellValue(h,3) = "312"
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellValue(h,3) = `312`"

	' var_Items.CellImages(h,3) = "3,1,2"
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellImages(h,3) = `3,1,2`"

	' var_Items.ExpandItem(hR) = .t.
	oGrid.TemplateDef = "dim var_Items,hR"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = hR
	oGrid.Template = "var_Items.ExpandItem(hR) = True"

oGrid.EndUpdate()

1175
The user clicks the drop-down filter, select a value and the control's list filters for the selected item(s). Is there a way for when the user then goes to the next column to add another filter and the drop down arrow is clicked for the list of values they can filter by to be limited to what is being displayed in the list due to the first filter they set

' Fired after a new column has been added.
function AddColumn as v (Column  as  OLE::Exontrol.Grid.1::IColumn)
	oGrid = topparent:CONTROL_ACTIVEX1.activex
end function

Dim oGrid as P
Dim rs as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.BeginUpdate()
oGrid.ColumnAutoResize = .f.
rs = OLE.Create("ADOR.Recordset")
	rs.Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExGrid\Sample\Access\misc.accdb",3,3)
oGrid.DataSource = rs
oGrid.Columns.Item("ShipVia").Position = 2
oGrid.EndUpdate()

1174
Does the control display images from database (ADO)

Dim oGrid as P
Dim rs as P
Dim var_Column as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.BeginUpdate()
oGrid.ColumnAutoResize = .f.
oGrid.DrawGridLines = -1
oGrid.GridLineStyle = 512
oGrid.DefaultItemHeight = 48
rs = OLE.Create("ADODB.Recordset")
	rs.Open("Employees","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExGrid\Sample\Access\misc.mdb",3,3)
oGrid.DataSource = rs
var_Column = oGrid.Columns.Item("Photo")
	var_Column.Position = 1
	var_Column.Width = 128
oGrid.EndUpdate()

1173
Does the control display images from database (DAO)

Dim oGrid as P
Dim rs as P
Dim var_Column as P
Dim var_PrivDBEngine as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.BeginUpdate()
oGrid.ColumnAutoResize = .f.
oGrid.DrawGridLines = -1
oGrid.GridLineStyle = 512
oGrid.DefaultItemHeight = 48
var_PrivDBEngine = OLE.Create("DAO.DBEngine.36")
	rs = var_PrivDBEngine.OpenDatabase("C:\Program Files\Exontrol\ExGrid\Sample\Access\misc.mdb").OpenRecordset("Employees")
oGrid.DataSource = rs
var_Column = oGrid.Columns.Item("Photo")
	var_Column.Position = 1
	var_Column.Width = 128
oGrid.EndUpdate()

1172
Is it possible to set from code, a column sort without being inserted in the sortbar

Dim oGrid as P
Dim rs as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.BeginUpdate()
oGrid.ColumnAutoResize = .f.
rs = OLE.Create("ADOR.Recordset")
	rs.Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExGrid\Sample\Access\misc.accdb",3,3)
oGrid.DataSource = rs
oGrid.SortBarVisible = .t.
oGrid.Layout = "singlesort=\"C1:1\""
oGrid.EndUpdate()

1171
Is it possible to view all events the control fires
' Notifies the application once the control fires an event.
function Event as v (EventID  as  N)
	oGrid = topparent:CONTROL_ACTIVEX1.activex
	? oGrid.EventParam(-2) 
end function

Dim h as N
Dim hChild as N
Dim oGrid as P
Dim var_Column as P
Dim var_Items as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.BeginUpdate()
oGrid.LinesAtRoot = -1
var_Column = oGrid.Columns.Add("Tasks")
	' var_Column.Def(0) = .t.
	oGrid.TemplateDef = "dim var_Column"
	oGrid.TemplateDef = var_Column
	oGrid.Template = "var_Column.Def(0) = True"

	var_Column.PartialCheck = .t.
	' var_Column.Def(17) = 1
	oGrid.TemplateDef = "dim var_Column"
	oGrid.TemplateDef = var_Column
	oGrid.Template = "var_Column.Def(17) = 1"

	var_Column.FormatColumn = "value + (%CS0 = 1 ? `<r><fgcolor=808080>(checked)` : ``)"
	var_Column.Editor.EditType = 1
oGrid.HeaderVisible = .t.
var_Items = oGrid.Items
	h = var_Items.AddItem("Project")
	hChild = var_Items.InsertItem(h,,"Task 1")
	' var_Items.SelectItem(hChild) = .t.
	oGrid.TemplateDef = "dim var_Items,hChild"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = hChild
	oGrid.Template = "var_Items.SelectItem(hChild) = True"

	hChild = var_Items.InsertItem(h,,"Task 2")
	' var_Items.CellState(hChild,0) = 1
	oGrid.TemplateDef = "dim var_Items,hChild"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = hChild
	oGrid.Template = "var_Items.CellState(hChild,0) = 1"

	hChild = var_Items.InsertItem(h,,"Task 3")
	' var_Items.CellState(hChild,0) = 1
	oGrid.TemplateDef = "dim var_Items,hChild"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = hChild
	oGrid.Template = "var_Items.CellState(hChild,0) = 1"

	' var_Items.ExpandItem(h) = .t.
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.ExpandItem(h) = True"

oGrid.EndUpdate()

1170
How can I find all occurences of the giving value, within a column
Dim oGrid as P
Dim var_Column as P
Dim var_Column1 as P
Dim var_Items as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.BeginUpdate()
oGrid.Columns.Add("Default")
var_Column = oGrid.Columns.Add("Pos")
	var_Column.FormatColumn = "1 pos 'A-Z'"
	var_Column.Position = 0
	var_Column.AllowSizing = .f.
	var_Column.Width = 32
	var_Column.Enabled = .f.
var_Column1 = oGrid.Columns.Add("Index")
	var_Column1.FormatColumn = "0 index ''"
	var_Column1.AllowSizing = .f.
	var_Column1.Width = 32
	var_Column1.Enabled = .f.
var_Items = oGrid.Items
	var_Items.AddItem("A")
	var_Items.AddItem("A")
	var_Items.AddItem("A")
	? var_Items.CellCaption(var_Items.FindItem("A",0,0),1) 
	? var_Items.CellCaption(var_Items.FindItem("A",0,1),1) 
	? var_Items.CellCaption(var_Items.FindItem("A",0,2),1) 
oGrid.EndUpdate()

1169
How can I prevent expanding/collapsing the child items

' Fired before an item is about to be expanded (collapsed).
function BeforeExpandItem as v (Item  as  OLE::Exontrol.Grid.1::HITEM,Cancel  as  A)
	oGrid = topparent:CONTROL_ACTIVEX1.activex
	Cancel = oGrid.Items.ItemParent(Item)
end function

Dim h as N
Dim oGrid as P
Dim var_Items as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.BeginUpdate()
oGrid.SingleSel = .f.
oGrid.Columns.Add("Default")
oGrid.LinesAtRoot = -1
var_Items = oGrid.Items
	h = var_Items.AddItem("Root 1")
	var_Items.InsertItem(var_Items.InsertItem(h,,"Child 1.1"),,"Child")
	var_Items.InsertItem(h,,"Child 1.2")
	' var_Items.ExpandItem(h) = .t.
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.ExpandItem(h) = True"

	h = var_Items.AddItem("Root 2")
	var_Items.InsertItem(var_Items.InsertItem(h,,"Child 2.1"),,"Child")
	var_Items.InsertItem(h,,"Child 2.2")
	' var_Items.ExpandItem(h) = .t.
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.ExpandItem(h) = True"

oGrid.EndUpdate()

1168
How can I display the EBN bigger or smaller (thumb)

Dim oGrid as P
Dim var_Appearance as P
Dim var_Items as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.BeginUpdate()
var_Appearance = oGrid.VisualAppearance
	var_Appearance.Add(1,"c:\exontrol\images\normal.ebn")
	var_Appearance.Add(10,"CP:1 0 3 0 -3")
	var_Appearance.Add(17,"CP:1 3 0 -3 0")
oGrid.Template = "Background(388) = 167772160" // oGrid.Background(388) = 167772160
oGrid.Template = "Background(260) = 285212672" // oGrid.Background(260) = 285212672
oGrid.ScrollBars = 3855 'exVScrollEmptySpace + exHScrollEmptySpace + exVScrollOnThumbRelease + exHScrollOnThumbRelease + exDisableBoth
oGrid.ScrollBySingleLine = .t.
oGrid.Columns.Add("Def")
var_Items = oGrid.Items
	var_Items.AddItem(1)
	var_Items.AddItem(2)
	var_Items.AddItem(3)
oGrid.EndUpdate()

1167
I am using GroupBy feature to create a tree, but the top rows are aligned with the children, not indented. What could be wrong

' Occurs after a new Group Item has been inserted to Items collection.
function AddGroupItem as v (Item  as  OLE::Exontrol.Grid.1::HITEM)
	' AddBar(Item,"Progress", #12/2/2017#,#12/2/2017#)
	' DefineSummaryBars(Item,"", -3, "")
	' Chart.ItemBackColor(Item) = color
	Dim color as 
	Dim var_Items as P
	oGrid = topparent:CONTROL_ACTIVEX1.activex
	color = 14474460
	var_Items = oGrid.Items
		' var_Items.ItemDivider(Item) = -1
		oGrid.TemplateDef = "dim var_Items,Item"
		oGrid.TemplateDef = var_Items
		oGrid.TemplateDef = Item
		oGrid.Template = "var_Items.ItemDivider(Item) = -1"
		' var_Items.CellValue(Item,1) = var_Items.CellCaption(Item,var_Items.GroupItem(Item))
		oGrid.TemplateDef = "dim var_Items,Item"
		oGrid.TemplateDef = var_Items
		oGrid.TemplateDef = Item
		oGrid.Template = "var_Items.CellValue(Item,1) = CellCaption(Item,GroupItem(Item))"
		' var_Items.ItemBold(Item) = .t.
		oGrid.TemplateDef = "dim var_Items,Item"
		oGrid.TemplateDef = var_Items
		oGrid.TemplateDef = Item
		oGrid.Template = "var_Items.ItemBold(Item) = True"
		' var_Items.ItemBackColor(Item) = color
		oGrid.TemplateDef = "dim var_Items,Item"
		oGrid.TemplateDef = var_Items
		oGrid.TemplateDef = Item
		oGrid.Template = "var_Items.ItemBackColor(Item) = color"

end function

' Occurs after a new Item has been inserted to Items collection.
function AddItem as v (Item  as  OLE::Exontrol.Grid.1::HITEM)
	' AddBar(Item,"Task",#12/4/2017#,#12/10/2017#)
	' ItemBar(Item,"", 514)  = ItemToIndex(Item)
	Dim var_Items as P
	oGrid = topparent:CONTROL_ACTIVEX1.activex
	var_Items = oGrid.Items
end function

Dim h as N
Dim oGrid as P
Dim var_Columns as P
Dim var_Items as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.BeginUpdate()
var_Columns = oGrid.Columns
	var_Columns.Add("C1")
	var_Columns.Add("C2")
oGrid.LinesAtRoot = -1
oGrid.SortBarVisible = .t.
oGrid.SortBarCaption = "Drag a <b>column</b> header here to group by that column."
oGrid.AllowGroupBy = .t.
var_Items = oGrid.Items
	h = var_Items.AddItem("Item A")
	' var_Items.CellValue(h,1) = "SubItem A.1"
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellValue(h,1) = `SubItem A.1`"

	h = var_Items.AddItem("Item A")
	' var_Items.CellValue(h,1) = "SubItem A.1"
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellValue(h,1) = `SubItem A.1`"

	h = var_Items.AddItem("Item A")
	' var_Items.CellValue(h,1) = "SubItem A.1"
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellValue(h,1) = `SubItem A.1`"

	h = var_Items.AddItem("Item A")
	' var_Items.CellValue(h,1) = "SubItem A.1"
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellValue(h,1) = `SubItem A.1`"

	h = var_Items.AddItem("Item B")
	' var_Items.CellValue(h,1) = "SubItem B.1"
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellValue(h,1) = `SubItem B.1`"

	h = var_Items.AddItem("Item B")
	' var_Items.CellValue(h,1) = "SubItem B.1"
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellValue(h,1) = `SubItem B.1`"

oGrid.Columns.Item(0).SortOrder = 1
oGrid.EndUpdate()

1166
How can I display an item of picture type

Dim h as N
Dim h1 as N
Dim oGrid as P
Dim var_Column as local
Dim var_Column1 as local
Dim var_Items as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.BeginUpdate()
oGrid.LinesAtRoot = -1
oGrid.ScrollBySingleLine = .f.
oGrid.HeaderAppearance = 4
oGrid.HeaderHeight = 24
' oGrid.Columns.Add("Artikel").HTMLCaption = "<u>Artikel"
var_Column = oGrid.Columns.Add("Artikel")
oGrid.TemplateDef = "dim var_Column"
oGrid.TemplateDef = var_Column
oGrid.Template = "var_Column.HTMLCaption = `<u>Artikel`"

' oGrid.Columns.Add("Waarde").HTMLCaption = "<u>Waarde"
var_Column1 = oGrid.Columns.Add("Waarde")
oGrid.TemplateDef = "dim var_Column1"
oGrid.TemplateDef = var_Column1
oGrid.Template = "var_Column1.HTMLCaption = `<u>Waarde`"

oGrid.Template = "HTMLPicture(`T22128`) = `c:\exontrol\images\zipdisk.gif`" // oGrid.HTMLPicture("T22128") = "c:\exontrol\images\zipdisk.gif"
var_Items = oGrid.Items
	h = var_Items.AddItem("T22128-28)2D")
	h1 = var_Items.InsertItem(h,,"<img>T22128:128</img>")
	' var_Items.CellValueFormat(h1,0) = 1
	oGrid.TemplateDef = "dim var_Items,h1"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h1
	oGrid.Template = "var_Items.CellValueFormat(h1,0) = 1"

	' var_Items.ItemHeight(h1) = 128
	oGrid.TemplateDef = "dim var_Items,h1"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h1
	oGrid.Template = "var_Items.ItemHeight(h1) = 128"

	h1 = var_Items.InsertItem(h,,"werkvoorbereiding")
	' var_Items.CellValue(h1,1) = "5.80"
	oGrid.TemplateDef = "dim var_Items,h1"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h1
	oGrid.Template = "var_Items.CellValue(h1,1) = `5.80`"

	' var_Items.CellBold(h1,1) = .t.
	oGrid.TemplateDef = "dim var_Items,h1"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h1
	oGrid.Template = "var_Items.CellBold(h1,1) = True"

	' var_Items.CellValue(var_Items.InsertItem(h1,,"Type"),1) = "Eenvoudig"
	oGrid.TemplateDef = "dim var_Items"
	oGrid.TemplateDef = var_Items
	oGrid.Template = "var_Items.CellValue(InsertItem(h1,,`Type`),1) = `Eenvoudig`"

	' var_Items.CellValue(var_Items.InsertItem(h1,,"Prijs p/uur"),1) = "60,00"
	oGrid.TemplateDef = "dim var_Items"
	oGrid.TemplateDef = var_Items
	oGrid.Template = "var_Items.CellValue(InsertItem(h1,,`Prijs p/uur`),1) = `60,00`"

	' var_Items.CellValue(var_Items.InsertItem(h1,,"Marhe"),1) = "15,00%"
	oGrid.TemplateDef = "dim var_Items"
	oGrid.TemplateDef = var_Items
	oGrid.Template = "var_Items.CellValue(InsertItem(h1,,`Marhe`),1) = `15,00%`"

	' var_Items.CellValue(var_Items.InsertItem(h1,,"Insteltijd min."),1) = "5,00"
	oGrid.TemplateDef = "dim var_Items"
	oGrid.TemplateDef = var_Items
	oGrid.Template = "var_Items.CellValue(InsertItem(h1,,`Insteltijd min.`),1) = `5,00`"

	' var_Items.CellValue(var_Items.InsertItem(h1,,"Aantal"),1) = 1
	oGrid.TemplateDef = "dim var_Items"
	oGrid.TemplateDef = var_Items
	oGrid.Template = "var_Items.CellValue(InsertItem(h1,,`Aantal`),1) = 1"

	' var_Items.CellValue(var_Items.InsertItem(h1,,"Kostprije"),1) = "5,00"
	oGrid.TemplateDef = "dim var_Items"
	oGrid.TemplateDef = var_Items
	oGrid.Template = "var_Items.CellValue(InsertItem(h1,,`Kostprije`),1) = `5,00`"

	' var_Items.ExpandItem(h1) = .t.
	oGrid.TemplateDef = "dim var_Items,h1"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h1
	oGrid.Template = "var_Items.ExpandItem(h1) = True"

	h1 = var_Items.InsertItem(h,,"materiall")
	' var_Items.CellValue(h1,1) = "14.82"
	oGrid.TemplateDef = "dim var_Items,h1"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h1
	oGrid.Template = "var_Items.CellValue(h1,1) = `14.82`"

	' var_Items.CellBold(h1,1) = .t.
	oGrid.TemplateDef = "dim var_Items,h1"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h1
	oGrid.Template = "var_Items.CellBold(h1,1) = True"

	' var_Items.ItemHasChildren(h1) = .t.
	oGrid.TemplateDef = "dim var_Items,h1"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h1
	oGrid.Template = "var_Items.ItemHasChildren(h1) = True"

	h1 = var_Items.InsertItem(h,,"snijden")
	' var_Items.CellValue(h1,1) = "3.13"
	oGrid.TemplateDef = "dim var_Items,h1"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h1
	oGrid.Template = "var_Items.CellValue(h1,1) = `3.13`"

	' var_Items.CellBold(h1,1) = .t.
	oGrid.TemplateDef = "dim var_Items,h1"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h1
	oGrid.Template = "var_Items.CellBold(h1,1) = True"

	' var_Items.ItemHasChildren(h1) = .t.
	oGrid.TemplateDef = "dim var_Items,h1"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h1
	oGrid.Template = "var_Items.ItemHasChildren(h1) = True"

	' var_Items.ExpandItem(h) = .t.
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.ExpandItem(h) = True"

oGrid.EndUpdate()

1165
Dark mode

Dim back as 
Dim fore as 
Dim oGrid as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.BeginUpdate()
back = 65536
fore = 16777215
oGrid.VisualAppearance.Add(1,"gBFLBCJwBAEHhEJAAEhABXUIQAAYAQGKIcBiAKBQAGYBIJDEMgzDDAUBjKKocQTC4AIQjCK4JDKHYJRpHEZyCA8EhqGASRAFUQBYiWE4oSpLABQaK0ZwIGyRIrkGQgQgmPYDSDNU4zVIEEglBI0TDNczhNDENgtGYaJqHIYpZBcM40TKkEZoSIITZcRrOEBiRL1S0RBhGcRUHZlWzdN64LhuK47UrWdD/XhdVzXRbjfz1Oq+bxve48Br7A5yYThdr4LhOFQ3RjIL4xbIcUwGe6VZhjOLZXjmO49T69HTtOCYBEBA")
oGrid.VisualAppearance.Add(2,"gBFLBCJwBAEHhEJAAEhABPMIQAAYAQGKIcBiAKBQAGaAoDDcMgwQwAAxjIKUEwsACEIrjKCYVgOHYYQjGMZwHCMIhiGwcAChEZYHgkMYmDAMUhSE78axHG6PY7kKZ4biaKIqQLLEhSfJ0YyBECBZpfebIbjmIZMSLEIxDKItJSpCIaRgqWS6ahGO4JUbUFLQHT9IR4daIYRgEEBA")
oGrid.VisualAppearance.Add(3,"gBFLBCJwBAEHhEJAAEhABUUIQAAYAQGKIcBiAKBQAGaAoDDcMgwQwAAxjIKUEwsACEIrjKCYVgOHYYQjGMZwGAsEwjAoYAChEaILgkMw2DBIQwgJIMEr/G6RZxjeL5CjmG4nDhKMpybAcXxjBIYZJgOQpXb+PobTrNNLzfRFAxVAaWJikcZ4HpIAJNVLFdQ0XYMNSBISsBqrKiKcpeIIDWBZMbRZT1ZABCIZBpEW6LahENQwXrCN74DYkNTdKaxbbuaaXLhGCYBgIA==")
oGrid.HeaderAppearance = 5
oGrid.BackColor = back
oGrid.BackColorHeader = back
oGrid.BackColorLevelHeader = back
oGrid.BackColorSortBar = back
oGrid.BackColorSortBarCaption = back
oGrid.FilterBarBackColor = back
oGrid.FilterBarForeColor = fore
oGrid.ForeColor = fore
oGrid.ForeColorHeader = fore
oGrid.ForeColorSortBar = fore
oGrid.SelBackColor = fore
oGrid.SelForeColor = back
oGrid.Template = "Background(0) = 16777216" // oGrid.Background(0) = 16777216
oGrid.Template = "Background(32) = -1" // oGrid.Background(32) = -1
oGrid.Template = "Background(64) = 50331648" // oGrid.Background(64) = 50331648
oGrid.Template = "Background(65) = back" // oGrid.Background(65) = back
oGrid.Template = "Background(66) = fore" // oGrid.Background(66) = fore
oGrid.Template = "Background(20) = fore" // oGrid.Background(20) = fore
oGrid.Template = "Background(21) = back" // oGrid.Background(21) = back
oGrid.Template = "Background(26) = back" // oGrid.Background(26) = back
oGrid.Template = "Background(27) = fore" // oGrid.Background(27) = fore
oGrid.Template = "Background(28) = back" // oGrid.Background(28) = back
oGrid.Template = "Background(511) = back" // oGrid.Background(511) = back
oGrid.Template = "Description(25) = `<bgcolor 0><fgcolor ffffff> Exclude </fgcolor></bgcolor>`" // oGrid.Description(25) = "<bgcolor 0><fgcolor ffffff> Exclude </fgcolor></bgcolor>"
oGrid.EndUpdate()

1164
I have changed the font, but the item's height remains the same. What I am doing wrong

Dim oGrid as P
Dim var_Items as local

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.BeginUpdate()
oGrid.ColumnAutoResize = .f.
oGrid.LoadXML("http://www.exontrol.net/testing.xml")
oGrid.Font.Size = 22
oGrid.HeaderHeight = 42
oGrid.DefaultItemHeight = 36
' oGrid.Items.ItemHeight(0) = oGrid.DefaultItemHeight
var_Items = oGrid.Items
oGrid.TemplateDef = "dim var_Items"
oGrid.TemplateDef = var_Items
oGrid.Template = "var_Items.ItemHeight(0) = Me.DefaultItemHeight"

oGrid.EndUpdate()

1163
How can I specify the cell's outline, border or lines around, when the cell gets selected

Dim oGrid as P
Dim var_Appearance as P
Dim var_Items as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.BeginUpdate()
oGrid.AttachTemplate("handle AddColumn(Column){Column{Def(48)=4;Def(49)=4;}}")
var_Appearance = oGrid.VisualAppearance
	var_Appearance.Add(1,"gBFLBCJwBAEHhEJAAEhABPEGACAADACAxRDgMQBQKAAzQFAYbBuGCGAAGIYBTgmFgAQhFcZQSpEEg7BKMYwjOJgFgmEQxDANIBQSKoaQiGQYYLhEZAEiONoaDJCM4wHIMQxHCKTZRkGcfaRCGSfIzpGKpVgOTYiTbPcIyQKtBxDIydJTmeQQQhsFIJU7SdVUPDUJZlWbLAwWTAYazXCKRZBpeJqdo6Y5RUDKUqSdLUYyvEq7ZqnOIpw5vICpaCqOp6HqKFpiXSAFL1fLmAwvPKrJjoeqpWpyCaRZQAGg4dbEdTNNCIbatQANKrCSpgZ7sMB6Di2L4TPS2awoWgRYyTFZMbBAeQ7LC1c45Fqrd4zS4dSxKCahcLxFiaNpYZYnjUap1jGPJlkuAgAkidB3nceZsCQEQJCgGhMGcQ4pkiSxEAAOYpiQIhvkYNA2gSCg5n+LIoGILowFyXQoAYAoAmASAWAaAZgggJgKF2T54DYDoDmECBGBKBJgGgTgWgWYRoFYGIGmGOBqByB5hCgegggiYJYgoJIICIaIeByChixULILGGGAWDCCgjCiTgrg0YxojoC4OmOSJ2D6D5kAgJLFgABAEICA=")
	var_Appearance.Add(2,"CP:1 -4 0 0 0")
oGrid.SelBackColor = 33554432
oGrid.SelForeColor = 65536
oGrid.FullRowSelect = 0
oGrid.ShowFocusRect = .f.
oGrid.DefaultItemHeight = 24
oGrid.HeaderHeight = 24
oGrid.DrawGridLines = 2
oGrid.Columns.Add("C1")
oGrid.Columns.Add("C2")
var_Items = oGrid.Items
	' var_Items.CellValue(var_Items.AddItem("Cell 1"),1) = "Cell 2"
	oGrid.TemplateDef = "dim var_Items"
	oGrid.TemplateDef = var_Items
	oGrid.Template = "var_Items.CellValue(AddItem(`Cell 1`),1) = `Cell 2`"

	' var_Items.CellValue(var_Items.AddItem("Cell 3"),1) = "Cell 4"
	oGrid.TemplateDef = "dim var_Items"
	oGrid.TemplateDef = var_Items
	oGrid.Template = "var_Items.CellValue(AddItem(`Cell 3`),1) = `Cell 4`"

oGrid.Items.SelectPos = 1
oGrid.SelectColumnIndex = 1
oGrid.EndUpdate()

1162
How can I specify the cell's outline, border or lines around, when the item gets selected

Dim oGrid as P
Dim var_Items as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.BeginUpdate()
oGrid.AttachTemplate("handle AddColumn(Column){Column{Def(48)=4;Def(49)=4;}}")
oGrid.VisualAppearance.Add(1,"gBFLBCJwBAEHhEJAAEhABPEGACAADACAxRDgMQBQKAAzQFAYbBuGCGAAGIYBTgmFgAQhFcZQSpEEg7BKMYwjOJgFgmEQxDANIBQSKoaQiGQYYLhEZAEiONoaDJCM4wHIMQxHCKTZRkGcfaRCGSfIzpGKpVgOTYiTbPcIyQKtBxDIydJTmeQQQhsFIJU7SdVUPDUJZlWbLAwWTAYazXCKRZBpeJqdo6Y5RUDKUqSdLUYyvEq7ZqnOIpw5vICpaCqOp6HqKFpiXSAFL1fLmAwvPKrJjoeqpWpyCaRZQAGg4dbEdTNNCIbatQANKrCSpgZ7sMB6Di2L4TPS2awoWgRYyTFZMbBAeQ7LC1c45Fqrd4zS4dSxKCahcLxFiaNpYZYnjUap1jGPJlkuAgAkidB3nceZsCQEQJCgGhMGcQ4pkiSxEAAOYpiQIhvkYNA2gSCg5n+LIoGILowFyXQoAYAoAmASAWAaAZgggJgKF2T54DYDoDmECBGBKBJgGgTgWgWYRoFYGIGmGOBqByB5hCgegggiYJYgoJIICIaIeByChixULILGGGAWDCCgjCiTgrg0YxojoC4OmOSJ2D6D5kAgJLFgABAEICA=")
oGrid.SelBackColor = 16777216
oGrid.SelForeColor = 65536
oGrid.ShowFocusRect = .f.
oGrid.DefaultItemHeight = 24
oGrid.HeaderHeight = 24
oGrid.DrawGridLines = 2
oGrid.Columns.Add("C1")
oGrid.Columns.Add("C2")
var_Items = oGrid.Items
	' var_Items.CellValue(var_Items.AddItem("Cell 1"),1) = "Cell 2"
	oGrid.TemplateDef = "dim var_Items"
	oGrid.TemplateDef = var_Items
	oGrid.Template = "var_Items.CellValue(AddItem(`Cell 1`),1) = `Cell 2`"

	' var_Items.CellValue(var_Items.AddItem("Cell 3"),1) = "Cell 4"
	oGrid.TemplateDef = "dim var_Items"
	oGrid.TemplateDef = var_Items
	oGrid.Template = "var_Items.CellValue(AddItem(`Cell 3`),1) = `Cell 4`"

	var_Items.SelectPos = 1
oGrid.EndUpdate()

1161
How can I specify the cell's outline, border or lines around

Dim h as N
Dim oGrid as P
Dim var_Items as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.BeginUpdate()
oGrid.AttachTemplate("handle AddColumn(Column){Column{Def(48)=4;Def(49)=4;}}")
oGrid.VisualAppearance.Add(1,"gBFLBCJwBAEHhEJAAEhABPEGACAADACAxRDgMQBQKAAzQFAYbBuGCGAAGIYBTgmFgAQhFcZQSpEEg7BKMYwjOJgFgmEQxDANIBQSKoaQiGQYYLhEZAEiONoaDJCM4wHIMQxHCKTZRkGcfaRCGSfIzpGKpVgOTYiTbPcIyQKtBxDIydJTmeQQQhsFIJU7SdVUPDUJZlWbLAwWTAYazXCKRZBpeJqdo6Y5RUDKUqSdLUYyvEq7ZqnOIpw5vICpaCqOp6HqKFpiXSAFL1fLmAwvPKrJjoeqpWpyCaRZQAGg4dbEdTNNCIbatQANKrCSpgZ7sMB6Di2L4TPS2awoWgRYyTFZMbBAeQ7LC1c45Fqrd4zS4dSxKCahcLxFiaNpYZYnjUap1jGPJlkuAgAkidB3nceZsCQEQJCgGhMGcQ4pkiSxEAAOYpiQIhvkYNA2gSCg5n+LIoGILowFyXQoAYAoAmASAWAaAZgggJgKF2T54DYDoDmECBGBKBJgGgTgWgWYRoFYGIGmGOBqByB5hCgegggiYJYgoJIICIaIeByChixULILGGGAWDCCgjCiTgrg0YxojoC4OmOSJ2D6D5kAgJLFgABAEICA=")
oGrid.SelBackMode = 1
oGrid.ShowFocusRect = .f.
oGrid.DefaultItemHeight = 24
oGrid.HeaderHeight = 24
oGrid.DrawGridLines = 2
oGrid.Columns.Add("C1")
oGrid.Columns.Add("C2")
var_Items = oGrid.Items
	' var_Items.CellValue(var_Items.AddItem("Cell 1"),1) = "Cell 2"
	oGrid.TemplateDef = "dim var_Items"
	oGrid.TemplateDef = var_Items
	oGrid.Template = "var_Items.CellValue(AddItem(`Cell 1`),1) = `Cell 2`"

	h = var_Items.AddItem("Cell 2")
	' var_Items.CellValue(h,1) = "Cell 3"
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellValue(h,1) = `Cell 3`"

	' var_Items.CellBackColor(h,1) = 16777216
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellBackColor(h,1) = 16777216"

oGrid.EndUpdate()

1160
Is it possible to highligth the match while a filter is applied

' Fired after a new column has been added.
function AddColumn as v (Column  as  OLE::Exontrol.Grid.1::IColumn)
	' Column.Def(17) = 1
	oGrid = topparent:CONTROL_ACTIVEX1.activex
end function

' Occurs when filter was changed.
function FilterChange as v ()
	Dim format as 
	oGrid = topparent:CONTROL_ACTIVEX1.activex
	format = oGrid.FormatABC("`value replace '` + value + `' with '<bgcolor 000000><fgcolor FFFFFF>` + value  + `</fgcolor></bgcolor>'`",oGrid.FilterBarPromptPattern)
	oGrid.Columns.Item(0).FormatColumn = format
	oGrid.Columns.Item(1).FormatColumn = format
end function

Dim oGrid as P
Dim var_Items as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.BeginUpdate()
oGrid.DrawGridLines = 2
oGrid.HeaderAppearance = 4
oGrid.Columns.Add("Col 1")
oGrid.Columns.Add("Col 2")
var_Items = oGrid.Items
	' var_Items.CellValue(var_Items.AddItem("219 Smith"),1) = "Ignacio 1234"
	oGrid.TemplateDef = "dim var_Items"
	oGrid.TemplateDef = var_Items
	oGrid.Template = "var_Items.CellValue(AddItem(`219 Smith`),1) = `Ignacio 1234`"

	' var_Items.CellValue(var_Items.AddItem("1666 County Road 309A"),1) = "897 Manassa"
	oGrid.TemplateDef = "dim var_Items"
	oGrid.TemplateDef = var_Items
	oGrid.Template = "var_Items.CellValue(AddItem(`1666 County Road 309A`),1) = `897 Manassa`"

	' var_Items.CellValue(var_Items.AddItem("38 Lone Pine"),1) = "Durango 11"
	oGrid.TemplateDef = "dim var_Items"
	oGrid.TemplateDef = var_Items
	oGrid.Template = "var_Items.CellValue(AddItem(`38 Lone Pine`),1) = `Durango 11`"

	' var_Items.CellValue(var_Items.AddItem("612 Jachim Street"),1) = "Lamar 222"
	oGrid.TemplateDef = "dim var_Items"
	oGrid.TemplateDef = var_Items
	oGrid.Template = "var_Items.CellValue(AddItem(`612 Jachim Street`),1) = `Lamar 222`"

oGrid.FilterBarPromptPattern = "1"
oGrid.FilterBarPromptVisible = 2067 'exFilterBarCompact + exFilterBarSingleLine + exFilterBarVisible + exFilterBarPromptVisible
oGrid.FilterBarPromptType = 257 'exFilterPromptCaseSensitive + exFilterPromptContainsAll
oGrid.EndUpdate()

1159
How can I replace the cell's context menu ( while edit mode is running )

' Fired when right mouse button is clicked
function RClick as v ()
	Dim var_ExContextMenu as P
	oGrid = topparent:CONTROL_ACTIVEX1.activex
	? "Edit Mode: " 
	? oGrid.Editing 
	var_ExContextMenu = OLE.Create("Exontrol.ContextMenu")
		var_ExContextMenu.Items.ToString = "Check[chk],[sep],Item 1,Item 2,Item 3,Popup(A,B,C)"
		? var_ExContextMenu.Select() 
end function

Dim oGrid as P
Dim var_Editor as P
Dim var_Items as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.BeginUpdate()
oGrid.HeaderAppearance = 1
var_Editor = oGrid.Columns.Add("Column").Editor
	var_Editor.EditType = 1
	' var_Editor.Option(202) = .f.
	oGrid.TemplateDef = "dim var_Editor"
	oGrid.TemplateDef = var_Editor
	oGrid.Template = "var_Editor.Option(202) = False"

var_Items = oGrid.Items
	var_Items.AddItem("Item 1")
	var_Items.AddItem("Item 2")
oGrid.EndUpdate()

1158
Is it possible to highlight the column's header once a filter is applied (sample 2)

Dim h as N
Dim oGrid as P
Dim var_Appearance as P
Dim var_Column as local
Dim var_Column1 as P
Dim var_Column2 as local
Dim var_Columns as P
Dim var_Items as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.BeginUpdate()
var_Appearance = oGrid.VisualAppearance
	var_Appearance.Add(1,"gBFLBCJwBAEHhEJAAEhABO8GACAADACAxRDgMQBQKAAzQFAYbBuGCGAAGIYBTgmFgAQhFcZQSKUOQTDKNYykCIRSDUJYkSZEIyjBI8ExXFqNACkGKwQgmNYDSBMcbwSAsXRYFocJ5gOT6AjKBA2UclEZpajiTY3ABUEgUS5oOBIACqariaQJAAiCRQGiYZyHKaRSwPBKFYDIIjbJheTIDChNVxUcDENQjJqLBIDRzbarye59YBfeBXdgmA4LQbDMRwNgMMQTDqKYbkOQZHbeGKAWTMEZzJj8cxTEqIaBhGTLfojSZMS7UGK1LLtMyHI6kP7sOiLfi2W4/W7XV72F79TzXIa2ZBuO57bhnAZ/VzGNj4PRNezfRqicjsGxcZwXg+TpQj0ew6gSOw7wSbozjsfYXi8PwMnSc52leHotl+MxjmoXh2nybxOH+SQtnYXx+D2P4vGMB56hQf5PCgBYeDwYBCEo1xggebgKH6IIDBYBgkiAQ5FgYPAhEIRgWGqDBoC4GoCiGCBYhGBQPAWdIQp0eIUiWCZigiJgqgqYpIioJQhmIMhBH0NxjEMag2g2Y4ImYOoOmOSJeDQNxXlOLR3ECUAQICA=")
	var_Appearance.Add(2,"gBFLBCJwBAEHhEJAAEhABgsHQAAYAQGKIcBiAKBQAGaAoDDYNwwQwAAxDAKcEwsACEIrjKCRShyCYZRrGUgRCKQahLEiTIhGUYJHgmK4tRoAUgxWCEExrAaQJjjeCQFi6LAtDhPMByfQEZQIGyjkgjNLUcSbG4AKgkCiXfpUAJVP7FcgSABEEigNIxToOU4jFgeCYLQKQRK2RC9GQGFCbLhpYKIahGTYWVheN5XXblez9P7ABQwKCcAwXBp7YIKAT4XBIdYdQ7IL4xGA0AJPFoJC7mOQ5XiYAIBAZ/RL0LCcbxHHafVboQj6JouD5PUDVNY1XBdPynI6CbLhWy6Dq4UZzPwzeBifSHfDjRoJcCZe71KY3GwSEboNA6Kp+QBHAmZoZjSPYIEiF47lOLJVnuYofBwJJHmaQoYj0MIRHeM4/m6cJ8B+fpBHQJ5SGKPYYH8OYMk+P5Bn4fxaAYZAvEIX4RgUWBGgCCAmAqApgkgNgOgMEYlGASoEkQeBWBaBZhggZgagaYRoEwShWA6NZZAMQBAICA==")
oGrid.Template = "Background(0) = 16777216" // oGrid.Background(0) = 16777216
oGrid.Template = "Background(41) = 33554432" // oGrid.Background(41) = 33554432
oGrid.Template = "Background(32) = -1" // oGrid.Background(32) = -1
oGrid.HeaderHeight = 28
oGrid.BackColorHeader = 16777215
oGrid.DrawGridLines = -2
oGrid.HeaderVisible = .t.
var_Columns = oGrid.Columns
	' var_Columns.Add("C1").DisplayFilterButton = .t.
	var_Column = var_Columns.Add("C1")
	oGrid.TemplateDef = "dim var_Column"
	oGrid.TemplateDef = var_Column
	oGrid.Template = "var_Column.DisplayFilterButton = True"

	var_Column1 = var_Columns.Add("C2")
		var_Column1.DisplayFilterButton = .t.
		var_Column1.Filter = "Item 2"
		var_Column1.FilterType = 240
	' var_Columns.Add("C3").DisplayFilterButton = .t.
	var_Column2 = var_Columns.Add("C3")
	oGrid.TemplateDef = "dim var_Column2"
	oGrid.TemplateDef = var_Column2
	oGrid.Template = "var_Column2.DisplayFilterButton = True"

var_Items = oGrid.Items
	h = var_Items.AddItem("Item 1")
	' var_Items.CellValue(h,1) = "Item 2"
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellValue(h,1) = `Item 2`"

	' var_Items.CellValue(h,2) = "Item 3"
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellValue(h,2) = `Item 3`"

	h = var_Items.AddItem("Item 4")
	' var_Items.CellValue(h,1) = "Item 5"
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellValue(h,1) = `Item 5`"

	' var_Items.CellValue(h,2) = "Item 6"
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellValue(h,2) = `Item 6`"

oGrid.ApplyFilter()
oGrid.EndUpdate()

1157
How can I make the expand/collapse glyphs DPI aware

Dim h as N
Dim oGrid as P
Dim size as 
Dim var_Appearance as P
Dim var_Items as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
size = 2
oGrid.BeginUpdate()
var_Appearance = oGrid.VisualAppearance
	var_Appearance.Add(3,"gBFLBCJwBAEHhEJAAEhEGAUHQAAYAQGKIcBiAKBQAGaAoDDYOA4QwAAxDAKcEwsACEIrjKCRShyCYZRhGcTSBCIZBqEqSZLiEZRQiiCYsS5GQBRfIUEghGyNZjgNzQcCQAI8T5IUgARBJIDS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VoFRpjWIYNY1QS7TLOczzfRdDxTiGVpkjCeJoD4Ng1hSRxiisVRKg8D4PkWZJznmPQ+F8Xx5guWpjHGWYMiYQodEaIRSCgU5KCSeh3naHB/iAAh9n8fwfgIeZ1CgXwjCCAhxl8AgIlAM4MlKAIcCaD54FYFoFmGCBmBaBIJigPJNgKSAoDSVC+BIbIYCUYYoiYKoJgkWIMlGCAglMaJZDWCYiFyFIJkkOJYhEJc7G4PYPCOaJshQJBjgiVIUgyDRokEaggGSQ4El4N1CBiFgnAmAhaFKFZlFkShUhWJRYmITg3GSQgFGuGBOGOFJkCSSQCDoNgkiOCY0hUJJmmmQhvhqZtYmUOQmBWIRvhgTpjjSbAjEiEgchBZgyEaBIhigWgegqIhIjoDILiACB5nTL5WnWRYOiSKYJnqGQ7CmOh2hqJ5OkYORxFyShKhSAxihkOomioY5YiqFIkFyTo1HkAxAEAgIA==")
	var_Appearance.Add(1,oGrid.FormatABC("`CP:3 -` + int(value*dpi) + ` -` + int(value*dpi) + ` ` +  int(value*dpi) + ` ` + int(value*dpi)",size))
	var_Appearance.Add(2,oGrid.FormatABC("`CP:4 -` + int(value*dpi) + ` -` + int(value*dpi) + ` ` +  int(value*dpi) + ` ` + int(value*dpi)",size))
oGrid.LinesAtRoot = 1
oGrid.HasButtons = 4
oGrid.Template = "HasButtonsCustom(0) = 16777216" // oGrid.HasButtonsCustom(.f.) = 16777216
oGrid.Template = "HasButtonsCustom(1) = 33554432" // oGrid.HasButtonsCustom(.t.) = 33554432
oGrid.Columns.Add("Column")
var_Items = oGrid.Items
	h = var_Items.AddItem("Root 1")
	var_Items.InsertItem(h,,"Child 1")
	var_Items.InsertItem(h,,"Child 2")
	' var_Items.ExpandItem(h) = .t.
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.ExpandItem(h) = True"

	h = var_Items.AddItem("Root 2")
	var_Items.InsertItem(h,,"Child")
oGrid.EndUpdate()

1156
Is it possible to highlight the column's header once a filter is applied (sample 1)

Dim h as N
Dim oGrid as P
Dim var_Appearance as P
Dim var_Column as local
Dim var_Column1 as P
Dim var_Column2 as local
Dim var_Columns as P
Dim var_Items as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.BeginUpdate()
var_Appearance = oGrid.VisualAppearance
	var_Appearance.Add(2,"gBFLBCJwBAEHhEJAAEhABX8GACAADACAxSDEMQBQKAAzQFAYbhgHCGAAGQaBUgmFgAQhFcZQSKUOQTDKNYykCIRSDUJYkSZEIyjBI8ExXFqNACkGKwYgmNYiTLAcgANJ0WBaGIZJ4gOT5fDKMoEDRRYADFCscwxJybQAqGQKKb+VgAVY/cTyBIAEQSKA0TDOQ5TSKWB4JPZQRBEbZMNBtBIUJquKaqShdQJCU5FdY3Xblez9P7AMBwLFEC4NQ8YNYuPhjR4dRTIMhvVAsUArFh8Zg9GZZFjmDIDT4ydBLTQwcyVIKnP5qOa6XbmPoCQDYKxZHYxPzVDa3axuL76dqCAT7XrXNy1TbNRrzQKfcJqfCbdw2YaDZLOOT3fjuI4hhKaRzFAHJ+jYQ4xHuY4gHuGIXGeExqC8Tp6C+PoEm+G5ImycRgh0XwvDGa5rgOeoejyXwnFeQp2mkf5ClgBB9gCWIYAwfYAEKV58mkdwOggNArgOXY2EWLoDkKOA0mgbhOGgZApgaSBIHWSYHSmbApgYThmESZYJkIeIkgeCpfliLIHgpMIcmUYYYmODAlg2SI4mWfRfGOEguDcCRjFYAJihCQhJBSDoRmONgKEcI4kFCEJhhOVYTmYnAlEAQhWBMJYJGYWoWmWSR2F6F5lnkWAQhUAgpEieRWEuSYkjWGpmkmNhuhuZwJkYcocmaaYkjyEhngnUA6lEFAlAEgI=")
	var_Appearance.Add(1,"CP:2 -8 -4 2 4")
oGrid.Template = "Background(0) = 33488638" // oGrid.Background(0) = 33488638
oGrid.Template = "Background(41) = 16843009" // oGrid.Background(41) = 16843009
oGrid.Template = "Background(32) = -1" // oGrid.Background(32) = -1
oGrid.HeaderHeight = 28
oGrid.BackColorHeader = 16777215
oGrid.DrawGridLines = -2
oGrid.HeaderVisible = .t.
var_Columns = oGrid.Columns
	' var_Columns.Add("C1").DisplayFilterButton = .t.
	var_Column = var_Columns.Add("C1")
	oGrid.TemplateDef = "dim var_Column"
	oGrid.TemplateDef = var_Column
	oGrid.Template = "var_Column.DisplayFilterButton = True"

	var_Column1 = var_Columns.Add("C2")
		var_Column1.DisplayFilterButton = .t.
		var_Column1.Filter = "Item 2"
		var_Column1.FilterType = 240
	' var_Columns.Add("C3").DisplayFilterButton = .t.
	var_Column2 = var_Columns.Add("C3")
	oGrid.TemplateDef = "dim var_Column2"
	oGrid.TemplateDef = var_Column2
	oGrid.Template = "var_Column2.DisplayFilterButton = True"

var_Items = oGrid.Items
	h = var_Items.AddItem("Item 1")
	' var_Items.CellValue(h,1) = "Item 2"
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellValue(h,1) = `Item 2`"

	' var_Items.CellValue(h,2) = "Item 3"
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellValue(h,2) = `Item 3`"

	h = var_Items.AddItem("Item 4")
	' var_Items.CellValue(h,1) = "Item 5"
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellValue(h,1) = `Item 5`"

	' var_Items.CellValue(h,2) = "Item 6"
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellValue(h,2) = `Item 6`"

oGrid.ApplyFilter()
oGrid.EndUpdate()

1155
How do I update itemcount and matchitemcount of the FilterBarCaption after I added the item using the AddItem method
' Occurs when the user presses and then releases the left mouse button over the grid control.
function Click as v ()
	oGrid = topparent:CONTROL_ACTIVEX1.activex
	oGrid.Items.AddItem("new")
	oGrid.Refresh()
end function

Dim oGrid as P
Dim var_Column as P
Dim var_Column1 as P
Dim var_Items as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.BeginUpdate()
var_Column = oGrid.Columns.Add("Item")
	var_Column.DisplayFilterButton = .t.
	var_Column.FilterList = 9504 'exShowExclude + exShowFocusItem + exShowCheckBox + exSortItemsAsc
var_Column1 = oGrid.Columns.Add("Pos")
	var_Column1.AllowSizing = .f.
	var_Column1.AllowSort = .f.
	var_Column1.Width = 32
	var_Column1.FormatColumn = "1 apos ``"
	var_Column1.Position = 0
var_Items = oGrid.Items
	var_Items.AddItem("Item A")
	var_Items.AddItem("Item B")
	var_Items.AddItem("Item C")
oGrid.FilterBarCaption = "`<r>` + value + `</b><fgcolor=808080>` + ( matchitemcount < 0 ? ( ( len(value) ? `<br>` : `` ) + `<r>` + abs(matchitemcount + 1) + ` result(s)` ) : (`<fgcolor=808080>`+ itemcount + ` item(s)`) )"
oGrid.FilterBarPromptVisible = 3591 'exFilterBarCompact + exFilterBarShowCloseOnRight + exFilterBarShowCloseIfRequired + exFilterBarCaptionVisible + exFilterBarVisible + exFilterBarPromptVisible
oGrid.EndUpdate()

1154
I can't get values in the column properly centered. What can be the problem

Dim oGrid as P
Dim var_Column as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.BeginUpdate()
oGrid.TreeColumnIndex = -1
oGrid.DrawGridLines = -2
var_Column = oGrid.Columns.Add("Default")
	var_Column.Alignment = 1
	var_Column.FormatColumn = "ltrim(rtrim(value))"
oGrid.Items.AddItem("item 1            ")
oGrid.Items.AddItem("             item 2")
oGrid.Items.AddItem("   item 3                ")
oGrid.EndUpdate()

1153
The Edit method does not work while ReadOnly property is exLocked and the first column is hidden. Is there any fix

' Occurs when the user dblclk the left mouse button over an object.
function DblClick as v (Shift  as  N,X  as  OLE::Exontrol.Grid.1::OLE_XPOS_PIXELS,Y  as  OLE::Exontrol.Grid.1::OLE_YPOS_PIXELS)
	Dim var_ItemFromPoint as N
	oGrid = topparent:CONTROL_ACTIVEX1.activex
	var_ItemFromPoint = oGrid.ItemFromPoint(-1,-1,c,hit)
	oGrid.FocusColumnIndex = c
	oGrid.Edit()
end function

Dim oGrid as P
Dim var_Column as local
Dim var_Column1 as P
Dim var_Items as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.BeginUpdate()
oGrid.HeaderAppearance = 4
oGrid.AutoEdit = .f.
oGrid.ReadOnly = 1
oGrid.AutoSearch = .t.
' oGrid.Columns.Add("").Visible = .f.
var_Column = oGrid.Columns.Add("")
oGrid.TemplateDef = "dim var_Column"
oGrid.TemplateDef = var_Column
oGrid.Template = "var_Column.Visible = False"

var_Column1 = oGrid.Columns.Add("Contains")
	var_Column1.AutoSearch = 1
	var_Column1.Editor.EditType = 1
var_Items = oGrid.Items
	' var_Items.CellValue(var_Items.AddItem(),1) = "Tom Hanks"
	oGrid.TemplateDef = "dim var_Items"
	oGrid.TemplateDef = var_Items
	oGrid.Template = "var_Items.CellValue(AddItem(),1) = `Tom Hanks`"

	' var_Items.CellValue(var_Items.AddItem(),1) = "Leonardo DiCaprio"
	oGrid.TemplateDef = "dim var_Items"
	oGrid.TemplateDef = var_Items
	oGrid.Template = "var_Items.CellValue(AddItem(),1) = `Leonardo DiCaprio`"

	' var_Items.CellValue(var_Items.AddItem(),1) = "Will Smith"
	oGrid.TemplateDef = "dim var_Items"
	oGrid.TemplateDef = var_Items
	oGrid.Template = "var_Items.CellValue(AddItem(),1) = `Will Smith`"

	' var_Items.CellValue(var_Items.AddItem(),1) = "Tom Cruise"
	oGrid.TemplateDef = "dim var_Items"
	oGrid.TemplateDef = var_Items
	oGrid.Template = "var_Items.CellValue(AddItem(),1) = `Tom Cruise`"

oGrid.EndUpdate()

1152
How can I enable the Undo/Redo feature

Dim h as N
Dim oGrid as P
Dim var_Column as P
Dim var_Column1 as P
Dim var_Items as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.BeginUpdate()
oGrid.AllowUndoRedo = .t.
oGrid.LinesAtRoot = -1
oGrid.HeaderAppearance = 4
var_Column = oGrid.Columns.Add("P1")
	' var_Column.Def(0) = .t.
	oGrid.TemplateDef = "dim var_Column"
	oGrid.TemplateDef = var_Column
	oGrid.Template = "var_Column.Def(0) = True"

	var_Column.PartialCheck = .t.
var_Column1 = oGrid.Columns.Add("P2")
	' var_Column1.Def(0) = .t.
	oGrid.TemplateDef = "dim var_Column1"
	oGrid.TemplateDef = var_Column1
	oGrid.Template = "var_Column1.Def(0) = True"

	var_Column1.PartialCheck = .t.
var_Items = oGrid.Items
	h = var_Items.AddItem("Root")
	var_Items.InsertItem(h,,"Child 1")
	var_Items.InsertItem(h,,"Child 2")
	' var_Items.ExpandItem(h) = .t.
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.ExpandItem(h) = True"

	var_Items.AddItem("Press CTRL + Z for Undo, and CTRL + Y for Redo")
oGrid.EndUpdate()

1151
The incremental search feature is no working for columns with editor assigned. What can be done

' Occurs when the user dblclk the left mouse button over an object.
function DblClick as v (Shift  as  N,X  as  OLE::Exontrol.Grid.1::OLE_XPOS_PIXELS,Y  as  OLE::Exontrol.Grid.1::OLE_YPOS_PIXELS)
	oGrid = topparent:CONTROL_ACTIVEX1.activex
	oGrid.Edit()
end function

Dim oGrid as P
Dim var_Column as P
Dim var_Items as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.BeginUpdate()
oGrid.HeaderAppearance = 4
oGrid.AutoEdit = .f.
oGrid.AutoSearch = .t.
var_Column = oGrid.Columns.Add("Contains")
	var_Column.AutoSearch = 1
	var_Column.Editor.EditType = 1
var_Items = oGrid.Items
	var_Items.AddItem("Tom Hanks")
	var_Items.AddItem("Leonardo DiCaprio")
	var_Items.AddItem("Will Smith")
	var_Items.AddItem("Tom Cruise")
oGrid.EndUpdate()

1150
Each item is representated by a key as string. Is it possible to have a drop down editor to display more information when using the item's key

Dim oGrid as P
Dim var_Editor as P
Dim var_Items as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.BeginUpdate()
oGrid.HeaderAppearance = 4
var_Editor = oGrid.Columns.Add("Multiple-Columns Tree DropDownListType").Editor
	var_Editor.EditType = 3
	var_Editor.AddItem(0,"KR|Korea, Republic of")
	var_Editor.AddItem(1,"MO|Macao")
	var_Editor.AddItem(2,"SA|Saudi Arabia")
	var_Editor.AddItem(3,"EG|Egypt")
	var_Editor.AddItem(4,"GB|United Kingdom")
	var_Editor.AddItem(5,"GT|Guatemala")
	var_Editor.AddItem(6,"SR|Suriname")
	var_Editor.AddItem(7,"BM|Bermuda")
var_Items = oGrid.Items
	var_Items.AddItem("EG")
	var_Items.AddItem("GB")
	var_Items.AddItem("BM")
oGrid.EndUpdate()

1149
My table includes codes/keys for items, can I display a drop down editor to include more information

Dim oGrid as P
Dim var_Editor as P
Dim var_Items as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.BeginUpdate()
oGrid.HeaderAppearance = 4
var_Editor = oGrid.Columns.Add("Multiple-Columns DropDownListType").Editor
	var_Editor.EditType = 3
	var_Editor.DropDownAutoWidth = 0
	' var_Editor.Option(57) = "City¦Coordinates¦State"
	oGrid.TemplateDef = "dim var_Editor"
	oGrid.TemplateDef = var_Editor
	oGrid.Template = "var_Editor.Option(57) = `City¦Coordinates¦State`"

	var_Editor.AddItem(0,"JV3|Jollyville¦3026N 09746W¦Texas")
	var_Editor.AddItem(1,"TMO|Altamont¦4021N 11017W¦Utah")
	var_Editor.AddItem(2,"IIM|Williamston¦4241N 08417W¦Michigan")
	var_Editor.AddItem(3,"IWN|Merrittstown¦3958N 07952W¦Pennsylvania")
	var_Editor.AddItem(4,"HOU|Houston¦2945N 09521W¦Texas")
	var_Editor.AddItem(5,"GSF|Gales Ferry¦4125N 07205W¦Connecticut")
var_Items = oGrid.Items
	var_Items.AddItem("HOU")
	var_Items.AddItem("IIM")
	var_Items.AddItem("TMO")
oGrid.EndUpdate()

1148
How can I display and select from a multiple-columns tree editor

Dim oGrid as P
Dim var_Editor as P
Dim var_Items as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.BeginUpdate()
oGrid.Images("gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTqlVq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m0ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/yNAOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA=")
oGrid.HeaderAppearance = 4
var_Editor = oGrid.Columns.Add("Multiple-Columns Tree DropDownListType").Editor
	var_Editor.EditType = 3
	var_Editor.DropDownAutoWidth = 0
	' var_Editor.Option(57) = "Name¦Title¦City¦Phone"
	oGrid.TemplateDef = "dim var_Editor"
	oGrid.TemplateDef = var_Editor
	oGrid.Template = "var_Editor.Option(57) = `Name¦Title¦City¦Phone`"

	' var_Editor.Option(58) = "224¦¦¦96"
	oGrid.TemplateDef = "dim var_Editor"
	oGrid.TemplateDef = var_Editor
	oGrid.Template = "var_Editor.Option(58) = `224¦¦¦96`"

	var_Editor.AddItem(1,"Nancy Davolio¦Sales Representative¦Seattle¦(206) 555-9857",1)
	var_Editor.AddItem(2,"Andrew Fuller¦<b>Vice President</b>, Sales¦Tacoma¦(206) 555-9482",2)
	var_Editor.InsertItem(3,"Janet Leverling¦Sales Representative¦Kirkland¦(206) 555-3412",3,2)
	var_Editor.InsertItem(4,"Peacock Margaret¦Sales Representative¦Redmond¦(206) 555-8122",3,2)
	var_Editor.InsertItem(5,"Steven Buchanan¦Sales Manager¦London¦(71) 555-4848",2,2)
	var_Editor.InsertItem(6,"Michael Suyama¦Sales Representative¦London¦(71) 555-7773",1,5)
	var_Editor.InsertItem(7,"Robert King¦Sales Representative¦Kirkland¦(71) 555-5598",2,2)
	var_Editor.InsertItem(8,"Laura Callahan¦Inside Sales Coordinator¦Seattle¦(206) 555-1189",3,2)
	var_Editor.InsertItem(9,"Anne Dodsworth¦Sales Representative¦London¦(71) 555-4444",2,5)
	var_Editor.ExpandAll()
var_Items = oGrid.Items
	var_Items.AddItem(1)
	var_Items.AddItem(2)
	var_Items.AddItem(4)
oGrid.EndUpdate()

1147
Does you control support multiple-columns for a drop down editor

Dim oGrid as P
Dim var_Editor as P
Dim var_Items as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.BeginUpdate()
oGrid.HeaderAppearance = 4
var_Editor = oGrid.Columns.Add("Multiple-Columns DropDownListType").Editor
	var_Editor.EditType = 3
	var_Editor.DropDownAutoWidth = 0
	var_Editor.AddItem(0,"Jollyville¦JV3¦3026N 09746W¦TX")
	var_Editor.AddItem(1,"Altamont¦TMO¦4021N 11017W¦UT")
	var_Editor.AddItem(2,"Williamston¦IIM¦4241N 08417W¦MI")
	var_Editor.AddItem(3,"Merrittstown¦IWN¦3958N 07952W¦PA")
	var_Editor.AddItem(4,"Houston¦HOU¦2945N 09521W¦TX")
	var_Editor.AddItem(5,"Gales Ferry¦GSF¦4125N 07205W¦CT")
var_Items = oGrid.Items
	var_Items.InsertItem(0,"",1)
	var_Items.InsertItem(0,"",2)
	var_Items.InsertItem(0,"",4)
oGrid.EndUpdate()

1146
Is it possible to show the filterbar on top of the rows

Dim oGrid as P
Dim var_Column as P
Dim var_Column1 as P
Dim var_Items as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.BeginUpdate()
oGrid.FilterBarPromptVisible = 8192
oGrid.HeaderHeight = 24
oGrid.FilterBarHeight = oGrid.HeaderHeight
oGrid.HeaderAppearance = 1
oGrid.DrawGridLines = -1
oGrid.GridLineStyle = 512
var_Column = oGrid.Columns.Add("Column")
	var_Column.DisplayFilterButton = .t.
	var_Column.FilterType = 3
	var_Column.Filter = "B*"
var_Column1 = oGrid.Columns.Add("Index")
	var_Column1.FormatColumn = "1 index ``"
	var_Column1.Position = 0
	var_Column1.Width = 48
	var_Column1.AllowSizing = .f.
	var_Column1.SortType = 1
	' var_Column1.Def(0) = .t.
	oGrid.TemplateDef = "dim var_Column1"
	oGrid.TemplateDef = var_Column1
	oGrid.Template = "var_Column1.Def(0) = True"

var_Items = oGrid.Items
	var_Items.AddItem("A.1")
	var_Items.AddItem("A.2")
	var_Items.AddItem("B.1")
	var_Items.AddItem("B.2")
	var_Items.AddItem("B.3")
	var_Items.AddItem("C")
oGrid.ApplyFilter()
oGrid.EndUpdate()

1145
DragDrop (with visual effect)

' Occurs when a source component is dropped onto a target component when the source component determines that a drop can occur.
function OLEDragDrop as v (Data  as  OLE::Exontrol.Grid.1::IExDataObject,Effect  as  N,Button  as  N,Shift  as  N,X  as  OLE::Exontrol.Grid.1::OLE_XPOS_PIXELS,Y  as  OLE::Exontrol.Grid.1::OLE_YPOS_PIXELS)
	' SelectItem(InsertItem(i,, Data.GetData(1))) = True
	Dim i as N
	Dim var_Items as P
	oGrid = topparent:CONTROL_ACTIVEX1.activex
	i = oGrid.ItemFromPoint(-1,-1,c,hit)
	var_Items = oGrid.Items
		' var_Items.ExpandItem(i) = .t.
		oGrid.TemplateDef = "dim var_Items,i"
		oGrid.TemplateDef = var_Items
		oGrid.TemplateDef = i
		oGrid.Template = "var_Items.ExpandItem(i) = True"

end function

' Occurs when the OLEDrag method is called.
function OLEStartDrag as v (Data  as  OLE::Exontrol.Grid.1::IExDataObject,AllowedEffects  as  N)
	' Data.SetData(Me.Items.CellCaption(FocusItem, 0), 1)
	oGrid = topparent:CONTROL_ACTIVEX1.activex
	AllowedEffects = 1
end function

Dim h as N
Dim oGrid as P
Dim var_Items as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.VisualAppearance.Add(1,"gBFLBCJwBAEHhEJAAEhABPUIQAAYAQGKIcBiAKBQAGaAoDgYN4MAANAwjJBMKgBBCLIxhEYobgmGIaRjEEQDCKYcxHCaIBiGcaIfDEBIeSBHcgRbAcOQHGSZZBhGRJGjuKIbSrLICzBDUcRnGwAKQoaaaEomHwyAZOYwDAIoWhpKKCKjqWJKNb+XgAAJTES0RRVRTNAZ1YghGAQgIA==")
oGrid.Template = "Background(96) = 16777216" // oGrid.Background(96) = 16777216
oGrid.Template = "Background(33) = 0" // oGrid.Background(33) = 0
oGrid.Template = "Background(34) = 16777215" // oGrid.Background(34) = 16777215
oGrid.OLEDropMode = 1
oGrid.AutoDrag = 196608
oGrid.LinesAtRoot = -1
oGrid.Indent = 16
oGrid.SelBackMode = 1
oGrid.Columns.Add("Default")
var_Items = oGrid.Items
	h = var_Items.AddItem("Root")
	var_Items.InsertItem(h,,"Child 1")
	var_Items.InsertItem(h,,"Child 2")
	' var_Items.ExpandItem(h) = .t.
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.ExpandItem(h) = True"

? "You can:" 
? "A) left-click to drag and drop items between controls (open a new exhelper and run the same sample)" 
? "B) right-click to re-arrange the item position inside the same control" 
? "This sample shows how you can insert the data being dropped as a child of the item being hovered." 

1144
DragDrop (with no visual effect, hide item while drag and drop)

' Occurs when a source component is dropped onto a target component when the source component determines that a drop can occur.
function OLEDragDrop as v (Data  as  OLE::Exontrol.Grid.1::IExDataObject,Effect  as  N,Button  as  N,Shift  as  N,X  as  OLE::Exontrol.Grid.1::OLE_XPOS_PIXELS,Y  as  OLE::Exontrol.Grid.1::OLE_YPOS_PIXELS)
	' SelectItem(InsertItem(i,, Data.GetData(1))) = True
	Dim i as N
	Dim var_Items as P
	oGrid = topparent:CONTROL_ACTIVEX1.activex
	i = oGrid.ItemFromPoint(-1,-1,c,hit)
	var_Items = oGrid.Items
		' var_Items.ExpandItem(i) = .t.
		oGrid.TemplateDef = "dim var_Items,i"
		oGrid.TemplateDef = var_Items
		oGrid.TemplateDef = i
		oGrid.Template = "var_Items.ExpandItem(i) = True"

end function

' Occurs when the OLEDrag method is called.
function OLEStartDrag as v (Data  as  OLE::Exontrol.Grid.1::IExDataObject,AllowedEffects  as  N)
	' Data.SetData(Me.Items.CellCaption(FocusItem, 0), 1)
	oGrid = topparent:CONTROL_ACTIVEX1.activex
	AllowedEffects = 1
end function

Dim h as N
Dim oGrid as P
Dim var_Items as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.Template = "Background(33) = 0" // oGrid.Background(33) = 0
oGrid.Template = "Background(34) = 16777215" // oGrid.Background(34) = 16777215
oGrid.OLEDropMode = 1
oGrid.AutoDrag = 196608
oGrid.LinesAtRoot = -1
oGrid.Indent = 16
oGrid.SelBackMode = 1
oGrid.Columns.Add("Default")
var_Items = oGrid.Items
	h = var_Items.AddItem("Root")
	var_Items.InsertItem(h,,"Child 1")
	var_Items.InsertItem(h,,"Child 2")
	' var_Items.ExpandItem(h) = .t.
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.ExpandItem(h) = True"

? "You can:" 
? "A) left-click to drag and drop items between controls (open a new exhelper and run the same sample)" 
? "B) right-click to re-arrange the item position inside the same control" 
? "This sample shows how you can insert the data being dropped as a child of the item being hovered." 

1143
DragDrop

' Occurs when a source component is dropped onto a target component when the source component determines that a drop can occur.
function OLEDragDrop as v (Data  as  OLE::Exontrol.Grid.1::IExDataObject,Effect  as  N,Button  as  N,Shift  as  N,X  as  OLE::Exontrol.Grid.1::OLE_XPOS_PIXELS,Y  as  OLE::Exontrol.Grid.1::OLE_YPOS_PIXELS)
	' SelectItem(InsertItem(i,, Data.GetData(1))) = True
	Dim i as N
	Dim var_Items as P
	oGrid = topparent:CONTROL_ACTIVEX1.activex
	i = oGrid.ItemFromPoint(-1,-1,c,hit)
	var_Items = oGrid.Items
		' var_Items.ExpandItem(i) = .t.
		oGrid.TemplateDef = "dim var_Items,i"
		oGrid.TemplateDef = var_Items
		oGrid.TemplateDef = i
		oGrid.Template = "var_Items.ExpandItem(i) = True"

end function

' Occurs when the OLEDrag method is called.
function OLEStartDrag as v (Data  as  OLE::Exontrol.Grid.1::IExDataObject,AllowedEffects  as  N)
	' Data.SetData(Me.Items.CellCaption(FocusItem, 0), 1)
	oGrid = topparent:CONTROL_ACTIVEX1.activex
	AllowedEffects = 1
end function

Dim h as N
Dim oGrid as P
Dim var_Items as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.OLEDropMode = 1
oGrid.AutoDrag = 196608
oGrid.LinesAtRoot = -1
oGrid.Indent = 16
oGrid.SelBackMode = 1
oGrid.Columns.Add("Default")
var_Items = oGrid.Items
	h = var_Items.AddItem("Root")
	var_Items.InsertItem(h,,"Child 1")
	var_Items.InsertItem(h,,"Child 2")
	' var_Items.ExpandItem(h) = .t.
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.ExpandItem(h) = True"

? "You can:" 
? "A) left-click to drag and drop items between controls (open a new exhelper and run the same sample)" 
? "B) right-click to re-arrange the item position inside the same control" 
? "This sample shows how you can insert the data being dropped as a child of the item being hovered." 

1142
Is there anyway to stop the header changing colour when the mouse hovers/moves across the column header (non-clickable)

Dim oGrid as P
Dim var_Column as P
Dim var_Columns as P
Dim var_Items as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.BeginUpdate()
oGrid.HeaderAppearance = 4
var_Columns = oGrid.Columns
	var_Columns.Add("Item")
	var_Column = var_Columns.Add("Pos")
		var_Column.Position = 0
		var_Column.Width = 32
		var_Column.AllowSizing = .f.
		var_Column.FormatColumn = "1 index ``"
		var_Column.AllowSort = .f.
		var_Column.AllowDragging = .f.
var_Items = oGrid.Items
	var_Items.AddItem("Item A")
	var_Items.AddItem("Item B")
	var_Items.AddItem("Item C")
oGrid.EndUpdate()

1141
Is there anyway to stop the header changing colour when the mouse hovers/moves across the column header

Dim oGrid as P
Dim var_Column as P
Dim var_Columns as P
Dim var_Items as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.BeginUpdate()
oGrid.HeaderAppearance = 4
oGrid.Template = "Background(32) = -1" // oGrid.Background(32) = -1
var_Columns = oGrid.Columns
	var_Columns.Add("Item")
	var_Column = var_Columns.Add("Pos")
		var_Column.Position = 0
		var_Column.Width = 32
		var_Column.AllowSizing = .f.
		var_Column.FormatColumn = "1 index ``"
		var_Column.AllowSort = .f.
		var_Column.AllowDragging = .f.
var_Items = oGrid.Items
	var_Items.AddItem("Item A")
	var_Items.AddItem("Item B")
	var_Items.AddItem("Item C")
oGrid.EndUpdate()

1140
Is it possible to exclude the parent/child items when do the filtering, so to include only items that match the filter without any indentation

' Occurs when filter was changed.
function FilterChange as v ()
	oGrid = topparent:CONTROL_ACTIVEX1.activex
	oGrid.Indent = oGrid.FormatABC("value > 0 ? 18 : 0",.Items.MatchItemCount)
end function

Dim h as N
Dim h2 as N
Dim oGrid as P
Dim var_Column as P
Dim var_Column1 as P
Dim var_Columns as P
Dim var_Items as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.BeginUpdate()
oGrid.LinesAtRoot = -1
oGrid.Indent = 18
oGrid.FilterInclude = 4
oGrid.DrawGridLines = 2
oGrid.HeaderAppearance = 1
var_Columns = oGrid.Columns
	var_Column = var_Columns.Add("Column")
		var_Column.DisplayFilterButton = .t.
		var_Column.FilterType = 240
		var_Column.FilterList = 256
		var_Column.Filter = "C1"
	var_Column1 = var_Columns.Add("Pos")
		var_Column1.FormatColumn = "1 rindex ``"
		var_Column1.Position = 0
		var_Column1.AllowSizing = .f.
		var_Column1.AllowDragging = .f.
var_Items = oGrid.Items
	h = var_Items.AddItem("R1")
	h2 = var_Items.InsertItem(h,,"S")
	var_Items.InsertItem(h2,,"C1")
	var_Items.InsertItem(h2,,"C2")
	var_Items.InsertItem(h,,"C1")
	var_Items.InsertItem(h,,"C2")
	' var_Items.ExpandItem(h) = .t.
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.ExpandItem(h) = True"

	h = var_Items.AddItem("R2")
	var_Items.InsertItem(h,,"C1")
	var_Items.InsertItem(h,,"C2")
oGrid.ApplyFilter()
oGrid.EndUpdate()

1139
How can I display the total/sum/aggregate in the same column, when the user groups by a column

' Fired after a new column has been added.
function AddColumn as v (Column  as  OLE::Exontrol.Grid.1::IColumn)
	oGrid = topparent:CONTROL_ACTIVEX1.activex
end function

' Occurs after a new Group Item has been inserted to Items collection.
function AddGroupItem as v (Item  as  OLE::Exontrol.Grid.1::HITEM)
	Dim var_Items as P
	oGrid = topparent:CONTROL_ACTIVEX1.activex
	var_Items = oGrid.Items
		' var_Items.ItemDivider(Item) = -1
		oGrid.TemplateDef = "dim var_Items,Item"
		oGrid.TemplateDef = var_Items
		oGrid.TemplateDef = Item
		oGrid.Template = "var_Items.ItemDivider(Item) = -1"
		' var_Items.ItemBackColor(Item) = oGrid.BackColorSortBar
		oGrid.TemplateDef = "dim var_Items,Item"
		oGrid.TemplateDef = var_Items
		oGrid.TemplateDef = Item
		oGrid.Template = "var_Items.ItemBackColor(Item) = Me.BackColorSortBar"
		' var_Items.ItemHeight(Item) = oGrid.HeaderHeight
		oGrid.TemplateDef = "dim var_Items,Item"
		oGrid.TemplateDef = var_Items
		oGrid.TemplateDef = Item
		oGrid.Template = "var_Items.ItemHeight(Item) = Me.HeaderHeight"
		' var_Items.CellMerge(Item,0) = "1,2,3,4,5,7,8,9,10,11,12"
		oGrid.TemplateDef = "dim var_Items,Item"
		oGrid.TemplateDef = var_Items
		oGrid.TemplateDef = Item
		oGrid.Template = "var_Items.CellMerge(Item,0) = `1,2,3,4,5,7,8,9,10,11,12`"
		' var_Items.CellValue(Item,13) = "count(current,rec,1)"
		oGrid.TemplateDef = "dim var_Items,Item"
		oGrid.TemplateDef = var_Items
		oGrid.TemplateDef = Item
		oGrid.Template = "var_Items.CellValue(Item,13) = `count(current,rec,1)`"
		' var_Items.CellValueFormat(Item,13) = 5 'exTotalField + exHTML
		oGrid.TemplateDef = "dim var_Items,Item"
		oGrid.TemplateDef = var_Items
		oGrid.TemplateDef = Item
		oGrid.Template = "var_Items.CellValueFormat(Item,13) = 5"
		' var_Items.CellValue(Item,0) = var_Items.CellCaption(Item,var_Items.GroupItem(Item))
		oGrid.TemplateDef = "dim var_Items,Item"
		oGrid.TemplateDef = var_Items
		oGrid.TemplateDef = Item
		oGrid.Template = "var_Items.CellValue(Item,0) = CellCaption(Item,GroupItem(Item))"
		' var_Items.FormatCell(Item,0) = "`<b>` + value + `</b> <font ;7><off 3><fgcolor=808080>(` + %13 +  `)`"
		oGrid.TemplateDef = "dim var_Items,Item"
		oGrid.TemplateDef = var_Items
		oGrid.TemplateDef = Item
		oGrid.Template = "var_Items.FormatCell(Item,0) = ```<b>`` + value + ``</b> <font ;7><off 3><fgcolor=808080>(`` + %13 +  ``)```"
		' var_Items.CellValue(Item,6) = "sum(current,all,dbl(%6))"
		oGrid.TemplateDef = "dim var_Items,Item"
		oGrid.TemplateDef = var_Items
		oGrid.TemplateDef = Item
		oGrid.Template = "var_Items.CellValue(Item,6) = `sum(current,all,dbl(%6))`"
		' var_Items.CellValueFormat(Item,6) = 5 'exTotalField + exHTML
		oGrid.TemplateDef = "dim var_Items,Item"
		oGrid.TemplateDef = var_Items
		oGrid.TemplateDef = Item
		oGrid.Template = "var_Items.CellValueFormat(Item,6) = 5"
		' var_Items.CellForeColor(Item,6) = 6710886
		oGrid.TemplateDef = "dim var_Items,Item"
		oGrid.TemplateDef = var_Items
		oGrid.TemplateDef = Item
		oGrid.Template = "var_Items.CellForeColor(Item,6) = 6710886"

end function

' Occurs when the user changes the cell's content.
function Change as v (Item  as  OLE::Exontrol.Grid.1::HITEM,ColIndex  as  N,NewValue  as  A)
	oGrid = topparent:CONTROL_ACTIVEX1.activex
	oGrid.Refresh()
end function

Dim hL as N
Dim oGrid as P
Dim rs as P
Dim var_Column as local
Dim var_Column1 as P
Dim var_Column2 as P
Dim var_Column3 as local
Dim var_Columns as P
Dim var_Items as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.BeginUpdate()
oGrid.LinesAtRoot = 5
oGrid.Indent = 12
oGrid.ColumnAutoResize = .f.
oGrid.ScrollBySingleLine = .t.
oGrid.BackColorSortBar = 15790320
oGrid.AutoDrag = 16
rs = OLE.Create("ADOR.Recordset")
	rs.Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExGrid\Sample\Access\misc.accdb",3,3)
oGrid.DataSource = rs
oGrid.SingleSort = .f.
oGrid.SortBarVisible = .t.
oGrid.AllowGroupBy = .t.
oGrid.HeaderHeight = 24
var_Columns = oGrid.Columns
	' var_Columns.Add("Count").Visible = .f.
	var_Column = var_Columns.Add("Count")
	oGrid.TemplateDef = "dim var_Column"
	oGrid.TemplateDef = var_Column
	oGrid.Template = "var_Column.Visible = False"

	var_Column1 = var_Columns.Item("Freight")
		' var_Column1.Def(4) = oGrid.BackColorSortBar
		oGrid.TemplateDef = "dim var_Column1"
		oGrid.TemplateDef = var_Column1
		oGrid.Template = "var_Column1.Def(4) = Me.BackColorSortBar"

		' var_Column1.Def(7) = var_Column1.Def(4)
		oGrid.TemplateDef = "dim var_Column1"
		oGrid.TemplateDef = var_Column1
		oGrid.Template = "var_Column1.Def(7) = Def(4)"

		' var_Column1.Def(49) = 4
		oGrid.TemplateDef = "dim var_Column1"
		oGrid.TemplateDef = var_Column1
		oGrid.Template = "var_Column1.Def(49) = 4"

		' var_Column1.Def(48) = 4
		oGrid.TemplateDef = "dim var_Column1"
		oGrid.TemplateDef = var_Column1
		oGrid.Template = "var_Column1.Def(48) = 4"

		var_Column1.HeaderBold = .t.
		var_Column1.AllowGroupBy = .f.
		var_Column1.FormatColumn = "value format ``"
		var_Column1.Alignment = 2
	var_Column2 = var_Columns.Item(0)
		var_Column2.AllowGroupBy = .f.
		' var_Column2.Def(17) = 1
		oGrid.TemplateDef = "dim var_Column2"
		oGrid.TemplateDef = var_Column2
		oGrid.Template = "var_Column2.Def(17) = 1"

	' var_Columns.Item("ShipCountry").SortOrder = 1
	var_Column3 = var_Columns.Item("ShipCountry")
	oGrid.TemplateDef = "dim var_Column3"
	oGrid.TemplateDef = var_Column3
	oGrid.Template = "var_Column3.SortOrder = 1"

oGrid.ScrollBySingleLine = .f.
var_Items = oGrid.Items
	' var_Items.LockedItemCount(2) = 1
	oGrid.TemplateDef = "dim var_Items"
	oGrid.TemplateDef = var_Items
	oGrid.Template = "var_Items.LockedItemCount(2) = 1"

	hL = var_Items.LockedItem(2,0)
	' var_Items.ItemHeight(hL) = 24
	oGrid.TemplateDef = "dim var_Items,hL"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = hL
	oGrid.Template = "var_Items.ItemHeight(hL) = 24"

	' var_Items.ItemBold(hL) = .t.
	oGrid.TemplateDef = "dim var_Items,hL"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = hL
	oGrid.Template = "var_Items.ItemBold(hL) = True"

	' var_Items.ItemBackColor(hL) = oGrid.BackColorSortBar
	oGrid.TemplateDef = "dim var_Items,hL"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = hL
	oGrid.Template = "var_Items.ItemBackColor(hL) = Me.BackColorSortBar"

	' var_Items.CellValue(hL,6) = "sum(all,rec,dbl(%6))"
	oGrid.TemplateDef = "dim var_Items,hL"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = hL
	oGrid.Template = "var_Items.CellValue(hL,6) = `sum(all,rec,dbl(%6))`"

	' var_Items.CellValueFormat(hL,6) = 5 'exTotalField + exHTML
	oGrid.TemplateDef = "dim var_Items,hL"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = hL
	oGrid.Template = "var_Items.CellValueFormat(hL,6) = 5"

	' var_Items.CellHAlignment(hL,6) = 2
	oGrid.TemplateDef = "dim var_Items,hL"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = hL
	oGrid.Template = "var_Items.CellHAlignment(hL,6) = 2"

	' var_Items.FormatCell(hL,6) = "value format ``"
	oGrid.TemplateDef = "dim var_Items,hL"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = hL
	oGrid.Template = "var_Items.FormatCell(hL,6) = `value format `````"

oGrid.EndUpdate()

1138
I would like to display a solid line between "root" items, and dotted lines (default) between child items. How can I do that

Dim h as N
Dim oGrid as P
Dim var_Column as P
Dim var_Column1 as P
Dim var_ConditionalFormat as P
Dim var_Items as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.BeginUpdate()
oGrid.LinesAtRoot = -1
oGrid.DrawGridLines = 1
oGrid.GridLineStyle = 512
oGrid.VisualAppearance.Add(1,"gBFLBCJwBAEHhEJAAEhABMsIQAAYAQGKIcBiAKBQAGaAoDgYN4MAANAwjJBMKgBBCLIxhEYobgmGIXRpFMbxAKQahLEiTIgGUYJHgmK4tQLHb7zGAABRDDSOIDnGQJXhaI4JQSMMQDGLAZxVFiPRhAWLpBh+PQATrOdLUfSjVwhBKAQEBA==")
var_Column = oGrid.Columns.Add("Default")
	' var_Column.Def(0) = .t.
	oGrid.TemplateDef = "dim var_Column"
	oGrid.TemplateDef = var_Column
	oGrid.Template = "var_Column.Def(0) = True"

	var_Column.PartialCheck = .t.
var_Column1 = oGrid.Columns.Add("Position")
	var_Column1.FormatColumn = "((1 rindex ``) contains `.`) = 0"
	var_Column1.Visible = .f.
var_ConditionalFormat = oGrid.ConditionalFormats.Add("%C1")
	var_ConditionalFormat.BackColor = 31514848
var_Items = oGrid.Items
	h = var_Items.AddItem("Root 1")
	var_Items.InsertItem(h,,"Child 1")
	var_Items.InsertItem(h,,"Child 2")
	var_Items.InsertItem(h,,"Child 3")
	' var_Items.ExpandItem(h) = .t.
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.ExpandItem(h) = True"

	h = var_Items.AddItem("Root 2")
	var_Items.InsertItem(h,,"Child 1")
	var_Items.InsertItem(h,,"Child 2")
	h = var_Items.AddItem("Root 3")
	var_Items.InsertItem(h,,"Child 1")
	var_Items.InsertItem(h,,"Child 2")
oGrid.EndUpdate()

1137
I can not center or align the cell's caption and icon, when it displays the hierarchy

Dim h as N
Dim hChild as N
Dim oGrid as P
Dim var_Column as P
Dim var_Items as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.BeginUpdate()
oGrid.Images("gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTqlVq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m0ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/yNAOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA=")
var_Column = oGrid.Columns.Add("Tasks")
	' var_Column.Def(17) = 1
	oGrid.TemplateDef = "dim var_Column"
	oGrid.TemplateDef = var_Column
	oGrid.Template = "var_Column.Def(17) = 1"

oGrid.HeaderVisible = .t.
var_Items = oGrid.Items
	h = var_Items.AddItem("Project")
	hChild = var_Items.InsertItem(h,,"<img>1</img> Task (left)")
	hChild = var_Items.InsertItem(h,,"<c><img>2</img> Task (center)")
	hChild = var_Items.InsertItem(h,,"<r>Task (right) <img>3</img>")
	' var_Items.ExpandItem(h) = .t.
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.ExpandItem(h) = True"

oGrid.EndUpdate()

1136
How do I mask for float/integer number

Dim h as N
Dim oGrid as P
Dim var_Column as local
Dim var_Editor as P
Dim var_Editor1 as P
Dim var_Editor2 as P
Dim var_Editor3 as P
Dim var_Editor4 as P
Dim var_Editor5 as P
Dim var_Editor6 as P
Dim var_Editor7 as P
Dim var_Editor8 as P
Dim var_Items as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.BeginUpdate()
oGrid.ColumnAutoResize = .t.
' oGrid.Columns.Add("Type").Width = 32
var_Column = oGrid.Columns.Add("Type")
oGrid.TemplateDef = "dim var_Column"
oGrid.TemplateDef = var_Column
oGrid.Template = "var_Column.Width = 32"

oGrid.Columns.Add("Editor")
var_Items = oGrid.Items
	h = var_Items.AddItem("Integer")
	' var_Items.CellValue(h,1) = "12"
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellValue(h,1) = `12`"

	var_Editor = var_Items.CellEditor(h,1)
		var_Editor.EditType = 1
		var_Editor.Numeric = -1
	h = var_Items.AddItem("Integer (mask, group)")
	' var_Items.CellValue(h,1) = "10002"
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellValue(h,1) = `10002`"

	' var_Items.FormatCell(h,1) = "value format `0||`"
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.FormatCell(h,1) = `value format ``0||```"

	var_Editor1 = var_Items.CellEditor(h,1)
		var_Editor1.EditType = 8
		var_Editor1.Mask = ";;;float,digits=0,invalid=empty,warning=invalid character"
	h = var_Items.AddItem("Integer (mask, no group)")
	' var_Items.CellValue(h,1) = "10002"
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellValue(h,1) = `10002`"

	' var_Items.FormatCell(h,1) = "value format `0|0|`"
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.FormatCell(h,1) = `value format ``0|0|```"

	var_Editor2 = var_Items.CellEditor(h,1)
		var_Editor2.EditType = 8
		var_Editor2.Mask = ";;;float,digits=0,grouping=,invalid=empty,warning=invalid character"
	h = var_Items.AddItem("Float")
	' var_Items.CellValue(h,1) = "+12.34E+2"
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellValue(h,1) = `+12.34E+2`"

	var_Editor3 = var_Items.CellEditor(h,1)
		var_Editor3.EditType = 1
		var_Editor3.Numeric = 1
	h = var_Items.AddItem("Float (no signs)")
	' var_Items.CellValue(h,1) = "12.34E-2"
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellValue(h,1) = `12.34E-2`"

	var_Editor4 = var_Items.CellEditor(h,1)
		var_Editor4.EditType = 1
		var_Editor4.Numeric = 769 'exDisableSigns + exFloat
	h = var_Items.AddItem("Float-Integer")
	' var_Items.CellValue(h,1) = "+12.34"
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellValue(h,1) = `+12.34`"

	var_Editor5 = var_Items.CellEditor(h,1)
		var_Editor5.EditType = 1
		var_Editor5.Numeric = 2
	h = var_Items.AddItem("Float-Integer (no signs)")
	' var_Items.CellValue(h,1) = "12.34"
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellValue(h,1) = `12.34`"

	var_Editor6 = var_Items.CellEditor(h,1)
		var_Editor6.EditType = 1
		var_Editor6.Numeric = 770 'exDisableSigns + exFloatInteger
	h = var_Items.AddItem("Float (mask,group)")
	' var_Items.CellValue(h,1) = "10002.34"
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellValue(h,1) = `10002.34`"

	' var_Items.FormatCell(h,1) = "value format `2`"
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.FormatCell(h,1) = `value format ``2```"

	var_Editor7 = var_Items.CellEditor(h,1)
		var_Editor7.EditType = 8
		var_Editor7.Mask = ";;;float,invalid=empty,warning=invalid character"
	h = var_Items.AddItem("Float (mask, no group)")
	' var_Items.CellValue(h,1) = "10002.34"
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellValue(h,1) = `10002.34`"

	' var_Items.FormatCell(h,1) = "value format `2|0|`"
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.FormatCell(h,1) = `value format ``2|0|```"

	var_Editor8 = var_Items.CellEditor(h,1)
		var_Editor8.EditType = 8
		var_Editor8.Mask = ";;;float,grouping=,invalid=empty,warning=invalid character"
oGrid.EndUpdate()

1135
How do I set an extra data for each item
' Occurs when the user moves the mouse.
function MouseMove as v (Button  as  N,Shift  as  N,X  as  OLE::Exontrol.Grid.1::OLE_XPOS_PIXELS,Y  as  OLE::Exontrol.Grid.1::OLE_YPOS_PIXELS)
	Dim i as N
	oGrid = topparent:CONTROL_ACTIVEX1.activex
	i = oGrid.ItemFromPoint(-1,-1,c,hit)
	? i 
	? oGrid.Items.ItemData(i) 
end function

Dim oGrid as P
Dim var_Items as P
Dim var_Items1 as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.BeginUpdate()
oGrid.ColumnAutoResize = .t.
oGrid.Columns.Add("Default")
var_Items = oGrid.Items
	' var_Items.ItemData(var_Items.AddItem("method 1")) = "your extra data of method 1"
	oGrid.TemplateDef = "dim var_Items"
	oGrid.TemplateDef = var_Items
	oGrid.Template = "var_Items.ItemData(AddItem(`method 1`)) = `your extra data of method 1`"

	var_Items.InsertItem(0,"your extra data of method 2","method 2")
var_Items1 = oGrid.Items
	var_Items1.DefaultItem = var_Items1.AddItem("method 3")
	' var_Items1.ItemData(0) = "your extra data of method 3"
	oGrid.TemplateDef = "dim var_Items1"
	oGrid.TemplateDef = var_Items1
	oGrid.Template = "var_Items1.ItemData(0) = `your extra data of method 3`"

oGrid.EndUpdate()

1134
I do not like to specify the item padding for every column I add. The question is how can I do it automatically

Dim oGrid as P
Dim var_Column as P
Dim var_Columns as P
Dim var_Items as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.BeginUpdate()
oGrid.AttachTemplate("handle AddColumn(Column){Column{Def(48)=8;Def(49)=8;AllowDragging=False;AllowSizing = True}}")
oGrid.HeaderAppearance = 4
oGrid.DrawGridLines = -1
oGrid.GridLineStyle = 32
var_Columns = oGrid.Columns
	var_Columns.Add("Item")
	var_Column = var_Columns.Add("Pos")
		var_Column.Position = 0
		var_Column.Width = 32
		var_Column.AllowSizing = .f.
		var_Column.FormatColumn = "1 index ``"
var_Items = oGrid.Items
	var_Items.AddItem("Item A")
	var_Items.AddItem("Item B")
	var_Items.AddItem("Item C")
oGrid.EndUpdate()

1133
How can I change the Exclude field in the drop down filter window

Dim h as N
Dim oGrid as P
Dim var_Column as P
Dim var_Items as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.BeginUpdate()
oGrid.LinesAtRoot = -1
oGrid.Template = "HTMLPicture(`exclude`) = `gCJKBOI4NBQaBQAhQNJJIIhShQACERCAEAcRdrdcUQhQDOZCJJUBEjbbhJ7giIJOBILJziJvl4BeKibhDiIZOhFLB0KZvMx0O5hORlAB3owuNJuNZzMZhOBlFxvORnTbuHgaiIeKBMKhFf9fDIcEoPCAVEAlGI4HhBBYMCARCQVGg4IhVMCAWC2XY1Q7WJ8RBB0KROKYAYDBbzicjndD6fA/VsRHRJIhBkRbMYIGwGAQjA2fRYOEBoYjBFBx1ATCgCGQ8M7OTjSaJMDRDKIwYu5DrIMBgSAADKJTqhBhyRApAA3FAucZPPilokRJJFJxEVxCMCCgIA==`" // oGrid.HTMLPicture("exclude") = "gCJKBOI4NBQaBQAhQNJJIIhShQACERCAEAcRdrdcUQhQDOZCJJUBEjbbhJ7giIJOBILJziJvl4BeKibhDiIZOhFLB0KZvMx0O5hORlAB3owuNJuNZzMZhOBlFxvORnTbuHgaiIeKBMKhFf9fDIcEoPCAVEAlGI4HhBBYMCARCQVGg4IhVMCAWC2XY1Q7WJ8RBB0KROKYAYDBbzicjndD6fA/VsRHRJIhBkRbMYIGwGAQjA2fRYOEBoYjBFBx1ATCgCGQ8M7OTjSaJMDRDKIwYu5DrIMBgSAADKJTqhBhyRApAA3FAucZPPilokRJJFJxEVxCMCCgIA=="
oGrid.Template = "Description(25) = `<img>exclude</img>`" // oGrid.Description(25) = "<img>exclude</img>"
var_Column = oGrid.Columns.Add("Items")
	var_Column.DisplayFilterButton = .t.
	var_Column.DisplayFilterPattern = .f.
	var_Column.FilterList = 9472 'exShowExclude + exShowFocusItem + exShowCheckBox
var_Items = oGrid.Items
	h = var_Items.AddItem("Root 1")
	var_Items.InsertItem(h,,"Child 1")
	var_Items.InsertItem(h,,"Child 2")
	' var_Items.ExpandItem(h) = .t.
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.ExpandItem(h) = True"

	h = var_Items.AddItem("Root 2")
	var_Items.InsertItem(h,,"Child 1")
oGrid.EndUpdate()

1132
How can I change the Exclude field in the drop down filter window

Dim h as N
Dim oGrid as P
Dim var_Column as P
Dim var_Items as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.BeginUpdate()
oGrid.LinesAtRoot = -1
oGrid.Template = "Description(25) = `<bgcolor 0><fgcolor ffffff> Exclude </fgcolor></bgcolor>`" // oGrid.Description(25) = "<bgcolor 0><fgcolor ffffff> Exclude </fgcolor></bgcolor>"
var_Column = oGrid.Columns.Add("Items")
	var_Column.DisplayFilterButton = .t.
	var_Column.DisplayFilterPattern = .f.
	var_Column.FilterList = 9472 'exShowExclude + exShowFocusItem + exShowCheckBox
var_Items = oGrid.Items
	h = var_Items.AddItem("Root 1")
	var_Items.InsertItem(h,,"Child 1")
	var_Items.InsertItem(h,,"Child 2")
	' var_Items.ExpandItem(h) = .t.
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.ExpandItem(h) = True"

	h = var_Items.AddItem("Root 2")
	var_Items.InsertItem(h,,"Child 1")
oGrid.EndUpdate()

1131
The grid lines looks different then before. What should I do

Dim h as N
Dim hChild as N
Dim oGrid as P
Dim var_Column as P
Dim var_Items as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.BeginUpdate()
oGrid.LinesAtRoot = -1
oGrid.DrawGridLines = -1
oGrid.GridLineStyle = 512
var_Column = oGrid.Columns.Add("Tasks")
	' var_Column.Def(0) = .t.
	oGrid.TemplateDef = "dim var_Column"
	oGrid.TemplateDef = var_Column
	oGrid.Template = "var_Column.Def(0) = True"

	var_Column.PartialCheck = .t.
oGrid.HeaderVisible = .t.
var_Items = oGrid.Items
	h = var_Items.AddItem("Project")
	hChild = var_Items.InsertItem(h,,"Task 1")
	' var_Items.SelectItem(hChild) = .t.
	oGrid.TemplateDef = "dim var_Items,hChild"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = hChild
	oGrid.Template = "var_Items.SelectItem(hChild) = True"

	hChild = var_Items.InsertItem(h,,"Task 2")
	' var_Items.CellState(hChild,0) = 1
	oGrid.TemplateDef = "dim var_Items,hChild"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = hChild
	oGrid.Template = "var_Items.CellState(hChild,0) = 1"

	hChild = var_Items.InsertItem(h,,"Task 3")
	' var_Items.CellState(hChild,0) = 1
	oGrid.TemplateDef = "dim var_Items,hChild"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = hChild
	oGrid.Template = "var_Items.CellState(hChild,0) = 1"

	' var_Items.ExpandItem(h) = .t.
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.ExpandItem(h) = True"

oGrid.EndUpdate()

1130
Can I sort the column by check-state

Dim oGrid as P
Dim var_Column as P
Dim var_Items as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.BeginUpdate()
var_Column = oGrid.Columns.Add("Check")
	' var_Column.Def(0) = .t.
	oGrid.TemplateDef = "dim var_Column"
	oGrid.TemplateDef = var_Column
	oGrid.Template = "var_Column.Def(0) = True"

	var_Column.SortType = 32
var_Items = oGrid.Items
	var_Items.AddItem()
	' var_Items.CellState(var_Items.AddItem(),0) = 1
	oGrid.TemplateDef = "dim var_Items"
	oGrid.TemplateDef = var_Items
	oGrid.Template = "var_Items.CellState(AddItem(),0) = 1"

	' var_Items.CellState(var_Items.AddItem(),0) = 1
	oGrid.TemplateDef = "dim var_Items"
	oGrid.TemplateDef = var_Items
	oGrid.Template = "var_Items.CellState(AddItem(),0) = 1"

	var_Items.AddItem()
oGrid.Columns.Item(0).SortOrder = 1
oGrid.EndUpdate()

1129
Can I sort the column by image

Dim oGrid as P
Dim var_Column as P
Dim var_Items as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.BeginUpdate()
oGrid.Images("gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTqlVq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m0ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/yNAOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA=")
var_Column = oGrid.Columns.Add("Image")
	var_Column.SortType = 48
var_Items = oGrid.Items
	' var_Items.CellImage(var_Items.AddItem(),0) = 3
	oGrid.TemplateDef = "dim var_Items"
	oGrid.TemplateDef = var_Items
	oGrid.Template = "var_Items.CellImage(AddItem(),0) = 3"

	var_Items.AddItem()
	' var_Items.CellImage(var_Items.AddItem(),0) = 1
	oGrid.TemplateDef = "dim var_Items"
	oGrid.TemplateDef = var_Items
	oGrid.Template = "var_Items.CellImage(AddItem(),0) = 1"

	' var_Items.CellImage(var_Items.AddItem(),0) = 2
	oGrid.TemplateDef = "dim var_Items"
	oGrid.TemplateDef = var_Items
	oGrid.Template = "var_Items.CellImage(AddItem(),0) = 2"

oGrid.Columns.Item(0).SortOrder = 1
oGrid.EndUpdate()

1128
Can I sort the column by value(numeric)

Dim oGrid as P
Dim var_Column as P
Dim var_Items as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.BeginUpdate()
var_Column = oGrid.Columns.Add("Value")
	' var_Column.Def(17) = 1
	oGrid.TemplateDef = "dim var_Column"
	oGrid.TemplateDef = var_Column
	oGrid.Template = "var_Column.Def(17) = 1"

	var_Column.FormatColumn = "`<fgcolor=808080><off 4><font ;6> ` + (1 index ``)  + ` </font></off></fgcolor>` + value"
	var_Column.SortType = 17 'exSortByValue + SortNumeric
var_Items = oGrid.Items
	var_Items.AddItem("1")
	var_Items.AddItem("10")
	var_Items.AddItem("2")
	var_Items.AddItem("20")
oGrid.Columns.Item(0).SortOrder = 1
oGrid.EndUpdate()

1127
Can I sort a column by cell's state (checked, unchecked) rather than caption

Dim oGrid as P
Dim var_Column as P
Dim var_Editor as P
Dim var_Items as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.BeginUpdate()
var_Column = oGrid.Columns.Add("Check")
	var_Editor = var_Column.Editor
		var_Editor.EditType = 19
		' var_Editor.Option(17) = 1
		oGrid.TemplateDef = "dim var_Editor"
		oGrid.TemplateDef = var_Editor
		oGrid.Template = "var_Editor.Option(17) = 1"

	var_Column.SortType = 1
var_Items = oGrid.Items
	var_Items.AddItem(.t.)
	var_Items.AddItem(.f.)
	var_Items.AddItem(.f.)
	var_Items.AddItem(.t.)
oGrid.Columns.Item(0).SortOrder = 1
oGrid.EndUpdate()

1126
How do I get the item's auto-number, when using FormatColumn property, as CellValue gets empty

' Fired after a new item has been selected.
function SelectionChanged as v ()
	Dim var_Items as P
	oGrid = topparent:CONTROL_ACTIVEX1.activex
	var_Items = oGrid.Items
		? "pos: " 
		? var_Items.CellCaption(var_Items.FocusItem,1) 
		? "rpos(1): " 
		? var_Items.CellCaption(var_Items.FocusItem,2) 
		? "rpos(2): " 
		? var_Items.CellCaption(var_Items.FocusItem,3) 
		? "apos: " 
		? var_Items.CellCaption(var_Items.FocusItem,4) 
		? "index: " 
		? var_Items.CellCaption(var_Items.FocusItem,5) 
end function

Dim h as N
Dim hSel as N
Dim oGrid as P
Dim var_Column as P
Dim var_Column1 as P
Dim var_Column2 as P
Dim var_Column3 as P
Dim var_Column4 as P
Dim var_Columns as P
Dim var_Items as P
Dim var_Items1 as local

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.BeginUpdate()
oGrid.LinesAtRoot = -1
oGrid.DrawGridLines = -2
oGrid.HeaderAppearance = 4
var_Columns = oGrid.Columns
	var_Columns.Add("Items")
	var_Column = var_Columns.Add("pos")
		var_Column.FormatColumn = "1 pos ``"
		var_Column.Position = 0
		var_Column.Width = 48
		var_Column.AllowSizing = .f.
	var_Column1 = var_Columns.Add("rpos(1)")
		var_Column1.FormatColumn = "1 rpos ``"
		var_Column1.Position = 1
		var_Column1.Width = 48
		var_Column1.AllowSizing = .f.
	var_Column2 = var_Columns.Add("rpos(2)")
		var_Column2.FormatColumn = "1 rpos `.||A-Z`"
		var_Column2.Position = 2
		var_Column2.Width = 48
		var_Column2.AllowSizing = .f.
	var_Column3 = var_Columns.Add("apos")
		var_Column3.FormatColumn = "1 apos ``"
		var_Column3.Position = 3
		var_Column3.Width = 48
		var_Column3.AllowSizing = .f.
	var_Column4 = var_Columns.Add("index")
		var_Column4.FormatColumn = "1 index ``"
		var_Column4.Position = 4
		var_Column4.Width = 48
		var_Column4.AllowSizing = .f.
var_Items = oGrid.Items
	h = var_Items.AddItem("Item 1")
	var_Items.InsertItem(h,,"Child 1")
	hSel = var_Items.InsertItem(h,,"Child 2")
	' var_Items.ExpandItem(h) = .t.
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.ExpandItem(h) = True"

	var_Items.AddItem("Item 2")
	var_Items.AddItem("Item 3")
oGrid.EndUpdate()
' oGrid.Items.SelectItem(hSel) = .t.
var_Items1 = oGrid.Items
oGrid.TemplateDef = "dim var_Items1"
oGrid.TemplateDef = var_Items1
oGrid.Template = "var_Items1.SelectItem(hSel) = True"


1125
How can I display UNICODE characters

Dim oGrid as P
Dim var_Column as local
Dim var_Items as P
Dim var_StdFont as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.BeginUpdate()
var_StdFont = oGrid.Font
	var_StdFont.Name = "Arial Unicode"
	var_StdFont.Size = 22
oGrid.HeaderVisible = .f.
oGrid.DefaultItemHeight = 48
' oGrid.Columns.Add("").Def(17) = 1
var_Column = oGrid.Columns.Add("")
oGrid.TemplateDef = "dim var_Column"
oGrid.TemplateDef = var_Column
oGrid.Template = "var_Column.Def(17) = 1"

var_Items = oGrid.Items
	var_Items.AddItem("Ӓӓ")
	var_Items.AddItem("ᦜᦝ;ᦞ")
	var_Items.AddItem("ɮɭ;ɯ")
	var_Items.AddItem("勳勴勵勶")
	' var_Items.FormatCell(var_Items.AddItem(oGrid.Version),0) = "(value lfind `UNICODE`) < 0 ? `<fgcolor=FF0000><b>!UNICODE!</b> version</fgcolor> required: ` + value : `` "
	oGrid.TemplateDef = "dim var_Items"
	oGrid.TemplateDef = var_Items
	oGrid.Template = "var_Items.FormatCell(AddItem(Me.Version),0) = `(value lfind ``UNICODE``) < 0 ? ``<fgcolor=FF0000><b>!UNICODE!</b> version</fgcolor> required: `` + value : ```` `"

oGrid.EndUpdate()

1124
How do I display the position of the item with 0-padding

Dim oGrid as P
Dim var_Column as local
Dim var_Items as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.BeginUpdate()
' oGrid.Columns.Add("Items").FormatColumn = "((1 apos ``) lpad `00`) + `. `  + value"
var_Column = oGrid.Columns.Add("Items")
oGrid.TemplateDef = "dim var_Column"
oGrid.TemplateDef = var_Column
oGrid.Template = "var_Column.FormatColumn = `((1 apos ````) lpad ``00``) + ``. ``  + value`"

var_Items = oGrid.Items
	var_Items.AddItem("Item A")
	var_Items.AddItem("Item B")
	var_Items.AddItem("Item C")
	var_Items.AddItem("Item D")
oGrid.EndUpdate()

1123
Can't get the +/- to be displayed on a divider item. What else can I do

Dim h as N
Dim oGrid as P
Dim var_Column as local
Dim var_Column1 as local
Dim var_Columns as P
Dim var_Items as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.BeginUpdate()
oGrid.LinesAtRoot = -1
oGrid.DrawGridLines = -1
oGrid.TreeColumnIndex = 0
oGrid.MarkSearchColumn = .f.
oGrid.FullRowSelect = 0
oGrid.HeaderAppearance = -1 'fffffff8 + Bump + Sunken
var_Columns = oGrid.Columns
	' var_Columns.Add("C1").Width = 32
	var_Column = var_Columns.Add("C1")
	oGrid.TemplateDef = "dim var_Column"
	oGrid.TemplateDef = var_Column
	oGrid.Template = "var_Column.Width = 32"

	' var_Columns.Add("C2").FormatColumn = "1 index ``"
	var_Column1 = var_Columns.Add("C2")
	oGrid.TemplateDef = "dim var_Column1"
	oGrid.TemplateDef = var_Column1
	oGrid.Template = "var_Column1.FormatColumn = `1 index `````"

var_Items = oGrid.Items
	h = var_Items.AddItem("Cell 1")
	' var_Items.CellSingleLine(h,1) = .f.
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellSingleLine(h,1) = False"

	h = var_Items.AddItem("This is bit of text merges all cells in the item (divider shows no +/-)")
	' var_Items.ItemDivider(h) = 0
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.ItemDivider(h) = 0"

	' var_Items.ItemBackColor(h) = 15790320
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.ItemBackColor(h) = 15790320"

	' var_Items.ItemDividerLine(h) = 0
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.ItemDividerLine(h) = 0"

	' var_Items.CellHAlignment(h,0) = 1
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellHAlignment(h,0) = 1"

	var_Items.InsertItem(h,,"Child 1")
	var_Items.InsertItem(h,,"Child 2")
	' var_Items.ExpandItem(h) = .t.
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.ExpandItem(h) = True"

	h = var_Items.AddItem("Cell 3")
	h = var_Items.AddItem("This is bit of text merges all cells in the item (merge shows +/-)")
	' var_Items.ItemBackColor(h) = 15790320
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.ItemBackColor(h) = 15790320"

	' var_Items.CellMerge(h,0) = 1
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellMerge(h,0) = 1"

	var_Items.InsertItem(h,,"Child 3")
	var_Items.InsertItem(h,,"Child 4")
	' var_Items.ExpandItem(h) = .t.
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.ExpandItem(h) = True"

oGrid.EndUpdate()

1122
How can I define a column of button type

' Occurs when user clicks on the cell's button.
function ButtonClick as v (Item  as  OLE::Exontrol.Grid.1::HITEM,ColIndex  as  N,Key  as  A)
	Dim var_Items as P
	oGrid = topparent:CONTROL_ACTIVEX1.activex
	var_Items = oGrid.Items
		? var_Items.CellValue(Item,ColIndex) 
end function

Dim oGrid as P
Dim var_Column as P
Dim var_Column1 as local
Dim var_Items as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.BeginUpdate()
var_Column = oGrid.Columns.Add("Button")
	' var_Column.Def(2) = .t.
	oGrid.TemplateDef = "dim var_Column"
	oGrid.TemplateDef = var_Column
	oGrid.Template = "var_Column.Def(2) = True"

	' var_Column.Def(3) = .f.
	oGrid.TemplateDef = "dim var_Column"
	oGrid.TemplateDef = var_Column
	oGrid.Template = "var_Column.Def(3) = False"

	var_Column.FormatColumn = "``"
	var_Column.AllowSizing = .f.
	var_Column.Width = 48
' oGrid.Columns.Add("Second").FormatColumn = "` Item ` + 1 index ``"
var_Column1 = oGrid.Columns.Add("Second")
oGrid.TemplateDef = "dim var_Column1"
oGrid.TemplateDef = var_Column1
oGrid.Template = "var_Column1.FormatColumn = ``` Item `` + 1 index `````"

var_Items = oGrid.Items
	var_Items.AddItem("Button 1")
	var_Items.AddItem("Button 2")
	var_Items.AddItem("Button 3 ")
oGrid.EndUpdate()

1121
Is it possible to configure different colour/icon when there is a active filter

' Occurs when filter was changed.
function FilterChange as v ()
	oGrid = topparent:CONTROL_ACTIVEX1.activex
	oGrid.Template = "Background(0) = FormatABC(`value = 0 ? 0x1000001 : 0x10000FF `,Columns.Item(0).FilterType)" // oGrid.Background(0) = oGrid.FormatABC("value = 0 ? 0x1000001 : 0x10000FF ",oGrid.Columns.Item(0).FilterType)
end function

Dim oGrid as P
Dim var_Appearance as P
Dim var_Column as P
Dim var_Column1 as P
Dim var_Items as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.BeginUpdate()
var_Appearance = oGrid.VisualAppearance
	var_Appearance.RenderType = -16777216
	var_Appearance.Add(1,"gBFLBCJwBAEHhEJAAEhABXUIQAAYAQGKIcBiAKBQAGYBIJDEMgzDDAUBjKKocQTC4AIQjCK4JDKHYJRpHEZyCA8EhqGASRAFUQBYiWE4oSpLABQaK0ZwIGyRIrkGQgQgmPYDSDNU4zVIEEglBI0TDNczhNDENgtGYaJqHIYpZBcM40TKkEZoSIITZcRrOEBiRL1S0RBhGcRUHZlWzdN64LhuK47UrWdD/XhdVzXRbjfz1Oq+bxve48Br7A5yYThdr4LhOFQ3RjIL4xbIcUwGe6VZhjOLZXjmO49T69HTtOCYBEBA")
oGrid.DrawGridLines = -1
oGrid.ShowFocusRect = .f.
oGrid.Template = "Background(0) = 16777217" // oGrid.Background(0) = 16777217
oGrid.Template = "Background(32) = -1" // oGrid.Background(32) = -1
oGrid.HeaderAppearance = 4
oGrid.BackColorHeader = 16777215
oGrid.HeaderVisible = .t.
var_Column = oGrid.Columns.Add("Filter")
	var_Column.DisplayFilterButton = .t.
	var_Column.AllowSort = .f.
	var_Column.AllowDragging = .f.
	var_Column.FilterList = 256
var_Items = oGrid.Items
	var_Items.AddItem("Item A")
	var_Items.AddItem("Item B")
	var_Items.AddItem("Item C")
var_Column1 = oGrid.Columns.Item(0)
	var_Column1.Filter = "Item B"
	var_Column1.FilterType = 240
oGrid.ApplyFilter()
oGrid.EndUpdate()

1120
How can I display the type of the value the column display

Dim oGrid as P
Dim var_Column as P
Dim var_Items as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.BeginUpdate()
oGrid.HeaderAppearance = 4
oGrid.DrawGridLines = -2
var_Column = oGrid.Columns.Add("Values")
	' var_Column.Def(17) = 1
	oGrid.TemplateDef = "dim var_Column"
	oGrid.TemplateDef = var_Column
	oGrid.Template = "var_Column.Def(17) = 1"

	var_Column.FormatColumn = "value + ` <off 4><fgcolor=808080>type(` + type(%0) + `)`"
var_Items = oGrid.Items
	var_Items.AddItem()
	var_Items.AddItem(-1)
	var_Items.AddItem("string")
	var_Items.AddItem({01/01/2001})
	var_Items.AddItem(2)
	var_Items.AddItem(.t.)
	var_Items.AddItem(12.34)
oGrid.EndUpdate()

1119
I want to create a conditional format for a column, verifying that the value of the cell is numeric, how can I do

Dim oGrid as P
Dim var_ConditionalFormat as P
Dim var_ConditionalFormat1 as local
Dim var_ConditionalFormat2 as local
Dim var_ConditionalFormat3 as local
Dim var_Items as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.BeginUpdate()
oGrid.HeaderAppearance = 4
oGrid.DrawGridLines = -2
oGrid.Columns.Add("Values")
var_ConditionalFormat = oGrid.ConditionalFormats.Add("type(%0) in (2,3,4,5,18,19,20,21)")
	var_ConditionalFormat.ForeColor = 255
	var_ConditionalFormat.Bold = .t.
' oGrid.ConditionalFormats.Add("type(%0) = 11").ForeColor = 65280
var_ConditionalFormat1 = oGrid.ConditionalFormats.Add("type(%0) = 11")
oGrid.TemplateDef = "dim var_ConditionalFormat1"
oGrid.TemplateDef = var_ConditionalFormat1
oGrid.Template = "var_ConditionalFormat1.ForeColor = 65280"

' oGrid.ConditionalFormats.Add("type(%0) = 7").ForeColor = 16711680
var_ConditionalFormat2 = oGrid.ConditionalFormats.Add("type(%0) = 7")
oGrid.TemplateDef = "dim var_ConditionalFormat2"
oGrid.TemplateDef = var_ConditionalFormat2
oGrid.Template = "var_ConditionalFormat2.ForeColor = 16711680"

' oGrid.ConditionalFormats.Add("type(%0) in (0,1)").BackColor = 15790320
var_ConditionalFormat3 = oGrid.ConditionalFormats.Add("type(%0) in (0,1)")
oGrid.TemplateDef = "dim var_ConditionalFormat3"
oGrid.TemplateDef = var_ConditionalFormat3
oGrid.Template = "var_ConditionalFormat3.BackColor = 15790320"

var_Items = oGrid.Items
	var_Items.AddItem()
	var_Items.AddItem(-1)
	var_Items.AddItem("string")
	var_Items.AddItem({01/01/2001})
	var_Items.AddItem(2)
	var_Items.AddItem(.t.)
	var_Items.AddItem(12.34)
oGrid.EndUpdate()

1118
How can I assign a computed value on a different column based on other columns

' Occurs when the user changes the cell's content.
function Change as v (Item  as  OLE::Exontrol.Grid.1::HITEM,ColIndex  as  N,NewValue  as  A)
	Dim var_Items as P
	oGrid = topparent:CONTROL_ACTIVEX1.activex
	oGrid.FreezeEvents(.t.)
	var_Items = oGrid.Items
		' var_Items.CellValue(Item,1) = oGrid.FormatABC("int(255*sin(value/2))",NewValue)
		oGrid.TemplateDef = "dim var_Items,Item"
		oGrid.TemplateDef = var_Items
		oGrid.TemplateDef = Item
		oGrid.Template = "var_Items.CellValue(Item,1) = Me.FormatABC(`int(255*sin(value/2))`,NewValue)"
		' var_Items.CellValue(Item,2) = oGrid.FormatABC("int(255*cos(value/2))",NewValue)
		oGrid.TemplateDef = "dim var_Items,Item"
		oGrid.TemplateDef = var_Items
		oGrid.TemplateDef = Item
		oGrid.Template = "var_Items.CellValue(Item,2) = Me.FormatABC(`int(255*cos(value/2))`,NewValue)"
	oGrid.FreezeEvents(.f.)
end function

Dim oGrid as P
Dim var_Column as P
Dim var_Column1 as local
Dim var_Column2 as local
Dim var_ConditionalFormat as local
Dim var_Items as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.BeginUpdate()
oGrid.SelBackMode = 1
oGrid.HeaderAppearance = 4
oGrid.DrawGridLines = -2
var_Column = oGrid.Columns.Add("Value")
	var_Column.Editor.EditType = 4
	var_Column.Width = 64
	var_Column.AllowSizing = .f.
' oGrid.Columns.Add("Assign A").Def(4) = 16448250
var_Column1 = oGrid.Columns.Add("Assign A")
oGrid.TemplateDef = "dim var_Column1"
oGrid.TemplateDef = var_Column1
oGrid.Template = "var_Column1.Def(4) = 16448250"

' oGrid.Columns.Add("Assign B").Def(4) = 16448250
var_Column2 = oGrid.Columns.Add("Assign B")
oGrid.TemplateDef = "dim var_Column2"
oGrid.TemplateDef = var_Column2
oGrid.Template = "var_Column2.Def(4) = 16448250"

var_Column = oGrid.Columns.Add("Computed")
	' var_Column.Def(4) = 16448250
	oGrid.TemplateDef = "dim var_Column"
	oGrid.TemplateDef = var_Column
	oGrid.Template = "var_Column.Def(4) = 16448250"

	var_Column.ComputedField = "%1 + %2"
	var_Column.FormatColumn = "value format ``"
	var_Column.Alignment = 2
	var_Column.HeaderAlignment = var_Column.Alignment
' oGrid.ConditionalFormats.Add("%3 >= 0").Bold = .t.
var_ConditionalFormat = oGrid.ConditionalFormats.Add("%3 >= 0")
oGrid.TemplateDef = "dim var_ConditionalFormat"
oGrid.TemplateDef = var_ConditionalFormat
oGrid.Template = "var_ConditionalFormat.Bold = True"

var_Items = oGrid.Items
	var_Items.AddItem(1989)
	var_Items.AddItem(2001)
	var_Items.AddItem(2017)
	var_Items.AddItem(2018)
	var_Items.AddItem(2019)
oGrid.EndUpdate()

1117
How can I get computed a value on a different column

Dim oGrid as P
Dim var_Column as P
Dim var_Column1 as local
Dim var_Items as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.BeginUpdate()
oGrid.HeaderAppearance = 4
oGrid.DrawGridLines = -2
var_Column = oGrid.Columns.Add("Year")
	var_Column.Editor.EditType = 4
	var_Column.Width = 64
	var_Column.AllowSizing = .f.
' oGrid.Columns.Add("Easter").FormatColumn = "date(dateS('3/1/' + %0)  + ((1:=(((255 - 11 * (%0 mod 19)) - 21) mod 30) + 21) + (=:1 > 48 ? -1 : 0) + 6 - ((%0 + int(%0 / 4)) + =:1 + (=:1 > 48 ? -1 : 0) + 1) mod 7))"
var_Column1 = oGrid.Columns.Add("Easter")
oGrid.TemplateDef = "dim var_Column1"
oGrid.TemplateDef = var_Column1
oGrid.Template = "var_Column1.FormatColumn = `date(dateS('3/1/' + %0)  + ((1:=(((255 - 11 * (%0 mod 19)) - 21) mod 30) + 21) + (=:1 > 48 ? -1 : 0) + 6 - ((%0 + int(%0 / 4)) + =:1 + (=:1 > 48 ? -1 : 0) + 1) mod 7))`"

var_Items = oGrid.Items
	var_Items.AddItem(1989)
	var_Items.AddItem(2001)
	var_Items.AddItem(2017)
	var_Items.AddItem(2018)
	var_Items.AddItem(2019)
oGrid.EndUpdate()

1116
How can I prevent applying ConditionalFormats on a specified cell, for instance I am displaying a Total field, and I will like to have formatted in a different way (method 2)

' Occurs when the user changes the cell's content.
function Change as v (Item  as  OLE::Exontrol.Grid.1::HITEM,ColIndex  as  N,NewValue  as  A)
	oGrid = topparent:CONTROL_ACTIVEX1.activex
	oGrid.Refresh()
end function

Dim h as N
Dim oGrid as P
Dim var_Column as P
Dim var_ConditionalFormat as P
Dim var_Editor as P
Dim var_Items as P
Dim var_Items1 as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.BeginUpdate()
var_ConditionalFormat = oGrid.ConditionalFormats.Add("(%0 >= 0)")
	var_ConditionalFormat.Expression = "(0=type(%CD0)) and (%0 >= 0)"
	var_ConditionalFormat.Bold = .t.
	var_ConditionalFormat.ForeColor = 255
	? "ConditionalFormat.Valid" 
	? var_ConditionalFormat.Valid 
var_Column = oGrid.Columns.Add("Numbers")
	var_Editor = var_Column.Editor
		var_Editor.Numeric = -1
		var_Editor.EditType = 4
	var_Column.SortType = 1
var_Items = oGrid.Items
	var_Items.AddItem(100)
	var_Items.AddItem(-25)
	var_Items.AddItem(31)
	var_Items.AddItem(-48)
var_Items1 = oGrid.Items
	h = var_Items1.AddItem("sum(all,dir,dbl(%0))")
	' var_Items1.SelectableItem(h) = .f.
	oGrid.TemplateDef = "dim var_Items1,h"
	oGrid.TemplateDef = var_Items1
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items1.SelectableItem(h) = False"

	' var_Items1.SortableItem(h) = .f.
	oGrid.TemplateDef = "dim var_Items1,h"
	oGrid.TemplateDef = var_Items1
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items1.SortableItem(h) = False"

	' var_Items1.ItemBackColor(h) = 15790320
	oGrid.TemplateDef = "dim var_Items1,h"
	oGrid.TemplateDef = var_Items1
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items1.ItemBackColor(h) = 15790320"

	' var_Items1.CellData(h,0) = "total"
	oGrid.TemplateDef = "dim var_Items1,h"
	oGrid.TemplateDef = var_Items1
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items1.CellData(h,0) = `total`"

	' var_Items1.CellValueFormat(h,0) = 5 'exTotalField + exHTML
	oGrid.TemplateDef = "dim var_Items1,h"
	oGrid.TemplateDef = var_Items1
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items1.CellValueFormat(h,0) = 5"

	' var_Items1.FormatCell(h,0) = "'Total: <b><fgcolor=0000FF>'+(value format ``)"
	oGrid.TemplateDef = "dim var_Items1,h"
	oGrid.TemplateDef = var_Items1
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items1.FormatCell(h,0) = `'Total: <b><fgcolor=0000FF>'+(value format ````)`"

oGrid.EndUpdate()

1115
How can I prevent applying ConditionalFormats on a specified cell, for instance I am displaying a Total field, and I will like to have formatted in a different way (method 1)

' Occurs when the user changes the cell's content.
function Change as v (Item  as  OLE::Exontrol.Grid.1::HITEM,ColIndex  as  N,NewValue  as  A)
	oGrid = topparent:CONTROL_ACTIVEX1.activex
	oGrid.Refresh()
end function

Dim h as N
Dim oGrid as P
Dim var_Column as P
Dim var_Column1 as local
Dim var_ConditionalFormat as P
Dim var_Editor as P
Dim var_Items as P
Dim var_Items1 as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.BeginUpdate()
var_ConditionalFormat = oGrid.ConditionalFormats.Add("%0 >= 0")
	var_ConditionalFormat.Bold = .t.
	var_ConditionalFormat.ForeColor = 255
	var_ConditionalFormat.ApplyTo = 0
var_Column = oGrid.Columns.Add("Numbers")
	var_Editor = var_Column.Editor
		var_Editor.Numeric = -1
		var_Editor.EditType = 4
	var_Column.SortType = 1
' oGrid.Columns.Add("Total").Visible = .f.
var_Column1 = oGrid.Columns.Add("Total")
oGrid.TemplateDef = "dim var_Column1"
oGrid.TemplateDef = var_Column1
oGrid.Template = "var_Column1.Visible = False"

var_Items = oGrid.Items
	' var_Items.LockedItemCount(2) = 1
	oGrid.TemplateDef = "dim var_Items"
	oGrid.TemplateDef = var_Items
	oGrid.Template = "var_Items.LockedItemCount(2) = 1"

	h = var_Items.LockedItem(2,0)
	' var_Items.ItemDivider(h) = 1
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.ItemDivider(h) = 1"

	' var_Items.ItemDividerLine(h) = 0
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.ItemDividerLine(h) = 0"

	' var_Items.ItemBackColor(h) = 15790320
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.ItemBackColor(h) = 15790320"

	' var_Items.CellValue(h,1) = "sum(all,dir,dbl(%0))"
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellValue(h,1) = `sum(all,dir,dbl(%0))`"

	' var_Items.CellValueFormat(h,1) = 5 'exTotalField + exHTML
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellValueFormat(h,1) = 5"

	' var_Items.CellHAlignment(h,1) = 2
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellHAlignment(h,1) = 2"

	' var_Items.FormatCell(h,1) = "'Total: <b><fgcolor=0000FF>'+(value format ``)"
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.FormatCell(h,1) = `'Total: <b><fgcolor=0000FF>'+(value format ````)`"

var_Items1 = oGrid.Items
	var_Items1.AddItem(100)
	var_Items1.AddItem(-25)
	var_Items1.AddItem(31)
	var_Items1.AddItem(-48)
oGrid.EndUpdate()

1114
ADODB Requery sample

' Occurs when user clicks on the cell's button.
function ButtonClick as v (Item  as  OLE::Exontrol.Grid.1::HITEM,ColIndex  as  N,Key  as  A)
	Dim cmd as P
	oGrid = topparent:CONTROL_ACTIVEX1.activex
	cmd = OLE.Create("ADODB.Command")
		cmd.ActiveConnection = oGrid.DataSource.ActiveConnection
		cmd.CommandText = "INSERT INTO Orders (EmployeeID) VALUES(12345)"
		cmd.CommandType = 1
		cmd.Execute()
	oGrid.DataSource.Requery()
end function

' Fired when an internal error occurs.
function Error as v (Error  as  N,Description  as  C)
	oGrid = topparent:CONTROL_ACTIVEX1.activex
	? Description 
end function

Dim h as N
Dim oGrid as P
Dim rs as P
Dim var_ConditionalFormat as local
Dim var_Items as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.BeginUpdate()
oGrid.HeaderAppearance = 4
oGrid.ColumnAutoResize = .f.
rs = OLE.Create("ADODB.Recordset")
	rs.Open("Select * From Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExGrid\Sample\Access\misc.accdb",1,3)
oGrid.DataSource = rs
' oGrid.ConditionalFormats.Add("%1=12345").BackColor = 15790320
var_ConditionalFormat = oGrid.ConditionalFormats.Add("%1=12345")
oGrid.TemplateDef = "dim var_ConditionalFormat"
oGrid.TemplateDef = var_ConditionalFormat
oGrid.Template = "var_ConditionalFormat.BackColor = 15790320"

var_Items = oGrid.Items
	' var_Items.LockedItemCount(0) = 1
	oGrid.TemplateDef = "dim var_Items"
	oGrid.TemplateDef = var_Items
	oGrid.Template = "var_Items.LockedItemCount(0) = 1"

	h = var_Items.LockedItem(0,0)
	' var_Items.ItemDivider(h) = 0
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.ItemDivider(h) = 0"

	' var_Items.CellHasButton(h,0) = .t.
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellHasButton(h,0) = True"

	' var_Items.CellValue(h,0) = "Requery (add a new record, using ADODB.Command)"
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellValue(h,0) = `Requery (add a new record, using ADODB.Command)`"

	' var_Items.CellHAlignment(h,0) = 1
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellHAlignment(h,0) = 1"

oGrid.EndUpdate()

1113
I am using DetectAddNew property, but no new items is added when AddNew is performed

' Occurs when user clicks on the cell's button.
function ButtonClick as v (Item  as  OLE::Exontrol.Grid.1::HITEM,ColIndex  as  N,Key  as  A)
	Dim var_Recordset as P
	oGrid = topparent:CONTROL_ACTIVEX1.activex
	var_Recordset = oGrid.DataSource
		var_Recordset.AddNew("EmployeeID",123)
		var_Recordset.Update()
end function

' Fired when an internal error occurs.
function Error as v (Error  as  N,Description  as  C)
	oGrid = topparent:CONTROL_ACTIVEX1.activex
	? Description 
end function

Dim h as N
Dim oGrid as P
Dim rs as P
Dim var_Items as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.BeginUpdate()
oGrid.HeaderAppearance = 4
oGrid.ColumnAutoResize = .f.
rs = OLE.Create("ADODB.Recordset")
	rs.Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExGrid\Sample\Access\misc.accdb",1,3)
oGrid.DataSource = rs
var_Items = oGrid.Items
	' var_Items.LockedItemCount(0) = 1
	oGrid.TemplateDef = "dim var_Items"
	oGrid.TemplateDef = var_Items
	oGrid.Template = "var_Items.LockedItemCount(0) = 1"

	h = var_Items.LockedItem(0,0)
	' var_Items.ItemDivider(h) = 0
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.ItemDivider(h) = 0"

	' var_Items.CellHasButton(h,0) = .t.
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellHasButton(h,0) = True"

	' var_Items.CellValue(h,0) = "AddNew"
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellValue(h,0) = `AddNew`"

	' var_Items.CellHAlignment(h,0) = 1
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellHAlignment(h,0) = 1"

oGrid.DetectAddNew = .t.
oGrid.DetectDelete = .t.
oGrid.EndUpdate()

1112
I am skinning the control's header-bar, but the background of the header-bar is shown on each item in the filter-bar drop down panel. What can I do

Dim oGrid as P
Dim var_Appearance as P
Dim var_Column as P
Dim var_Items as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.BeginUpdate()
var_Appearance = oGrid.VisualAppearance
	var_Appearance.Add(1,"gBFL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PgyMAADBzAHDSIoPCOUpWjObIKE8NJOHKIwPEaTprBsHpdjWLB9AieQ+DQYwQAAMR1EOZxWi+bx7HcWQ8msfRYnnDhQACRwxgwc5rGaMZPE0ZxqjWNZtgyRwAAyTZEnuXJzEyAx2kQcxNkye5cEy3cYAcANrGAIH4OAhx3gNGGPAfgIR8jBA4McBMARViHH4HQOYmxuCpF2MsecEQVBvGQCcIQvA6i2CAAIARAQ=")
	var_Appearance.Add(2,"gBFLBCJwBAEHhEJAAEhABZEGACAADACAxRDgMQBQKAAzQFAYcBqGqGAAGQZxYgmFgAQhFcZQSKUOQTDKMIziYBYJhEMwwDhEIwjHCEEhsGIbJAGQBJCjWGodQLOEgzNC0IxNFCQILhEZJADKII8TTOU5UPRESwTE4cKBmKhQCo2NpKR7VUTxCKQahLLivoCjBT8EzHMqtIzrCA6MpaP4pQjKcqwHJ8YyHEi0ZrjazKaj6T5AXDUcaWbbNVx3PK3aioOpLZrqOZZYzYFoABTuJzPMSyIhxXD8cweaZvSpLExVYK9BY3PbKMgxC77QgTIpDaQMNS6PjtF43PAALLFUaNYzoOKzABMHATBIXAYJCwIIR5G7ID4BbQcCQAHL9DBaEEIAEEISgGhMGZQmocgymmIRQkIEQ2BcGgbEIRQci8XaMBqTRVgSAZHG+S5pnOep+D6f4vjec5zn0fpfmgBgAH6TRoBYBoAh+eAmAiAgPFgNArgOQpIESdoEmCOAOAqBYfFGAgaEaBgYHYFYFmIB5UiGCJUgKCgmgeYoHk4BgCmKRQiCwApgHgYgyH8B54lQU4NkMeJlBoDgjkiXBTg0R54iYIR+koeQVBoKpkgkChKhEJBkF4SFEjkDgJhFQoeEmDJlBeehUhWJQJGIXoICWOQ6FeFIlhkfhlDsSJpiQVoamaSY2G6G5nAmRhpCOH5pkwVYdmeCZmHqHpnkmdhzhmaAIFiax8AABAEICA==")
oGrid.BackColorHeader = 16777216
oGrid.ForeColorHeader = 8421504
oGrid.Template = "Background(0) = 33554432" // oGrid.Background(0) = 33554432
oGrid.Template = "Background(26) = 16777215" // oGrid.Background(26) = 16777215
oGrid.Template = "Background(27) = 65536" // oGrid.Background(27) = 65536
oGrid.Template = "Background(20) = 33521664" // oGrid.Background(20) = 33521664
oGrid.Template = "Background(21) = 15790320" // oGrid.Background(21) = 15790320
oGrid.Template = "Background(32) = -1" // oGrid.Background(32) = -1
oGrid.HeaderHeight = 24
oGrid.BackColorLevelHeader = oGrid.BackColor
var_Column = oGrid.Columns.Add("Filter")
	var_Column.DisplayFilterButton = .t.
	var_Column.DisplayFilterPattern = .f.
	var_Column.FilterList = 9504 'exShowExclude + exShowFocusItem + exShowCheckBox + exSortItemsAsc
	' var_Column.Def(52) = 2
	oGrid.TemplateDef = "dim var_Column"
	oGrid.TemplateDef = var_Column
	oGrid.Template = "var_Column.Def(52) = 2"

	' var_Column.Def(53) = 2
	oGrid.TemplateDef = "dim var_Column"
	oGrid.TemplateDef = var_Column
	oGrid.Template = "var_Column.Def(53) = 2"

var_Items = oGrid.Items
	var_Items.AddItem("A")
	var_Items.AddItem("B")
	var_Items.AddItem("C")
	var_Items.AddItem("D")
oGrid.EndUpdate()

1111
How can I change the font for entire column (method 3)

' Occurs after a new Item has been inserted to Items collection.
function AddItem as v (Item  as  OLE::Exontrol.Grid.1::HITEM)
	Dim var_Items as P
	oGrid = topparent:CONTROL_ACTIVEX1.activex
	var_Items = oGrid.Items
		' var_Items.CellFont(Item,1) = oGrid.Columns.Item(1).Data
		oGrid.TemplateDef = "dim var_Items,Item"
		oGrid.TemplateDef = var_Items
		oGrid.TemplateDef = Item
		oGrid.Template = "var_Items.CellFont(Item,1) = Me.Columns.Item(1).Data"
		' var_Items.CellBold(Item,1) = .t.
		oGrid.TemplateDef = "dim var_Items,Item"
		oGrid.TemplateDef = var_Items
		oGrid.TemplateDef = Item
		oGrid.Template = "var_Items.CellBold(Item,1) = True"
		' var_Items.CellForeColor(Item,1) = 255
		oGrid.TemplateDef = "dim var_Items,Item"
		oGrid.TemplateDef = var_Items
		oGrid.TemplateDef = Item
		oGrid.Template = "var_Items.CellForeColor(Item,1) = 255"

end function

Dim f as P
Dim oGrid as P
Dim var_Column as P
Dim var_Items as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.BeginUpdate()
oGrid.HeaderHeight = 24
oGrid.HeaderAppearance = 4
oGrid.Columns.Add("C1")
var_Column = oGrid.Columns.Add("C2")
	var_Column.HTMLCaption = "<b><font Tahoma;14>C2"
	f = OLE.Create("StdFont")
		f.Name = "Tahoma"
		f.Size = 11
	var_Column.Data = f
var_Items = oGrid.Items
	' var_Items.CellValue(var_Items.AddItem(10),1) = 11
	oGrid.TemplateDef = "dim var_Items"
	oGrid.TemplateDef = var_Items
	oGrid.Template = "var_Items.CellValue(AddItem(10),1) = 11"

	' var_Items.CellValue(var_Items.AddItem(12),1) = 13
	oGrid.TemplateDef = "dim var_Items"
	oGrid.TemplateDef = var_Items
	oGrid.Template = "var_Items.CellValue(AddItem(12),1) = 13"

oGrid.EndUpdate()

1110
How can I change the font for entire column (method 2)

' Occurs after a new Item has been inserted to Items collection.
function AddItem as v (Item  as  OLE::Exontrol.Grid.1::HITEM)
	Dim f as P
	Dim var_Items as P
	oGrid = topparent:CONTROL_ACTIVEX1.activex
	var_Items = oGrid.Items
		f = OLE.Create("StdFont")
			f.Name = "Tahoma"
			f.Size = 11
		' var_Items.CellFont(Item,1) = f
		oGrid.TemplateDef = "dim var_Items,Item"
		oGrid.TemplateDef = var_Items
		oGrid.TemplateDef = Item
		oGrid.Template = "var_Items.CellFont(Item,1) = f"
		' var_Items.CellBold(Item,1) = .t.
		oGrid.TemplateDef = "dim var_Items,Item"
		oGrid.TemplateDef = var_Items
		oGrid.TemplateDef = Item
		oGrid.Template = "var_Items.CellBold(Item,1) = True"
		' var_Items.CellForeColor(Item,1) = 255
		oGrid.TemplateDef = "dim var_Items,Item"
		oGrid.TemplateDef = var_Items
		oGrid.TemplateDef = Item
		oGrid.Template = "var_Items.CellForeColor(Item,1) = 255"

end function

Dim oGrid as P
Dim var_Column as local
Dim var_Items as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.BeginUpdate()
oGrid.HeaderHeight = 24
oGrid.HeaderAppearance = 4
oGrid.Columns.Add("C1")
' oGrid.Columns.Add("C2").HTMLCaption = "<b><font Tahoma;14>C2"
var_Column = oGrid.Columns.Add("C2")
oGrid.TemplateDef = "dim var_Column"
oGrid.TemplateDef = var_Column
oGrid.Template = "var_Column.HTMLCaption = `<b><font Tahoma;14>C2`"

var_Items = oGrid.Items
	' var_Items.CellValue(var_Items.AddItem(10),1) = 11
	oGrid.TemplateDef = "dim var_Items"
	oGrid.TemplateDef = var_Items
	oGrid.Template = "var_Items.CellValue(AddItem(10),1) = 11"

	' var_Items.CellValue(var_Items.AddItem(12),1) = 13
	oGrid.TemplateDef = "dim var_Items"
	oGrid.TemplateDef = var_Items
	oGrid.Template = "var_Items.CellValue(AddItem(12),1) = 13"

oGrid.EndUpdate()

1109
How can I change the font for entire column (method 1)

Dim f as P
Dim oGrid as P
Dim var_Column as local
Dim var_ConditionalFormat as P
Dim var_Items as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.BeginUpdate()
var_ConditionalFormat = oGrid.ConditionalFormats.Add("1")
	var_ConditionalFormat.Bold = .t.
	var_ConditionalFormat.ForeColor = 255
	f = OLE.Create("StdFont")
		f.Name = "Tahoma"
		f.Size = 11
	var_ConditionalFormat.Font = f
	var_ConditionalFormat.ApplyTo = 1 '1 + 
oGrid.HeaderHeight = 24
oGrid.HeaderAppearance = 4
oGrid.Columns.Add("C1")
' oGrid.Columns.Add("C2").HTMLCaption = "<b><font Tahoma;14>C2"
var_Column = oGrid.Columns.Add("C2")
oGrid.TemplateDef = "dim var_Column"
oGrid.TemplateDef = var_Column
oGrid.Template = "var_Column.HTMLCaption = `<b><font Tahoma;14>C2`"

var_Items = oGrid.Items
	' var_Items.CellValue(var_Items.AddItem(10),1) = 11
	oGrid.TemplateDef = "dim var_Items"
	oGrid.TemplateDef = var_Items
	oGrid.Template = "var_Items.CellValue(AddItem(10),1) = 11"

	' var_Items.CellValue(var_Items.AddItem(12),1) = 13
	oGrid.TemplateDef = "dim var_Items"
	oGrid.TemplateDef = var_Items
	oGrid.Template = "var_Items.CellValue(AddItem(12),1) = 13"

oGrid.EndUpdate()

1108
I am using ExComboBox as an user editor, how can I display a different column

' Fired the user editor is about to be opened.
function UserEditorClose as v (Object  as  P,Item  as  OLE::Exontrol.Grid.1::HITEM,ColIndex  as  N)
	' Items.CellValue(Item,ColIndex) = Object.Select("OrderID")
	oGrid = topparent:CONTROL_ACTIVEX1.activex
end function

' Occurs when an user editor fires an event.
function UserEditorOleEvent as v (Object  as  P,Ev  as  OLE::Exontrol.Grid.1::IOleEvent,CloseEditor  as  L,Item  as  OLE::Exontrol.Grid.1::HITEM,ColIndex  as  N)
	oGrid = topparent:CONTROL_ACTIVEX1.activex
	? Ev 
end function

' Occurs when an user editor is about to be opened.
function UserEditorOpen as v (Object  as  P,Item  as  OLE::Exontrol.Grid.1::HITEM,ColIndex  as  N)
	' Object.Select("OrderID") = Me.Items.CellValue(Item,ColIndex)
	oGrid = topparent:CONTROL_ACTIVEX1.activex
end function

Dim h as N
Dim oGrid as P
Dim var_Editor as P
Dim var_Items as P
Dim var_Object as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.BeginUpdate()
oGrid.SortOnClick = 0
var_Editor = oGrid.Columns.Add("Exontrol.ComboBox").Editor
	var_Editor.EditType = 16
	var_Editor.UserEditor("Exontrol.ComboBox","")
	var_Object = var_Editor.UserEditorObject
oGrid.DrawGridLines = -2
oGrid.TreeColumnIndex = -1
oGrid.DefaultItemHeight = 21
var_Items = oGrid.Items
	h = var_Items.AddItem("shows always the drop-down editor")
	' var_Items.CellHAlignment(h,0) = 1
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellHAlignment(h,0) = 1"

	' var_Items.ItemDivider(h) = 0
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.ItemDivider(h) = 0"

	' var_Items.ItemDividerLineAlignment(h) = 1
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.ItemDividerLineAlignment(h) = 1"

	' var_Items.SelectableItem(h) = .f.
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.SelectableItem(h) = False"

	' var_Items.EnableItem(h) = .f.
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.EnableItem(h) = False"

	' var_Items.CellEditorVisible(var_Items.AddItem(10248),0) = 1
	oGrid.TemplateDef = "dim var_Items"
	oGrid.TemplateDef = var_Items
	oGrid.Template = "var_Items.CellEditorVisible(AddItem(10248),0) = 1"

	' var_Items.CellEditorVisible(var_Items.AddItem(10249),0) = 1
	oGrid.TemplateDef = "dim var_Items"
	oGrid.TemplateDef = var_Items
	oGrid.Template = "var_Items.CellEditorVisible(AddItem(10249),0) = 1"

	' var_Items.CellEditorVisible(var_Items.AddItem(10250),0) = 1
	oGrid.TemplateDef = "dim var_Items"
	oGrid.TemplateDef = var_Items
	oGrid.Template = "var_Items.CellEditorVisible(AddItem(10250),0) = 1"

	h = var_Items.AddItem("shows the drop-down editor when user clicks it")
	' var_Items.CellHAlignment(h,0) = 1
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellHAlignment(h,0) = 1"

	' var_Items.ItemDivider(h) = 0
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.ItemDivider(h) = 0"

	' var_Items.ItemDividerLineAlignment(h) = 1
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.ItemDividerLineAlignment(h) = 1"

	' var_Items.SelectableItem(h) = .f.
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.SelectableItem(h) = False"

	' var_Items.EnableItem(h) = .f.
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.EnableItem(h) = False"

	var_Items.AddItem(10248)
	var_Items.AddItem(10249)
	var_Items.AddItem(10250)
oGrid.EndUpdate()

1107
The ItemHeight property is not working (method 2)

Dim h as N
Dim oGrid as P
Dim var_Column as local
Dim var_Items as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.BeginUpdate()
oGrid.ColumnAutoResize = .f.
oGrid.ScrollBySingleLine = .t.
' oGrid.Columns.Add("Column").Width = 128
var_Column = oGrid.Columns.Add("Column")
oGrid.TemplateDef = "dim var_Column"
oGrid.TemplateDef = var_Column
oGrid.Template = "var_Column.Width = 128"

var_Items = oGrid.Items
	' var_Items.CellSingleLine(var_Items.AddItem("This is a bit of text that should break the line"),0) = 0
	oGrid.TemplateDef = "dim var_Items"
	oGrid.TemplateDef = var_Items
	oGrid.Template = "var_Items.CellSingleLine(AddItem(`This is a bit of text that should break the line`),0) = 0"

	h = var_Items.AddItem("")
	' var_Items.ItemDivider(h) = 0
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.ItemDivider(h) = 0"

	' var_Items.SelectableItem(h) = .f.
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.SelectableItem(h) = False"

	' var_Items.ItemDividerLineAlignment(h) = 1
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.ItemDividerLineAlignment(h) = 1"

	' var_Items.ItemHeight(h) = 3
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.ItemHeight(h) = 3"

	' var_Items.CellSingleLine(var_Items.AddItem("This is a bit of text that should break the line"),0) = 0
	oGrid.TemplateDef = "dim var_Items"
	oGrid.TemplateDef = var_Items
	oGrid.Template = "var_Items.CellSingleLine(AddItem(`This is a bit of text that should break the line`),0) = 0"

oGrid.EndUpdate()

1106
The ItemHeight property is not working (method 1)

Dim h as N
Dim oGrid as P
Dim var_Column as P
Dim var_Items as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.BeginUpdate()
oGrid.ColumnAutoResize = .f.
oGrid.ScrollBySingleLine = .t.
var_Column = oGrid.Columns.Add("Column")
	var_Column.Width = 128
	' var_Column.Def(16) = 0
	oGrid.TemplateDef = "dim var_Column"
	oGrid.TemplateDef = var_Column
	oGrid.Template = "var_Column.Def(16) = 0"

var_Items = oGrid.Items
	var_Items.AddItem("This is a bit of text that should break the line")
	h = var_Items.AddItem("")
	' var_Items.ItemDivider(h) = 0
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.ItemDivider(h) = 0"

	' var_Items.SelectableItem(h) = .f.
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.SelectableItem(h) = False"

	' var_Items.ItemDividerLineAlignment(h) = 1
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.ItemDividerLineAlignment(h) = 1"

	' var_Items.ItemMinHeight(h) = 3
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.ItemMinHeight(h) = 3"

	' var_Items.ItemMaxHeight(h) = 3
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.ItemMaxHeight(h) = 3"

	var_Items.AddItem("This is a bit of text that should break the line")
oGrid.EndUpdate()

1105
How do I add a total field locked at the bottom of the control

' Occurs after a new Group Item has been inserted to Items collection.
function AddGroupItem as v (Item  as  OLE::Exontrol.Grid.1::HITEM)
	Dim var_Items as P
	oGrid = topparent:CONTROL_ACTIVEX1.activex
	var_Items = oGrid.Items
		' var_Items.ItemDividerLine(Item) = 0
		oGrid.TemplateDef = "dim var_Items,Item"
		oGrid.TemplateDef = var_Items
		oGrid.TemplateDef = Item
		oGrid.Template = "var_Items.ItemDividerLine(Item) = 0"
		' var_Items.FormatCell(Item,var_Items.GroupItem(Item)) = "value + ` Min: <b>` + %13 + `</b> Max: <b>` + %14 + `</b> Sum: <b>` + %15 + `</b>, of Freight column`"
		oGrid.TemplateDef = "dim var_Items,Item"
		oGrid.TemplateDef = var_Items
		oGrid.TemplateDef = Item
		oGrid.Template = "var_Items.FormatCell(Item,GroupItem(Item)) = `value + `` Min: <b>`` + %13 + ``</b> Max: <b>`` + %14 + ``</b> Sum: <b>`` + %15 + ``</b>, of Freight column```"
		' var_Items.CellValue(Item,"Min") = "min(current,all,dbl(%6))"
		oGrid.TemplateDef = "dim var_Items,Item"
		oGrid.TemplateDef = var_Items
		oGrid.TemplateDef = Item
		oGrid.Template = "var_Items.CellValue(Item,`Min`) = `min(current,all,dbl(%6))`"
		' var_Items.CellValueFormat(Item,"Min") = 4
		oGrid.TemplateDef = "dim var_Items,Item"
		oGrid.TemplateDef = var_Items
		oGrid.TemplateDef = Item
		oGrid.Template = "var_Items.CellValueFormat(Item,`Min`) = 4"
		' var_Items.CellValue(Item,"Max") = "max(current,all,dbl(%6))"
		oGrid.TemplateDef = "dim var_Items,Item"
		oGrid.TemplateDef = var_Items
		oGrid.TemplateDef = Item
		oGrid.Template = "var_Items.CellValue(Item,`Max`) = `max(current,all,dbl(%6))`"
		' var_Items.CellValueFormat(Item,"Max") = 4
		oGrid.TemplateDef = "dim var_Items,Item"
		oGrid.TemplateDef = var_Items
		oGrid.TemplateDef = Item
		oGrid.Template = "var_Items.CellValueFormat(Item,`Max`) = 4"
		' var_Items.CellValue(Item,"Sum") = "sum(current,all,dbl(%6))"
		oGrid.TemplateDef = "dim var_Items,Item"
		oGrid.TemplateDef = var_Items
		oGrid.TemplateDef = Item
		oGrid.Template = "var_Items.CellValue(Item,`Sum`) = `sum(current,all,dbl(%6))`"
		' var_Items.CellValueFormat(Item,"Sum") = 4
		oGrid.TemplateDef = "dim var_Items,Item"
		oGrid.TemplateDef = var_Items
		oGrid.TemplateDef = Item
		oGrid.Template = "var_Items.CellValueFormat(Item,`Sum`) = 4"
		' var_Items.ItemBackColor(Item) = 15790320
		oGrid.TemplateDef = "dim var_Items,Item"
		oGrid.TemplateDef = var_Items
		oGrid.TemplateDef = Item
		oGrid.Template = "var_Items.ItemBackColor(Item) = 15790320"

end function

' Occurs when the user changes the cell's content.
function Change as v (Item  as  OLE::Exontrol.Grid.1::HITEM,ColIndex  as  N,NewValue  as  A)
	oGrid = topparent:CONTROL_ACTIVEX1.activex
	oGrid.Refresh()
end function

Dim hL as N
Dim oGrid as P
Dim rs as P
Dim var_Column as P
Dim var_Column1 as P
Dim var_Column2 as P
Dim var_Columns as P
Dim var_Items as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.BeginUpdate()
oGrid.HasLines = 0
oGrid.Template = "Description(26) = `Show/Hide`" // oGrid.Description(26) = "Show/Hide"
oGrid.ColumnsFloatBarSortOrder = 1
oGrid.ColumnsFloatBarVisible = 2
oGrid.ColumnAutoResize = .f.
oGrid.BackColorSortBar = 15790320
rs = OLE.Create("ADOR.Recordset")
	rs.Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExGrid\Sample\Access\misc.accdb",3,3)
oGrid.DataSource = rs
oGrid.SingleSort = .f.
oGrid.SortBarVisible = .t.
oGrid.AllowGroupBy = .t.
oGrid.SortBarCaption = "Drag a <b>column</b> header here to group by that column."
var_Columns = oGrid.Columns
	var_Column = var_Columns.Add("Min")
		var_Column.Visible = .f.
		var_Column.AllowDragging = .f.
	var_Column = var_Columns.Add("Max")
		var_Column.Visible = .f.
		var_Column.Visible = .f.
		var_Column.AllowDragging = .f.
	var_Column1 = var_Columns.Add("Sum")
		var_Column1.Visible = .f.
		var_Column1.Visible = .f.
		var_Column1.AllowDragging = .f.
var_Column2 = oGrid.Columns.Item("Freight")
	var_Column2.FormatColumn = "currency(value)"
	' var_Column2.Def(4) = 12895487
	oGrid.TemplateDef = "dim var_Column2"
	oGrid.TemplateDef = var_Column2
	oGrid.Template = "var_Column2.Def(4) = 12895487"

	' var_Column2.Def(7) = var_Column2.Def(4)
	oGrid.TemplateDef = "dim var_Column2"
	oGrid.TemplateDef = var_Column2
	oGrid.Template = "var_Column2.Def(7) = Def(4)"

	var_Column2.HeaderBold = .t.
	var_Column2.AllowGroupBy = .f.
	var_Column2.Alignment = 2
oGrid.ScrollBySingleLine = .f.
var_Items = oGrid.Items
	' var_Items.LockedItemCount(2) = 2
	oGrid.TemplateDef = "dim var_Items"
	oGrid.TemplateDef = var_Items
	oGrid.Template = "var_Items.LockedItemCount(2) = 2"

	hL = var_Items.LockedItem(2,0)
	' var_Items.ItemDivider(hL) = 0
	oGrid.TemplateDef = "dim var_Items,hL"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = hL
	oGrid.Template = "var_Items.ItemDivider(hL) = 0"

	' var_Items.ItemHeight(hL) = 3
	oGrid.TemplateDef = "dim var_Items,hL"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = hL
	oGrid.Template = "var_Items.ItemHeight(hL) = 3"

	' var_Items.ItemDividerLineAlignment(hL) = 2
	oGrid.TemplateDef = "dim var_Items,hL"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = hL
	oGrid.Template = "var_Items.ItemDividerLineAlignment(hL) = 2"

	' var_Items.ItemDividerLine(hL) = 2
	oGrid.TemplateDef = "dim var_Items,hL"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = hL
	oGrid.Template = "var_Items.ItemDividerLine(hL) = 2"

	hL = var_Items.LockedItem(2,1)
	' var_Items.CellValue(hL,6) = "sum(all,rec,dbl(%6))"
	oGrid.TemplateDef = "dim var_Items,hL"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = hL
	oGrid.Template = "var_Items.CellValue(hL,6) = `sum(all,rec,dbl(%6))`"

	' var_Items.CellValueFormat(hL,6) = 4
	oGrid.TemplateDef = "dim var_Items,hL"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = hL
	oGrid.Template = "var_Items.CellValueFormat(hL,6) = 4"

	' var_Items.ItemHeight(hL) = 24
	oGrid.TemplateDef = "dim var_Items,hL"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = hL
	oGrid.Template = "var_Items.ItemHeight(hL) = 24"

	' var_Items.ItemBold(hL) = .t.
	oGrid.TemplateDef = "dim var_Items,hL"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = hL
	oGrid.Template = "var_Items.ItemBold(hL) = True"

oGrid.Columns.Item("EmployeeID").SortOrder = .t.
oGrid.EndUpdate()

1104
How can I add a total field, when I use grouping

' Occurs after a new Group Item has been inserted to Items collection.
function AddGroupItem as v (Item  as  OLE::Exontrol.Grid.1::HITEM)
	Dim var_Items as P
	oGrid = topparent:CONTROL_ACTIVEX1.activex
	var_Items = oGrid.Items
		' var_Items.ItemDividerLine(Item) = 0
		oGrid.TemplateDef = "dim var_Items,Item"
		oGrid.TemplateDef = var_Items
		oGrid.TemplateDef = Item
		oGrid.Template = "var_Items.ItemDividerLine(Item) = 0"
		' var_Items.FormatCell(Item,var_Items.GroupItem(Item)) = "value + ` Min: <b>` + %13 + `</b> Max: <b>` + %14 + `</b> Sum: <b>` + %15 + `</b>, of Freight column`"
		oGrid.TemplateDef = "dim var_Items,Item"
		oGrid.TemplateDef = var_Items
		oGrid.TemplateDef = Item
		oGrid.Template = "var_Items.FormatCell(Item,GroupItem(Item)) = `value + `` Min: <b>`` + %13 + ``</b> Max: <b>`` + %14 + ``</b> Sum: <b>`` + %15 + ``</b>, of Freight column```"
		' var_Items.CellValue(Item,"Min") = "min(current,all,dbl(%6))"
		oGrid.TemplateDef = "dim var_Items,Item"
		oGrid.TemplateDef = var_Items
		oGrid.TemplateDef = Item
		oGrid.Template = "var_Items.CellValue(Item,`Min`) = `min(current,all,dbl(%6))`"
		' var_Items.CellValueFormat(Item,"Min") = 4
		oGrid.TemplateDef = "dim var_Items,Item"
		oGrid.TemplateDef = var_Items
		oGrid.TemplateDef = Item
		oGrid.Template = "var_Items.CellValueFormat(Item,`Min`) = 4"
		' var_Items.CellValue(Item,"Max") = "max(current,all,dbl(%6))"
		oGrid.TemplateDef = "dim var_Items,Item"
		oGrid.TemplateDef = var_Items
		oGrid.TemplateDef = Item
		oGrid.Template = "var_Items.CellValue(Item,`Max`) = `max(current,all,dbl(%6))`"
		' var_Items.CellValueFormat(Item,"Max") = 4
		oGrid.TemplateDef = "dim var_Items,Item"
		oGrid.TemplateDef = var_Items
		oGrid.TemplateDef = Item
		oGrid.Template = "var_Items.CellValueFormat(Item,`Max`) = 4"
		' var_Items.CellValue(Item,"Sum") = "sum(current,all,dbl(%6))"
		oGrid.TemplateDef = "dim var_Items,Item"
		oGrid.TemplateDef = var_Items
		oGrid.TemplateDef = Item
		oGrid.Template = "var_Items.CellValue(Item,`Sum`) = `sum(current,all,dbl(%6))`"
		' var_Items.CellValueFormat(Item,"Sum") = 4
		oGrid.TemplateDef = "dim var_Items,Item"
		oGrid.TemplateDef = var_Items
		oGrid.TemplateDef = Item
		oGrid.Template = "var_Items.CellValueFormat(Item,`Sum`) = 4"
		' var_Items.ItemBackColor(Item) = 15790320
		oGrid.TemplateDef = "dim var_Items,Item"
		oGrid.TemplateDef = var_Items
		oGrid.TemplateDef = Item
		oGrid.Template = "var_Items.ItemBackColor(Item) = 15790320"

end function

' Occurs when the user changes the cell's content.
function Change as v (Item  as  OLE::Exontrol.Grid.1::HITEM,ColIndex  as  N,NewValue  as  A)
	oGrid = topparent:CONTROL_ACTIVEX1.activex
	oGrid.Refresh()
end function

Dim hL as N
Dim oGrid as P
Dim rs as P
Dim var_Column as local
Dim var_Column1 as local
Dim var_Column2 as local
Dim var_Column3 as P
Dim var_Columns as P
Dim var_Items as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.BeginUpdate()
oGrid.HasLines = 0
oGrid.ColumnAutoResize = .f.
oGrid.BackColorSortBar = 15790320
rs = OLE.Create("ADOR.Recordset")
	rs.Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExGrid\Sample\Access\misc.accdb",3,3)
oGrid.DataSource = rs
oGrid.SingleSort = .f.
oGrid.SortBarVisible = .t.
oGrid.AllowGroupBy = .t.
oGrid.Columns.Item(1).SortOrder = .t.
var_Columns = oGrid.Columns
	' var_Columns.Add("Min").Visible = .f.
	var_Column = var_Columns.Add("Min")
	oGrid.TemplateDef = "dim var_Column"
	oGrid.TemplateDef = var_Column
	oGrid.Template = "var_Column.Visible = False"

	' var_Columns.Add("Max").Visible = .f.
	var_Column1 = var_Columns.Add("Max")
	oGrid.TemplateDef = "dim var_Column1"
	oGrid.TemplateDef = var_Column1
	oGrid.Template = "var_Column1.Visible = False"

	' var_Columns.Add("Sum").Visible = .f.
	var_Column2 = var_Columns.Add("Sum")
	oGrid.TemplateDef = "dim var_Column2"
	oGrid.TemplateDef = var_Column2
	oGrid.Template = "var_Column2.Visible = False"

var_Column3 = oGrid.Columns.Item("Freight")
	' var_Column3.Def(4) = 12895487
	oGrid.TemplateDef = "dim var_Column3"
	oGrid.TemplateDef = var_Column3
	oGrid.Template = "var_Column3.Def(4) = 12895487"

	' var_Column3.Def(7) = var_Column3.Def(4)
	oGrid.TemplateDef = "dim var_Column3"
	oGrid.TemplateDef = var_Column3
	oGrid.Template = "var_Column3.Def(7) = Def(4)"

	var_Column3.HeaderBold = .t.
	var_Column3.AllowGroupBy = .f.
oGrid.ScrollBySingleLine = .f.
var_Items = oGrid.Items
	' var_Items.LockedItemCount(2) = 1
	oGrid.TemplateDef = "dim var_Items"
	oGrid.TemplateDef = var_Items
	oGrid.Template = "var_Items.LockedItemCount(2) = 1"

	hL = var_Items.LockedItem(2,0)
	' var_Items.ItemDivider(hL) = 0
	oGrid.TemplateDef = "dim var_Items,hL"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = hL
	oGrid.Template = "var_Items.ItemDivider(hL) = 0"

	' var_Items.ItemHeight(hL) = 24
	oGrid.TemplateDef = "dim var_Items,hL"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = hL
	oGrid.Template = "var_Items.ItemHeight(hL) = 24"

	' var_Items.ItemDividerLineAlignment(hL) = 2
	oGrid.TemplateDef = "dim var_Items,hL"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = hL
	oGrid.Template = "var_Items.ItemDividerLineAlignment(hL) = 2"

	' var_Items.ItemDividerLine(hL) = 2
	oGrid.TemplateDef = "dim var_Items,hL"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = hL
	oGrid.Template = "var_Items.ItemDividerLine(hL) = 2"

	' var_Items.CellValue(hL,0) = "sum(all,rec,dbl(%6))"
	oGrid.TemplateDef = "dim var_Items,hL"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = hL
	oGrid.Template = "var_Items.CellValue(hL,0) = `sum(all,rec,dbl(%6))`"

	' var_Items.CellValueFormat(hL,0) = 5 'exTotalField + exHTML
	oGrid.TemplateDef = "dim var_Items,hL"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = hL
	oGrid.Template = "var_Items.CellValueFormat(hL,0) = 5"

	' var_Items.CellHAlignment(hL,0) = 2
	oGrid.TemplateDef = "dim var_Items,hL"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = hL
	oGrid.Template = "var_Items.CellHAlignment(hL,0) = 2"

	' var_Items.FormatCell(hL,0) = "'Freight: <bgcolor=FFC4C4> '+(value format ``) + ` `"
	oGrid.TemplateDef = "dim var_Items,hL"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = hL
	oGrid.Template = "var_Items.FormatCell(hL,0) = `'Freight: <bgcolor=FFC4C4> '+(value format ````) + `` ```"

oGrid.EndUpdate()

1103
How do I use the ColumnsFloatBarVisible on exColumnsFloatBarVisibleIncludeCheckColumns

Dim oGrid as P
Dim var_Column as local
Dim var_Column1 as local
Dim var_Columns as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.BeginUpdate()
oGrid.ColumnAutoResize = .f.
oGrid.HeaderAppearance = 4
var_Columns = oGrid.Columns
	var_Columns.Add("City")
	' var_Columns.Add("Start").Visible = .f.
	var_Column = var_Columns.Add("Start")
	oGrid.TemplateDef = "dim var_Column"
	oGrid.TemplateDef = var_Column
	oGrid.Template = "var_Column.Visible = False"

	' var_Columns.Add("End").Visible = .f.
	var_Column1 = var_Columns.Add("End")
	oGrid.TemplateDef = "dim var_Column1"
	oGrid.TemplateDef = var_Column1
	oGrid.Template = "var_Column1.Visible = False"

oGrid.Template = "Description(26) = `Show/Hide`" // oGrid.Description(26) = "Show/Hide"
oGrid.ColumnsFloatBarSortOrder = 1
oGrid.ColumnsFloatBarVisible = 2
oGrid.EndUpdate()

1102
How do I use the ColumnsFloatBarVisible on exColumnsFloatBarVisibleIncludeHiddenColumn

Dim oGrid as P
Dim var_Column as local
Dim var_Column1 as local
Dim var_Columns as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.BeginUpdate()
oGrid.ColumnAutoResize = .f.
oGrid.HeaderAppearance = 4
var_Columns = oGrid.Columns
	var_Columns.Add("City")
	' var_Columns.Add("Start").Visible = .f.
	var_Column = var_Columns.Add("Start")
	oGrid.TemplateDef = "dim var_Column"
	oGrid.TemplateDef = var_Column
	oGrid.Template = "var_Column.Visible = False"

	' var_Columns.Add("End").Visible = .f.
	var_Column1 = var_Columns.Add("End")
	oGrid.TemplateDef = "dim var_Column1"
	oGrid.TemplateDef = var_Column1
	oGrid.Template = "var_Column1.Visible = False"

oGrid.Template = "Description(26) = `Show`" // oGrid.Description(26) = "Show"
oGrid.ColumnsFloatBarVisible = -1
oGrid.ColumnsFloatBarSortOrder = 1
oGrid.EndUpdate()

1101
How do I use the ColumnsFloatBarVisible on exColumnsFloatBarVisibleIncludeGroupByColumns

Dim oGrid as P
Dim var_Columns as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.BeginUpdate()
oGrid.ColumnAutoResize = .f.
oGrid.HeaderAppearance = 4
var_Columns = oGrid.Columns
	var_Columns.Add("City")
	var_Columns.Add("Start")
	var_Columns.Add("End")
oGrid.AllowGroupBy = .t.
oGrid.SortBarVisible = .t.
oGrid.SortBarCaption = "Drag a <b>column</b> header here to group by that column."
oGrid.BackColorSortBar = 16448250
oGrid.Template = "Description(26) = `Group-By`" // oGrid.Description(26) = "Group-By"
oGrid.ColumnsFloatBarVisible = 1
oGrid.ColumnsFloatBarSortOrder = 1
oGrid.Columns.Item("City").SortOrder = 1
oGrid.EndUpdate()