Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Report Control
  New Posts New Posts RSS Feed - Header rows for filtering purposes :)
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Header rows for filtering purposes :)

 Post Reply Post Reply
Author
Message
znakeeye View Drop Down
Senior Member
Senior Member
Avatar

Joined: 26 July 2006
Status: Offline
Points: 1672
Post Options Post Options   Thanks (0) Thanks(0)   Quote znakeeye Quote  Post ReplyReply Direct Link To This Post Topic: Header rows for filtering purposes :)
    Posted: 27 February 2008 at 11:55am
Shouldn't this line guarantee that this record item is always at the top row?
 
int CFilterRecordItemEdit::Compare(CXTPReportColumn* pColumn, CXTPReportRecordItem* pItem)
{
    return pColumn->IsSortedIncreasing() ? -1 : 1;
}
 
Basically, I'm trying to implement Office-like column filters and they must be placed at the top row no matter how the user sorts the items. The problem is that the above code works in 95% of the cases. Somehow, I sometimes manage to get this row at row 3/1000 and similar odd results.
 
Back to Top
znakeeye View Drop Down
Senior Member
Senior Member
Avatar

Joined: 26 July 2006
Status: Offline
Points: 1672
Post Options Post Options   Thanks (0) Thanks(0)   Quote znakeeye Quote  Post ReplyReply Direct Link To This Post Posted: 28 February 2008 at 4:01am

I'm quite sure this is a bug. I'll send a sample project to Codejock Support, but until then, could anybody please answer this?

Q: How do I make sure a specific record is always at row N (0 in this case)?
Back to Top
znakeeye View Drop Down
Senior Member
Senior Member
Avatar

Joined: 26 July 2006
Status: Offline
Points: 1672
Post Options Post Options   Thanks (0) Thanks(0)   Quote znakeeye Quote  Post ReplyReply Direct Link To This Post Posted: 28 February 2008 at 4:46am
A: I usually solve my problems after posting them here. It's magic!
 
m_wndReport.GetHeaderRecords()->Add(new CFilterRecord());
m_wndReport.ShowHeaderRows(TRUE);
 
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.109 seconds.