Understanding Data Binding

From Lianjapedia
Jump to: navigation, search
Quick Start Guide

You specify data binding in the "Data Source" in the "Attributes" Tab of the "Pages" workspace.

Formitem Attributes

Form, Canvas and Grid sections are typically bound to a table in a database. The table specified can be a native Lianja table or a “Virtual Table”.

Each formitem (Field or Gadget) can be bound to a table.column in the “Data source” attribute.

Typically the database, table and “Data source” are set automatically when you drag a table or column onto the page.

As you navigate between data the “Data source” is automatically updated in the UI.

As you edit data the “Data source” is automatically updated in the database. There is no coding required to accomplish display and editing of fields or gadgets.


Data binding works across Desktop, Web and Mobile Apps. No coding required.

Lianja UI Framework

The Lianja UI Framework is a feature rich application framework used to build custom UI elements for the Desktop, Web and Mobile devices. The classes, methods and properties in the framework are compatible with those in Visual FoxPro 9.0 but have been extensively extended to make it easier to build UIs for Apps that will run on the desktop, web and mobile devices. In particular, it has complete Layout Manager support, and provides the ability for each UI component to be skinned using CSS attributes (the Stylesheet property).

Pro Tip

We recommend you use Lianja UI Layouts to help you build a responsive UI.
These can be used in any of the supported scripting languages.

You use Lianja/VFP (Visual FoxPro compatible), JavaScript, TypeScript, Babel, Python or PHP with the Lianja UI Framework to build Custom Sections and Custom Gadgets. All Lianja UI Framework Classes provide integrated data binding to the underlying Lianja embedded database (the Controlsource property).

tb = createObject("textbox")
// table.column
tb.controlsource = "customer.lastname"
// a function call
tb.controlsource = "myfunc()"
// a macro expression
tb.controlsource = "{expression}"

When data binding is specified as an expression, the UI control will be non editable.