![]() | ![]() | ![]() | Libmergeant Reference Manual | ![]() |
---|
MgWorkGridMgWorkGrid — Grid (tabular view) to display and modify data provided by a SELECT query |
MgWorkGrid; guint mg_work_grid_get_type (void); GtkWidget* mg_work_grid_new (MgQuery *query, MgTarget *modified); void mg_work_grid_set_sample_size (MgWorkGrid *grid, gint sample_size); void mg_work_grid_set_sample_start (MgWorkGrid *grid, gint sample_start);
GObject +----GtkObject +----GtkWidget +----GtkContainer +----GtkBox +----GtkVBox +----MgWorkGrid
"actions-visible" gboolean : Write "info-cell-visible" gboolean : Write "title-string" gchararray : Write "title-visible" gboolean : Write
"selection-changed" void user_function (MgWorkGrid *mgworkgrid, gboolean arg1, gpointer user_data);
This widget uses a SELECT query and displays the results of its execution, in a tabular view (one row per result).
Optionnaly, if a table to be modified (identified through a MgTarget object) is provided, the widget allows the user to perform some modification actions on the data (UPDATE, DELETE, INSERT operations). In this case, the queries to perform the modifications are built by the widget and do not need to be provided by the programmer (they are computed by the MgWorkCore object).
GtkWidget* mg_work_grid_new (MgQuery *query, MgTarget *modified);
Creates a new MgWorkGrid widget.
query must be a SELECT query (no union, etc selection query)
The modified target must belong to query and represent modifiable entity (a MgDbTable for example). If modified is NULL then no modification will be allowed.
void mg_work_grid_set_sample_size (MgWorkGrid *grid, gint sample_size);
grid : | |
sample_size : |
void mg_work_grid_set_sample_start (MgWorkGrid *grid, gint sample_start);
grid : | |
sample_start : |
void user_function (MgWorkGrid *mgworkgrid, gboolean arg1, gpointer user_data);
mgworkgrid : | the object which received the signal. |
arg1 : | |
user_data : | user data set when the signal handler was connected. |
<< MgWorkForm | MgWorkMatrix >> |