Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Report Control
  New Posts New Posts RSS Feed - HOWTO: HasCheckbox use in virtual mode
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

HOWTO: HasCheckbox use in virtual mode

 Post Reply Post Reply
Author
Message
bunei View Drop Down
Newbie
Newbie


Joined: 28 June 2012
Status: Offline
Points: 4
Post Options Post Options   Thanks (0) Thanks(0)   Quote bunei Quote  Post ReplyReply Direct Link To This Post Topic: HOWTO: HasCheckbox use in virtual mode
    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.
Back to Top
bunei View Drop Down
Newbie
Newbie


Joined: 28 June 2012
Status: Offline
Points: 4
Post Options Post Options   Thanks (0) Thanks(0)   Quote bunei Quote  Post ReplyReply Direct Link To This Post Posted: 10 September 2012 at 8:58pm
please tell me how to use checkbox in virtual mode.
Back to Top
GRLEX View Drop Down
Groupie
Groupie
Avatar

Joined: 17 February 2009
Location: Ukraine
Status: Offline
Points: 27
Post Options Post Options   Thanks (0) Thanks(0)   Quote GRLEX Quote  Post ReplyReply Direct Link To This Post 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.
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.188 seconds.