<refentry id="GnomeDbGrid">
<refmeta>
<refentrytitle>GnomeDbGrid</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>LIBGNOMEDB-4.0 Library</refmiscinfo>
</refmeta>

<refnamediv>
<refname>GnomeDbGrid</refname><refpurpose>Database grid widget to display and modify data in a <link linkend="GdaDataModel"><type>GdaDataModel</type></link>, with command buttons and indicators</refpurpose>
</refnamediv>

<refsynopsisdiv><title>Synopsis</title>

<synopsis>



struct      <link linkend="GnomeDbGrid-struct">GnomeDbGrid</link>;
struct      <link linkend="GnomeDbGridClass">GnomeDbGridClass</link>;
struct      <link linkend="GnomeDbGridPriv">GnomeDbGridPriv</link>;
<link linkend="GtkWidget">GtkWidget</link>*  <link linkend="gnome-db-grid-new">gnome_db_grid_new</link>               (<link linkend="GdaDataModel">GdaDataModel</link> *model);
<link linkend="GList">GList</link>*      <link linkend="gnome-db-grid-get-selection">gnome_db_grid_get_selection</link>     (<link linkend="GnomeDbGrid">GnomeDbGrid</link> *grid);
<link linkend="void">void</link>        <link linkend="gnome-db-grid-set-sample-size">gnome_db_grid_set_sample_size</link>   (<link linkend="GnomeDbGrid">GnomeDbGrid</link> *grid,
                                             <link linkend="gint">gint</link> sample_size);

</synopsis>
</refsynopsisdiv>

<refsect1>
<title>Object Hierarchy</title>
<synopsis>

  <link linkend="GObject">GObject</link>
   +----<link linkend="GInitiallyUnowned">GInitiallyUnowned</link>
         +----<link linkend="GtkObject">GtkObject</link>
               +----<link linkend="GtkWidget">GtkWidget</link>
                     +----<link linkend="GtkContainer">GtkContainer</link>
                           +----<link linkend="GtkBox">GtkBox</link>
                                 +----<link linkend="GtkVBox">GtkVBox</link>
                                       +----GnomeDbGrid
</synopsis>

</refsect1>



<refsect1>
<title>Implemented Interfaces</title>
<para>
GnomeDbGrid implements
 <link linkend="AtkImplementorIface">AtkImplementorIface</link>,  <link linkend="GtkBuildable">GtkBuildable</link> and  <link linkend="GtkOrientable">GtkOrientable</link>.</para>

</refsect1>


<refsect1>
<title>Properties</title>
<synopsis>

  &quot;<link linkend="GnomeDbGrid--model">model</link>&quot;                <link linkend="GdaDataModel">GdaDataModel</link>         : Read / Write / Construct Only
  &quot;<link linkend="GnomeDbGrid--raw-grid">raw-grid</link>&quot;             <link linkend="GnomeDbRawGrid">GnomeDbRawGrid</link>       : Read
  &quot;<link linkend="GnomeDbGrid--widget-info">widget-info</link>&quot;          <link linkend="GnomeDbDataWidgetInfo">GnomeDbDataWidgetInfo</link> : Read
</synopsis>
</refsect1>



<refsect1>
<title>Description</title>
<para>

</para>
</refsect1>

<refsect1>
<title>Details</title>
<refsect2>
<title><anchor id="GnomeDbGrid-struct"/>struct GnomeDbGrid</title>
<indexterm><primary>GnomeDbGrid</primary></indexterm><programlisting>struct GnomeDbGrid;</programlisting>
<para>

</para></refsect2>
<refsect2>
<title><anchor id="GnomeDbGridClass"/>struct GnomeDbGridClass</title>
<indexterm><primary>GnomeDbGridClass</primary></indexterm><programlisting>struct GnomeDbGridClass {

	GtkVBoxClass       parent_class;
};
</programlisting>
<para>

