You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
131 lines
6.4 KiB
131 lines
6.4 KiB
15 years ago
|
<!--
|
||
|
<!DOCTYPE chapter PUBLIC "-//KDE//DTD DocBook XML V4.2-Based Variant V1.1//EN" "dtd/kdex.dtd" >
|
||
|
|
||
|
-->
|
||
|
|
||
|
<sect1 id="entering-data-into-tables">
|
||
|
<title>Entering Data Into Tables</title>
|
||
|
<para>
|
||
|
You have designed the two tables <literal>Persons</literal> and
|
||
|
<literal>phone_numbers</literal>. None of them contain any data yet. You can
|
||
|
enter some, and in this chapter you will learn how to do this fast and effectively.
|
||
|
</para>
|
||
|
<procedure>
|
||
|
<step>
|
||
|
<para>
|
||
|
Start with the <literal>persons</literal> table. Open it in <interface>Data View</interface> using the <!--<a href="04_06_01_project_navigator.html">--><interface>Project Navigtor</interface>'s context menu.
|
||
|
The current cell is marked with
|
||
|
(usually black) thicker border, a <firstterm>cell cursor</firstterm>. The contents
|
||
|
of the cell, if present, are highlighted with a different color. The current
|
||
|
row, i.e. the one you have placed your rectangular cursor in, is marked
|
||
|
on the left hand with an arrow symbol.
|
||
|
<!--<img src="icons/button_tableview_currentrow.png" class="icon">-->
|
||
|
</para>
|
||
|
<para>
|
||
|
You can navigate through table cells using the arrow keys, <keycap>Page Down</keycap>,
|
||
|
<keycap>Page Down</keycap>, <keycap>Home</keycap>, <keycap>End</keycap> keys; you can also
|
||
|
click with the mouse in a cell to select it. <!-- TODO chapter moved
|
||
|
To learn more
|
||
|
about available key bindings for the data table view, see the section
|
||
|
<a href="ab_00_00_shortcuts.html#data_table">
|
||
|
B.4. Data Table in the Appendix B. Key Bindings. -->
|
||
|
</para>
|
||
|
<para>
|
||
|
Initially, after opening the table <literal>Persons</literal>, the cursor is placed in
|
||
|
the <literal>id</literal> column. The column has autonumber property defined,
|
||
|
marked with blue <literal>(autonumber)</literal> text in the last row. It
|
||
|
means you do not have to enter values there by hand when entering data for a new
|
||
|
row because the cell will be filled automatically with successive numbers.
|
||
|
</para>
|
||
|
<!--<screenshot>
|
||
|
<screeninfo>Data entry</screeninfo>
|
||
|
<mediaobject>
|
||
|
<imageobject>
|
||
|
<imagedata fileref="img/05_02_00_data_editing.png" format="PNG"/>
|
||
|
</imageobject>
|
||
|
<textobject>
|
||
|
<phrase>Data entry</phrase>
|
||
|
</textobject>
|
||
|
</mediaobject>
|
||
|
</screenshot>-->
|
||
|
</step>
|
||
|
<step>
|
||
|
<para>
|
||
|
Inserting new rows and entering data for them in &kexi; is different from
|
||
|
the way of doing this in spreadsheets. To enter data for a new row, you need
|
||
|
to use the arrow keys or mouse, to move your cursor to the special empty last
|
||
|
row marked with a plus <!--<img src="icons/button_tableview_newrow.png" class="icon">-->
|
||
|
sign. Place your cursor in the (second) <literal>name</literal> column and enter a
|
||
|
person's name. Also enter surname, street, house number and city. When
|
||
|
done, move the cell cursor to the last empty row either by using the
|
||
|
<keycap>Arrow Down</keycap> key or by clicking in the last
|
||
|
row with the mouse to append a new row.
|
||
|
</para>
|
||
|
<note>
|
||
|
<title>Details About Actions Available While Entering Data Into Tables</title>
|
||
|
<itemizedlist>
|
||
|
<listitem>
|
||
|
<para>
|
||
|
As soon as you enter the first character, the current row is being edited. A pencil <!--<img src="icons/button_tableview_editrow.png" class="icon">--> symbol appears on the left side of the data table.
|
||
|
</para>
|
||
|
</listitem>
|
||
|
<listitem>
|
||
|
<para>
|
||
|
Double clicking a cell with the &LMB; or pressing <keycap>Enter</keycap> or the <keycap>F2</keycap> key also starts
|
||
|
editing of the current row.
|
||
|
</para>
|
||
|
</listitem>
|
||
|
<listitem>
|
||
|
<para>
|
||
|
Pressing the <keycap>Esc</keycap> key when the contents of a cell is edited
|
||
|
<emphasis>cancels changes made to this cell</emphasis>. However, the pencil
|
||
|
<!--<img src="icons/button_tableview_editrow.png" class="icon">-->
|
||
|
symbol will not disappear because you can still move to a different cell
|
||
|
of the edited row to change its contents. To
|
||
|
<emphasis>cancel changes made to the entire edited row</emphasis>, press the
|
||
|
<keycap>Esc</keycap> key again.
|
||
|
</para>
|
||
|
</listitem>
|
||
|
<listitem>
|
||
|
<para>
|
||
|
Instead of pressing the <keycap>Esc</keycap> key, you can click the
|
||
|
<!--<img src="icons/button_cancel.png" class="icon">--><guibutton>Cancel</guibutton>
|
||
|
toolbar button or select
|
||
|
<menuchoice><guimenu>Data</guimenu><guimenuitem>Cancel Row Changes</guimenuitem></menuchoice>
|
||
|
from the menubar.
|
||
|
</para>
|
||
|
</listitem>
|
||
|
<listitem>
|
||
|
<para>
|
||
|
Click the <keycombo action="simul"><keycap>Shift</keycap><keycap>Enter</keycap></keycombo>
|
||
|
keys to accept changes made to all cells in the currently edited row. You can also click
|
||
|
<!--<img src="icons/button_ok.png" class="icon">--><guibutton>OK</guibutton> toolbar
|
||
|
button or select <menuchoice><guimenu>Data</guimenu><guimenuitem>Save Row</guimenuitem></menuchoice>
|
||
|
from the menubar.
|
||
|
</para>
|
||
|
</listitem>
|
||
|
</itemizedlist>
|
||
|
</note>
|
||
|
</step>
|
||
|
<step>
|
||
|
<para>
|
||
|
Fill the <literal>phone_numbers</literal> table with data.<!--, e.g. similar to
|
||
|
provided in the figure below.--> In the <literal>persons</literal> column you
|
||
|
need to provide a number of the person existing in the <literal>persons</literal>
|
||
|
table.
|
||
|
</para>
|
||
|
<!--<screenshot>
|
||
|
<screeninfo>Example contents of the <literal>phone_numbers</literal> table</screeninfo>
|
||
|
<mediaobject>
|
||
|
<imageobject>
|
||
|
<imagedata fileref="img/05_01_01_table2_contents.png" format="PNG"/>
|
||
|
</imageobject>
|
||
|
<textobject>
|
||
|
<phrase>Example contents of the <literal>phone_numbers</literal> table</phrase>
|
||
|
</textobject>
|
||
|
</mediaobject>
|
||
|
</screenshot>-->
|
||
|
</step>
|
||
|
</procedure>
|
||
|
</sect1>
|