+bool wxDataViewCtrl::DeleteColumn( wxDataViewColumn *column )
+{
+ wxDataViewColumnList::compatibility_iterator ret = m_cols.Find( column );
+ if (!ret)
+ return false;
+
+ m_cols.Erase(ret);
+ OnColumnsCountChanged();
+
+ return true;
+}
+
+bool wxDataViewCtrl::ClearColumns()
+{
+ m_cols.Clear();
+ OnColumnsCountChanged();
+ return true;
+}
+
+int wxDataViewCtrl::GetColumnPosition( const wxDataViewColumn *column ) const
+{
+ int ret = 0,
+ dummy = 0;
+ unsigned int len = GetColumnCount();
+ for ( unsigned int i = 0; i < len; i++ )
+ {
+ wxDataViewColumn * col = GetColumnAt(i);
+ if (col->IsHidden())
+ continue;
+ ret += col->GetWidth();
+ if (column==col)
+ {
+ CalcScrolledPosition( ret, dummy, &ret, &dummy );
+ break;
+ }
+ }
+ return ret;
+}
+
+wxDataViewColumn *wxDataViewCtrl::GetSortingColumn() const
+{
+ return m_sortingColumnIdx == wxNOT_FOUND ? NULL
+ : GetColumn(m_sortingColumnIdx);
+}
+
+//Selection code with wxDataViewItem as parameters
+wxDataViewItem wxDataViewCtrl::GetSelection() const
+{
+ return m_clientArea->GetSelection();
+}
+
+int wxDataViewCtrl::GetSelections( wxDataViewItemArray & sel ) const
+{
+ sel.Empty();
+ wxDataViewSelection selection = m_clientArea->GetSelections();
+ int len = selection.GetCount();
+ for( int i = 0; i < len; i ++)
+ {
+ unsigned int row = selection[i];
+ sel.Add( m_clientArea->GetItemByRow( row ) );
+ }
+ return len;
+}
+
+void wxDataViewCtrl::SetSelections( const wxDataViewItemArray & sel )
+{
+ wxDataViewSelection selection(wxDataViewSelectionCmp);
+
+ wxDataViewItem last_parent;
+
+ int len = sel.GetCount();
+ for( int i = 0; i < len; i ++ )
+ {
+ wxDataViewItem item = sel[i];
+ wxDataViewItem parent = GetModel()->GetParent( item );
+ if (parent)
+ {
+ if (parent != last_parent)
+ ExpandAncestors(item);
+ }
+
+ last_parent = parent;
+ int row = m_clientArea->GetRowByItem( item );
+ if( row >= 0 )
+ selection.Add( static_cast<unsigned int>(row) );
+ }
+
+ m_clientArea->SetSelections( selection );
+}
+
+void wxDataViewCtrl::Select( const wxDataViewItem & item )
+{
+ ExpandAncestors( item );
+
+ int row = m_clientArea->GetRowByItem( item );
+ if( row >= 0 )
+ {
+ //Unselect all rows before select another in the single select mode
+ if (m_clientArea->IsSingleSel())
+ m_clientArea->SelectAllRows(false);
+ m_clientArea->SelectRow(row, true);
+ }
+}
+
+void wxDataViewCtrl::Unselect( const wxDataViewItem & item )