How to start?

The following screen shot, shows a general idea how parts and objects of the control are arranged:

Parts of Exontrol's eXGrid Component

click to enlarge

The following steps shows you progressively how to start programming the Exontrol's ExGrid component:

  • LoadXML / SaveXML methods, to load / save data using XML format.
  • DataSource property, to load / update / save data from a table, query, dataset and so on.
  • GetItems / PutItems methods, to load / save data from a/to safe array of data.
For instance, 
With Grid1
	.LoadXML "https://www.exontrol.net/testing.xml"
End With
loads control's data from specified URL.
  • Add method, adds a new column.
  • ExpandColumns property specifies the columns to be shown/hidden when the column is expanded or collapsed.
For instance, 
With Grid1
	With .Columns.Add("Check")
		.Position = 0
		.Def(exCellHasCheckBox) = True
	End With
End With
adds a new column that displays check-boxes, and that's the first visible column.
  • EditType method, specifies the built-in to be assigned to a cell or column.
  • Editor property, gets access to the column's built-in editor
  • CellEditorVisible property specifies the built-in editor for a particular cell.
For instance, 
With Grid1
	With .Columns.Add("Date")
		.Editor.EditType = DateType
	End With
End With
adds a new column that displays and edits column's data as date type.
For instance, 
With Grid1
	With .Items
		.AddItem "new item"
	End With
End With
adds a new item.
  • CellValue property, specifies the cell's value.
For instance, 
With Grid1
	With .Items
		h = .InsertItem(.FocusItem,"","item 1.1")
		.CellValue(h,1) = "item 1.2"
		.CellValue(h,2) = "item 1.3"
		.ExpandItem(.FocusItem) = True
	End With
End With
adds a new child item of the focused item, and fills the cell's value for the second and third column.
Send comments on this topic.
© 1999-2016 Exontrol. All rights reserved.