Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Report Control
  New Posts New Posts RSS Feed - Can I have dropdowns in the Report Control?
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Can I have dropdowns in the Report Control?

 Post Reply Post Reply
Author
Message
drisch View Drop Down
Groupie
Groupie


Joined: 06 July 2006
Status: Offline
Points: 16
Post Options Post Options   Thanks (0) Thanks(0)   Quote drisch Quote  Post ReplyReply Direct Link To This Post Topic: Can I have dropdowns in the Report Control?
    Posted: 17 August 2006 at 12:56pm
Hello,
 
I would like to create an editable spreadsheet-like grid using CXTPReportControl, which I already use elsewhere for non-editable reports. However in this editable case I would like one of the columns to have a dropdown list where the user picks one of the values in the dropdown. For instance, the column may be language and the list has several languages in it. From the samples I see that it is possible to have this in the properties grid where a value can be set from a dropdown list. Can it also be done in the report control, and if so, how? I see a class CXTPReportInplaceList, but I don't know how to use it, or even if it is the functionality I am looking for.
 
Any help would be appreciated.
 
-Derek
Back to Top
SuperMario View Drop Down
Admin Group
Admin Group
Avatar

Joined: 14 February 2004
Status: Offline
Points: 18057
Post Options Post Options   Thanks (0) Thanks(0)   Quote SuperMario Quote  Post ReplyReply Direct Link To This Post Posted: 17 August 2006 at 3:02pm
Yes, open the Report sample, then select from the menubar Report Control->Control Test->Task List Sample.  Here the Status and Priority columns have dropdowns.
Back to Top
drisch View Drop Down
Groupie
Groupie


Joined: 06 July 2006
Status: Offline
Points: 16
Post Options Post Options   Thanks (0) Thanks(0)   Quote drisch Quote  Post ReplyReply Direct Link To This Post Posted: 22 August 2006 at 3:18pm

Thank you very much. That's exactly what I was looking for. I see that by doing the following, I am implying a dropdown with the following added values:

pColumnStatus->GetEditOptions()->AddConstraint(_T("Not Started"), taskStatusNotStarted);

Back to Top
gjertsen View Drop Down
Newbie
Newbie
Avatar

Joined: 14 August 2007
Location: United States
Status: Offline
Points: 1
Post Options Post Options   Thanks (0) Thanks(0)   Quote gjertsen Quote  Post ReplyReply Direct Link To This Post Posted: 14 August 2007 at 3:48pm
I'm using something like
pColumn->GetEditOptions()->AddComboButton();
pColumn->GetEditOptions()->AddConstraint("choice 1");
pColumn->GetEditOptions()->AddConstraint("choice 2");

and the combo box works like a champ... except that I want to actually constrain the input to ONLY one of the constraints - not free text input. If the column itself does not allow edit, then the combo box doesn't work at all, but if it does allow edit, it allows free editing. What am I missing?
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: 17 September 2007 at 7:07am
Change the style of the combo button.
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.203 seconds.