Minimum Origin Version Required: Origin 2016 SR0
Get data filter of one column.
BOOL GetFilter( int & nType, const LPVOID * data )
TRUE if success
EX1
void Column_GetFilter_ex() { Worksheet wks; if( wks.Create("origin") ) { Dataset ds(wks, 0); ds.Data(1, 10); } CommandColumnFilterData mydata; mydata.lpcszCommand = "col <= 2 or col > 6"; Column col(wks, 0); col.SetFilter((int)COLUMN_FILTER_TYPE_COMMAND, (LPVOID)&mydata); col.SetFilterThisCol("col"); LPVOID data; int nType; col.GetFilter(nType, &data) ; if(COLUMN_FILTER_TYPE_COMMAND == nType) { CommandColumnFilterData* pdata = (CommandColumnFilterData*)data; out_str(pdata->lpcszCommand); } }
Worksheet::RunFilter, Column::SetFilter, Column::ResetFilter
origin.h