Print Page | Close Window

HOWTO: HasCheckbox use in virtual mode

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=19904
Printed Date: 16 November 2024 at 10:27am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: HOWTO: HasCheckbox use in virtual mode
Posted By: bunei
Subject: HOWTO: HasCheckbox use in virtual mode
Date Posted: 28 June 2012 at 10:21pm
I used sample program VirtualList.
I want to use checkbox, so added code in sample program.

(VirtualListView.cpp(37))
CVirtualRecord::CVirtualRecord(CDBVListSet* pSet)
{
CXTPReportRecordItem* pItem = new CXTPReportRecordItem;
pItem->HasCheckbox(TRUE);

AddItem(pItem);
AddItem(new CXTPReportRecordItemText());
       ...
}



Result,  checkbox appeared.
But checkbox is All checked.

Can you please tell me how to use checkbox.
Thanks.



Replies:
Posted By: bunei
Date Posted: 10 September 2012 at 8:58pm
please tell me how to use checkbox in virtual mode.


Posted By: GRLEX
Date Posted: 28 September 2012 at 12:00pm
Hi. If  You still need answer then:
try to change your checkbox state by pItem->SetChecked(0 or 1);
try to change editable property for your item
For working with OnCheck event you need to handle event: 

ON_NOTIFY(XTP_NM_REPORT_CHECKED, <Your grid ID>, OnCheckGridItem)

void OnCheckGridItem(NMHDR * pNotifyStruct, LRESULT *res);

and check for column exist for your checkbox items.



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