Anil8753
Anil8753

Reputation: 2735

Can I reorder the column of wxDataViewCtrl programmatically

We can reorder the wxDataViewCtrl columns via drag and drop in the control. But I want to reorder the column of wxDataViewCtrl in the control programmatically.

I am looking for API like ReorderColumn(unsigned int pos, wxDataViewColumn *col)

API for adding, deleting and inserting a columns are available. But I did not find any direct API to achieve the reordering.

Upvotes: 1

Views: 252

Answers (2)

AlanZheng
AlanZheng

Reputation: 21

Add wxDATAVIEW_COL_REORDERABLE flag when you create column

Upvotes: 0

VZ.
VZ.

Reputation: 22688

There is no way to do this directly currently, you will need to use DeleteColumn() and InsertColumn() to swap the columns manually.

Upvotes: 2

Related Questions