</para></refsect2>
<refsect2>
<title><anchor id="GnomeDbGridPriv"/>struct GnomeDbGridPriv</title>
<indexterm><primary>GnomeDbGridPriv</primary></indexterm><programlisting>struct GnomeDbGridPriv;</programlisting>
<para>

</para></refsect2>
<refsect2>
<title><anchor id="gnome-db-grid-new"/>gnome_db_grid_new ()</title>
<indexterm><primary>gnome_db_grid_new</primary></indexterm><programlisting><link linkend="GtkWidget">GtkWidget</link>*  gnome_db_grid_new               (<link linkend="GdaDataModel">GdaDataModel</link> *model);</programlisting>
<para>
Creates a new <link linkend="GnomeDbGrid"><type>GnomeDbGrid</type></link> widget suitable to display the data in <parameter>model</parameter></para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>model</parameter>&nbsp;:</term>
<listitem><simpara> a <link linkend="GdaDataModel"><type>GdaDataModel</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> the new widget
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gnome-db-grid-get-selection"/>gnome_db_grid_get_selection ()</title>
<indexterm><primary>gnome_db_grid_get_selection</primary></indexterm><programlisting><link linkend="GList">GList</link>*      gnome_db_grid_get_selection     (<link linkend="GnomeDbGrid">GnomeDbGrid</link> *grid);</programlisting>
<para>
Returns the list of the currently selected rows in a <link linkend="GnomeDbGrid"><type>GnomeDbGrid</type></link> widget. 
The returned value is a list of integers, which represent each of the selected rows.
</para>
<para>
If new rows have been inserted, then those new rows will have a row number equal to -1.
This function is a wrapper around the <link linkend="gnome-db-raw-grid-get-selection"><function>gnome_db_raw_grid_get_selection()</function></link> function.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>grid</parameter>&nbsp;:</term>
<listitem><simpara> a <link linkend="GnomeDbGrid"><type>GnomeDbGrid</type></link> widget
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> a new list, should be freed (by calling g_list_free) when no longer needed.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gnome-db-grid-set-sample-size"/>gnome_db_grid_set_sample_size ()</title>
<indexterm><primary>gnome_db_grid_set_sample_size</primary></indexterm><programlisting><link linkend="void">void</link>        gnome_db_grid_set_sample_size   (<link linkend="GnomeDbGrid">GnomeDbGrid</link> *grid,
                                             <link linkend="gint">gint</link> sample_size);</programlisting>
<para>
</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>grid</parameter>&nbsp;:</term>
<listitem><simpara> a <link linkend="GnomeDbGrid"><type>GnomeDbGrid</type></link> widget
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>sample_size</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
</variablelist></refsect2>

</refsect1>
<refsect1>
<title>Properties</title>
<variablelist>
<varlistentry><term><anchor id="GnomeDbGrid--model"/>&quot;<literal>model</literal>&quot; (<link linkend="GdaDataModel">GdaDataModel</link> : Read / Write / Construct Only)</term>
<listitem>
<para></para>
</listitem></varlistentry>
<varlistentry><term><anchor id="GnomeDbGrid--raw-grid"/>&quot;<literal>raw-grid</literal>&quot; (<link linkend="GnomeDbRawGrid">GnomeDbRawGrid</link> : Read)</term>
<listitem>
<para></para>
</listitem></varlistentry>
<varlistentry><term><anchor id="GnomeDbGrid--widget-info"/>&quot;<literal>widget-info</literal>&quot; (<link linkend="GnomeDbDataWidgetInfo">GnomeDbDataWidgetInfo</link> : Read)</term>
<listitem>
<para></para>
</listitem></varlistentry>

</variablelist>
</refsect1>



<refsect1>
<title>See Also</title>
<para>
The <link linkend="GnomeDbRawGrid"><type>GnomeDbRawGrid</type></link> widget which is being used in this widget, or the <link linkend="GnomeDbForm"><type>GnomeDbForm</type></link> widget which displays
data in a form instead of a grid.
</para>
</refsect1>

</refentry>
