### Method

# Gtk ListStore insert_with_values

deprecated: 4.10

#### Declaration [src]

    void
    gtk_list_store_insert_with_values (
      GtkListStore* list_store,
      GtkTreeIter* iter,
      int position,
      ...
    )

#### Description [src]

Creates a new row at `position`. `iter` will be changed to point to this new row. If `position` is -1, or larger than the number of rows in the list, then the new row will be appended to the list. The row will be filled with the values given to this function.

Calling `gtk_list_store_insert_with_values (list_store, iter, position...)` has the same effect as calling:

    static void
    insert_value (GtkListStore *list_store,
                  GtkTreeIter  *iter,
                  int           position)
    {
      gtk_list_store_insert (list_store, iter, position);
      gtk_list_store_set (list_store,
                          iter
                          // ...
                          );
    }

with the difference that the former will only emit `GtkTreeModel`::row-inserted once, while the latter will emit `GtkTreeModel`::row-inserted, `GtkTreeModel`::row-changed and, if the list store is sorted, `GtkTreeModel`::rows-reordered for every inserted value.

Since emitting the `GtkTreeModel::rows-reordered` signal repeatedly can affect the performance of the program, `gtk_list_store_insert_with_values()` should generally be preferred when inserting rows in a sorted list store.

Deprecated since: 4.10

Use list models.

This method is not directly available to language bindings.

The implementation of this method is provided by `gtk_list_store_insert_with_valuesv()` in language bindings

#### Parameters

`iter`

  Type: `GtkTreeIter`

  An unset `GtkTreeIter` to set to the new row.

  The argument will be set by the function.
  The argument can be `NULL`.
  The data is owned by the instance.

`position`

  Type: `int`

  Position to insert the new row, or -1 to append after existing rows.

`...`

  Type: ``

  Pairs of column number and value, terminated with -1