# wxDataViewListStore Class Reference
[wxDataViewCtrl Related Classes]

`#include <wx/dataview.h>`

Inheritance diagram for wxDataViewListStore:
[legend]

## Detailed Description

wxDataViewListStore is a specialised wxDataViewModel for storing a simple table of data.

Since it derives from wxDataViewIndexListModel its data is be accessed by row (i.e. by index) instead of only by wxDataViewItem.

This class actually stores the values (therefore its name) and implements all virtual methods from the base classes so it can be used directly without having to derive any class from it, but it is mostly used from within wxDataViewListCtrl.

##

Library: wxAdvanced

Category: wxDataViewCtrl Related Classes

## Public Member Functions
| wxDataViewListStore ()
| Constructor.
| ~wxDataViewListStore ()
| Destructor.
void | PrependColumn (const wxString &varianttype)
| Prepends a data column.
void | InsertColumn (unsigned int pos, const wxString &varianttype)
| Inserts a data column before pos.
void | AppendColumn (const wxString &varianttype)
| Appends a data column.
void | AppendItem (const wxVector< wxVariant > &values, wxClientData *data=NULL)
| Appends an item (=row) and fills it with values.
void | PrependItem (const wxVector< wxVariant > &values, wxClientData *data=NULL)
| Prepends an item (=row) and fills it with values.
void | InsertItem (unsigned int row, const wxVector< wxVariant > &values, wxClientData *data=NULL)
| Inserts an item (=row) and fills it with values.
void | DeleteItem (unsigned pos)
| Delete the item (=row) at position pos.
void | DeleteAllItems ()
| Delete all item (=all rows) in the store.
virtual unsigned int | GetColumnCount () const
| Overridden from wxDataViewModel.
virtual wxString | GetColumnType (unsigned int col) const
| Overridden from wxDataViewModel.
virtual void | GetValueByRow (wxVariant &value, unsigned int row, unsigned int col) const
| Overridden from wxDataViewIndexListModel.
virtual bool | SetValueByRow (const wxVariant &value, unsigned int row, unsigned int col)
| Overridden from wxDataViewIndexListModel.

List of all members.

## Constructor & Destructor Documentation

wxDataViewListStore::wxDataViewListStore | ( |  | ) |

Constructor.

wxDataViewListStore::~wxDataViewListStore | ( |  | ) |

Destructor.

## Member Function Documentation

void wxDataViewListStore::AppendColumn | ( | const wxString & | varianttype | ) |

Appends a data column.

variantype indicates the type of values store in the column.

This does not automatically fill in any (default) values in rows which exist in the store already.

void wxDataViewListStore::AppendItem | ( | const wxVector< wxVariant > & | values,
|  | wxClientData * | data = `NULL` |
| ) |  |  |

Appends an item (=row) and fills it with values.

The values must match the values specifies in the column in number and type. No (default) values are filled in automatically.

void wxDataViewListStore::DeleteAllItems | ( |  | ) |

Delete all item (=all rows) in the store.

void wxDataViewListStore::DeleteItem | ( | unsigned | pos | ) |

Delete the item (=row) at position pos.

virtual unsigned int wxDataViewListStore::GetColumnCount | ( |  | ) | const`[virtual]`

Overridden from wxDataViewModel.

Implements wxDataViewModel.

virtual wxString wxDataViewListStore::GetColumnType | ( | unsigned int | col | ) | const`[virtual]`

Overridden from wxDataViewModel.

Implements wxDataViewModel.

virtual void wxDataViewListStore::GetValueByRow | ( | wxVariant & | value,
|  | unsigned int | row,
|  | unsigned int | col |
| ) |  |  | const`[virtual]`

Overridden from wxDataViewIndexListModel.

Implements wxDataViewListModel.

void wxDataViewListStore::InsertColumn | ( | unsigned int | pos,
|  | const wxString & | varianttype |
| ) |  |  |

Inserts a data column before pos.

variantype indicates the type of values store in the column.

This does not automatically fill in any (default) values in rows which exist in the store already.

void wxDataViewListStore::InsertItem | ( | unsigned int | row,
|  | const wxVector< wxVariant > & | values,
|  | wxClientData * | data = `NULL` |
| ) |  |  |

Inserts an item (=row) and fills it with values.

The values must match the values specifies in the column in number and type. No (default) values are filled in automatically.

void wxDataViewListStore::PrependColumn | ( | const wxString & | varianttype | ) |

Prepends a data column.

variantype indicates the type of values store in the column.

This does not automatically fill in any (default) values in rows which exist in the store already.

void wxDataViewListStore::PrependItem | ( | const wxVector< wxVariant > & | values,
|  | wxClientData * | data = `NULL` |
| ) |  |  |

Prepends an item (=row) and fills it with values.

The values must match the values specifies in the column in number and type. No (default) values are filled in automatically.

virtual bool wxDataViewListStore::SetValueByRow | ( | const wxVariant & | value,
|  | unsigned int | row,
|  | unsigned int | col |
| ) |  |  | `[virtual]`

Overridden from wxDataViewIndexListModel.

Implements wxDataViewListModel.

|  | [ top ]