Print Page | Close Window

Header rows for filtering purposes :)

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=9722
Printed Date: 22 November 2024 at 5:57pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Header rows for filtering purposes :)
Posted By: znakeeye
Subject: Header rows for filtering purposes :)
Date 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.
 



Replies:
Posted By: znakeeye
Date 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)?


Posted By: znakeeye
Date 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);
 



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