2.2.4.5.39 Column::ResetFilter


Version

Minimum Origin Version Required: Origin 2016 SR0

Description

Reset data filter of one column.

Syntax

void ResetFilter( BOOL bDelete )

Parameters

bDelete
[input]delete data filter from the column if true

Return

None.

Examples

EX1

//run Column_SetFilter to set filter, and then run Column_ResetFilter_ex to reset.
void Column_SetFilter()
{
    Worksheet wks;
    if( wks.Create("origin") )
    {
        Dataset ds(wks, 0);
        ds.Data(1, 10);
        
        wks.GetPage().SetName("MyFilter");
    }
    
    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");
    
    wks.RunFilter(QUERY_FILTER_ACT_HIDE_NOT_MATCHED, -1, -1, true);
}

void Column_ResetFilter_ex()
{
    Worksheet wks("MyFilter");
    if( wks )
    {        
        Column col(wks, 0);
        col.ResetFilter(FALSE);
    }
}

Remark

See Also

Worksheet::RunFilter, Column::SetFilter, Column::GetFilter

Header to Included

origin.h