How to collapse all the groups of CListCtrl? - winapi

I have created a CListCtrl with groups in it. I need to expand/collapse the group dynamically. How can I achieve that?

LVM_SETGROUPINFO message updates list view group data, including state. And one of the states is:
LVGS_COLLAPSED The group is collapsed.
Hence, you send a message and update the state. MFC wrapper over it is CListCtrl::SetGroupInfo.

Related

(DHTMLX Grid) Grouping show/hide column checkboxes

So I have a treegrid, and I want users to be able to not only show and hide columns, I want them to be able to show and hide columns in bulk. Right now, I'm using mygrid.enableHeaderMenu() in order to allow the users to show and hide columns. However, I have about 50 columns, and need to give them the ability to show/hide columns in bulk.
For example, a sample of my columns would be:
foo
bar
baz
unrelated
I want users to be able to show/hide the foo, bar, and baz columns using one checkbox, as well as be able to show/hide each column separately.
The shortest way seems to add your own context menu to the header, and call a needed functionality in the item clicking.
In case of using the dhtmlxMenu you may use:
menu = new dhtmlXMenuObject();
menu.renderAsContextMenu();
mygrid.hdrBox.id = "gridHeader";
menu.addContextZone("gridHeader");
Here is the tutorial about the dhtmlxMenu component:
http://docs.dhtmlx.com/menu__index.html
I wound up modifying the enableHeaderMenu function and adding the grouping mechanism in there.
To clarify, I used the source code in dhtmlxgrid_hmenu and created my own functions based off of that code. The actual grouping is done in _createHContext. To have it so that the checkbox for the group enabled or disabled grouping for the entire group, I copied the code for applyHideFunction, named it something else, and had that code apply setColumnHidden to all of the checkboxes in that group.

Weekview or Timelineview?

I have designed scheduler with unitsview, weekview and monthview,
I have a seperate list of customersname which is displayed on a listbox.
I got struck here.
Now on the weekview, I want each of the customers information to get displayed in the that particular week.
i.e(check image attached) If i click customer1 , I want all the appointments by that customers on that week to get displayed on weekview. If i click customer2, I want appointments of that customer2 on the weekview at the week.Is this possible using weekview? If not, how to implement this? Please help.
You can set a filter function for a particular scheduler view and make this dependent on your list of customers. DHTMLX Filtering Events Documentation
This technique can be used regardless of the view you are using.

jquery ui binding to sortable recieve event when dealing with nested sortables

I have a need to sort columns and separately I need to be able to sort fields accross columns and would like to hook into the col sort finished so that I can save the new column position and then also hook into the field sort finished event so that I can save the new field position
There is a jsFiddle showing an example here (doesn't seem to work in IE, but thats a different story!). What this shows is that when a column is dragged no alert is shown and when a field is dragged between columns the field AND column alerts are shown.
I'm using 'receive' to avoid multiple calls, one for the source and one for the target.
Any help would be really appreciated. Thanks
You should use different events to hook into, sortupdate does what you want. Because you are nesting sortables it is also important to prevent event bubbling, this is what causes your double alert. Here's an updated fiddle
By the way, when dragging a field to another column the sortupdate handler is called twice because two columns changed.

Filemaker: List View: Different UI for each record

I am using the List View. Based on variables I want to display different groups of objects (buttons, text etc.) in different records (shown at the same time).
My first attempt for a solution was to use tabs that I control via scripts. The problem is, that all records in the list view always display the same tab
of a tab control. So if I go to one tab in a records all other records also go to this tab.
Unfortunatly there is also no hide option that allows to hide groups of objects.
Is there any solution? I have filemaker 11 and 12. Altough a solution for filemaker 11 would be prefered.
Thank you!
No. You can do this in form view (hidden tabs and a trigger) or in a report (sliding elements surrounded by portals), but not in the list view.
Well.. The way you say can not be done as far as I know.
What you can do to hide the fields is using some other element on top of it with "conditional formatting" so that it can be hidden.

MFC separate groups of radio controls

I have added 8 radio buttons in my dialog layout in the resource manager, but I am having trouble separating them into 2 groups of 4 buttons. I have attempted to add a control variable, but I don't see the option of CButton available in the drop-down menu in the wizard. What would be the easiest method to accomplish this goal?
Make sure the first control in each group has the "Group" and "Tab Stop" attribute set.
Make sure that the control following the last radio button in each group has the "Group" attribute set.
Make sure that all the radio button IDs in each group are consecutive integers.
Create an integer member variable for each group
In the DoDataExchange method for the dialog add a DDX_Radio statement for each group linking the integer variable to the first ID in the group.
The integer variables will be set from the radio buttons whenever UpdateData(true) is called (called automatically by the default OnOk() handler) and the radio buttons can be set from the variables by calling UpdateData(false) (happens automatically in the default handling of OnInitDialog)
This problem is not a MFC problem, but a WIN32 radio button problem.
When creating the groups, the tab order (creation order) matters. You have to create them in order of the first group then the second group. The fist radio button control in each group has to have the "group" style selected.
You should be able to create the radio buttons in the Visual Studio dialog editor and run the Test Dialog and it radio groups should work ok within the two groups without any code at all. If they don't then you have done something wrong.
I found this using google which may help you.

Resources