Print Page | Close Window

How to use SetFiltrable?

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Report Control
Forum Description: Topics Related to Codejock Report Control
URL: http://forum.codejock.com/forum_posts.asp?TID=4502
Printed Date: 21 November 2024 at 9:08pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: How to use SetFiltrable?
Posted By: nomura1
Subject: How to use SetFiltrable?
Date Posted: 27 June 2006 at 5:35pm
I'm currently evaluating the Report Control and am trying to set up pulldown-style filtering on the columns.  I've involed SetFiltrable(TRUE) on the CXTPReportColumn but there doesn't seem to be any information on what this option does, let alone how I take advantage of it.  Any help here would be appreciated.

Thanks!



Replies:
Posted By: sserge
Date Posted: 28 June 2006 at 7:30am
Hi,

SetFiltrable is used to specify whether column data will be used for inline filtering (using Filter Window which you can find in the sample).

In order to make a combobox for editing items, you'll have to setup it's Edit Options. See TaskListView for example, or below (for Status column):

    pColumnStatus->GetEditOptions()->AddConstraint(_T("Not Started"), taskStatusNotStarted);
    pColumnStatus->GetEditOptions()->AddConstraint(_T("In Progress"), taskStatusInProgress);
    pColumnStatus->GetEditOptions()->AddConstraint(_T("Completed"), taskStatusCompleted);
    pColumnStatus->GetEditOptions()->AddConstraint(_T("Waiting on someone else"), taskStatusWaiting);
    pColumnStatus->GetEditOptions()->AddConstraint(_T("Deferred"), taskStatusDeferred);
    pColumnStatus->GetEditOptions()->m_bConstraintEdit = TRUE;
    pColumnStatus->GetEditOptions()->m_bAllowEdit = TRUE;
    pColumnStatus->GetEditOptions()->AddComboButton();


--
WBR,
Serge


Posted By: nomura1
Date Posted: 28 June 2006 at 11:56am
Hi Serge,

Thanks for the reply.  I don't want to allow users to edit items, I want to use a combo box for filtering, like the "AutoFilter" option in Excel.  Does the ReportControl have this functionality?


Posted By: SuperMario
Date Posted: 28 June 2006 at 4:55pm
Try looking at the Report Control -> Filter Window option in the Report Sample.  Maybe this is what you want?

Also See:
CXTPReportControl::GetFilterText()
CXTPReportControl::SetFilterText(LPCTSTR strFilterText)


Posted By: nomura1
Date Posted: 28 June 2006 at 6:20pm
Yeah, I had checked that out but no, that's not what I want.  I want to have the column header act as a pull-down menu and serve as a filter, like AutoFilter in Excel.

Thanks!


Posted By: sserge
Date Posted: 03 July 2006 at 4:27am
Ok, I see, but AutoFilter like in Excel is not natively supported by the Report control. As a workaround you can allow editing for the first row only, catch ValueChanged event and update Rows collection hiding those which doesn't fit the choosen value.

--
WBR,
Serge



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net