<?xml version="1.0"?>
<record><wiki id="wiki?page_id=67">
	<page_name>grid</page_name>
	<page_id>67</page_id>
	<page_title>grid</page_title>
	<content>==widget:type = grid==

Suppose we have two tables, tbl_organisation and tbl_individuals, in the edit view for a record in the organisations table (tbl_organisations) we also want to be able to view and edit the individuals within this organisation we can use widget:type=grid

In the /tables/tbl_organisation/fields.ini we create a transient field by adding:

&lt;code&gt;
[Individuals]
widget:label = &quot;Individuals&quot;
transient=1
relationship=individuals
widget:type=grid
widget:columns=&quot;ind_firstname,ind_lastname,ind_tel&quot;
&lt;/code&gt;

The above assumes we have a relationship entry in our /tables/tbl_organisation/relationships.ini that looks like this:

&lt;code&gt;
[individuals]
__sql__ = &quot;SELECT * FROM tbl_individual WHERE org_id=&apos;$org_id&apos;&quot;
&lt;/code&gt;

The fields.ini will show the three columns shown in widget:columns from the table tbl_individual

Correct permissions need to be set to enable editing and deletion etc of these records.</content>
	<keywords></keywords>
	<language>en</language>
	<original_page>0</original_page>
</wiki></record>