Difference between revisions of "Category:Grids"

From Lianjapedia
Jump to: navigation, search
(Desktop Browse)
(Business Rules)
Line 120: Line 120:
 
You can restrict what data is entered by a user using validation, [[Input Masks|input masks]], [[Choices|choicelists]] and much more.
 
You can restrict what data is entered by a user using validation, [[Input Masks|input masks]], [[Choices|choicelists]] and much more.
  
[[{{ns:file}}:grids_businessrules.png|800px|left|border|link={{filepath:grids_businessrules.png}}|Business Rules]]
+
[[{{ns:file}}:grids_businessrules.png|left|border|link={{filepath:grids_businessrules.png}}|Business Rules]]
 
<br clear=all>
 
<br clear=all>
  

Revision as of 09:30, 15 April 2024


Under Construction

Overview

In its simplest form a grid displays data in rows and columns with the ability to browse millions of records with built in pagination.

You can configure grids and their columns declaratively in the App Inspector by specifying attributes.

Split Grid Editing

Grids can be configured with split grid editing capabilities. This functionality splits the grid in two with the right hand side of the display being tabbed providing the ability to edit a row as a form, display and edit rich text and html content and display images. With this ability, grids are almost an application in their own right.

Clicking or navigating to a row refreshes the split grid data allowing editing in form view.

Split Grid Editing


Long text/html documents can be edited in place.

Split Grid Editing


Images can be included in the split grid editing. Double click an image to replace it with another.

Split Grid Editing


A grid consists of rows and columns. The columns can be data bound to the database and table specified in the grid attributes or can have calculated values. You can restrict what columns can be edited and seen by users based on roles and permissions.

The color of the grid rows can be dynamic based on the data that the row contains. For example you can highlight negative values like this.

Split Grid Editing


Cells in a grid may contain custom components by specifying Custom Renderers and optional Custom Editors.

Split Grid Editing


Data Summaries

Columns may have summaries displayed consisting of:

  • Min
  • Max
  • Average
  • Total

Select the grid section then enable Total. Select each column and enable Summary column.

See also Section Summary.

Data Summaries


Searching Data

After enabling Search bar visible in the grid section attributes you can filter the data displayed in the rows selected by typing into the search bar then pressing Return/Enter.

Searching Data


Querying Data

Complex queries can be applied as filters to the data displayed using the built-in Query Builder.

Querying Data


Sorting Data

After enabling Sortable in the grid section attributes, clicking on a column header toggles between ascending and descending data order.

Dynamic Badges

Dynamic Badges


Dynamic Spark Line Charts

Dynamic Spark Line Charts


Dynamic Spark Bar Charts

Dynamic Spark Bar Charts


Dynamic Ratings

Dynamic Ratings


StringList Editor

StringList Editor


Data Mapping

In the context of relational databases, a foreign key is a field in one table that uniquely identifies a row of another table. In simpler words, the foreign key is defined in a second table, but it refers to the primary key or a unique key in the first table. For example, a table called Employee has a primary key called employee_id. Another table called EmployeeDetails has a foreign key which references employee_id in order to uniquely identify the relationship between both tables.

The table containing the foreign key is called the child table, and the table containing the candidate key is called the referenced or parent table.

Data Mapping is the process of performing a two way mapping between the fields in the parent and child tables. This is accomplished by setting the Choices, Get Data Mapping and Set Data Mapping attributes for fields or grid columns.

Data Mapping is defined in the business rules for a column of a table. It works across Desktop, Web and Mobile Apps.

This functionality reduces coding in Apps dramatically.

As mentioned above you define data mapping in the Active Data Dictionary.

Data Mapping


When the table is open data mapping is automatically handled in the UI in Desktop and Web Apps.

Data Mapping


Business Rules

A business rule is a statement that imposes some form of constraint on a specific aspect of the database, such as the elements within a field specification for a particular field or the characteristics of a given relationship.

Business rules are defined using the Table Designer or in code using the alter table command.

There are a wide range of business rules which can be associated with tables and their columns. These business rules are active whenever a table is opened or bound to a UI element in Desktop, Web, Mobile or ODBC connections that use Lianja SQL Server.

These business rules are contained within the Active Data Dictionary for a table. Changes to these business rules do not require any changes to applications. When the applications are opened and the UI loaded with bound data, by default the business rules are inherited from the Active Data Dictionary.

You can restrict what data is entered by a user using validation, input masks, choicelists and much more.

Business Rules


MetaData

When you associate metadata with tables or columns, you typically define UI attribute names and values. Wherever the table or column is used in any App when the table is opened, the metadata is read and the attributes are then applied to the UI element.

Changes to the metadata are automatically applied across all Apps. No code changes are required.

This provides a powerful means of data binding with associated business logic all without coding. You define metadata for databases, tables, and columns using the MetaData Editor which is integrated into the Table Designer.

MetaData


Desktop Browse

The browse command is a favorite with Visual FoxPro developers for building desktop applications.

LianjaScript has an enhanced version of browse with split grid editing and many of the features described in above. With business rules defined in the data dictionary for a table and its columns, browse can be used in desktop applications without compromising data integrity.

Example usage:

browse table southwind!employees splitbar title "Employees" ;
properties "showsplitedit=true;splitmemolist=notes;splitimagelist=photo"
Desktop Browse


Embedding Desktop Browse in a Custom Section

In desktop Apps you can embed a browse command in a custom section.

Add a custom section to a page then in the custom BROWSE command attribute type:

browse table southwind!employees title "Employees"
Embed Browse


Pages in category "Grids"

The following 5 pages are in this category, out of 5 total.