(DHTMLX Grid) Grouping show/hide column checkboxes - dhtmlx

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.

Related

Trying to get Tableau parameter to recognize filters applied

I have a dashboard with two worksheets. One of the worksheets is a bar chart with just one dimension, Model Name. I've added a Top N parameter to it, set to display only the Top N highest priced items.
The other worksheet is a bar chart at a higher category level, and I'm using that as a filter for the other. So when I click on one of the categories, the other worksheet should display the Top N items for that category. But, when I click on a category, the other bar chart goes blank. My thinking is that the parameter is applying to the entire dataset, and not recognizing the filters applied.
I've tried changing the filters to context, but that hasn't rectified the situation. Is there a way that I can get the parameter to recognize the active filters?
If you want the filter to be evaluated first, you can do that by right-clicking on the filter item and select "Add to context."
For more, see Tableau's "Use Context Filters".

Filemaker Pro popover showing a list with values to select from or a searchable dropdown

I'm a FM beginner and would like to know how I can show a searchable dropdown. When I create a product, I need to select a supplier from a large list. I would like to tyoe some characters, from where I find a value in the dropdown. As far as I see now, that isn't possible and the only way to do this is through a popover.
But my question is then, how to show a full table in the popover, from which I can select a value, which is filled in my form.
I would like to tyoe some characters, from where I find a value in the dropdown. As far as I see now, that isn't possible and the only way to do this is through a popover.
Actually, it's the other way around: with a drop-down list you get the option to Auto-complete using value list, which is unavailable with a pop-up menu.
how to show a full table in the popover, from which I can select a value,
You cannot show a full table in a popover. You can show a portal in a popover, and make it show all records in a table by using the x operator when defining the relationship.
Or - preferably, IMHO - use a card window to show all the records you want to select from; this could be the full table or a reduced set as the result of a find.
Selecting products or other related records using popovers always feels slow when you try to search/filter the list of records, with the introduction of card windows doing such searches/selects became a lot faster and easier to implement, if you have 2 different layouts that need to search the same list of records you can use the same card window for both, that was also a nice thing.

Make Handsontable autocomplete popup wider than the column

The Customer ID column is setup to use autocomplete. The autocomplete values concatenates various customer information together, to aid the user in selecting the correct one. Once selected, the Customer ID is put into the grid.
I cannot figure out how to make the autocomplete popup wider so that it fits the concatenated information.
This is what it needs to look like, which I achieved by tinkering with the elements after they were rendered. Ideally, it would be just wide enough to fit the content.
Try using select2-editor from
https://github.com/trebuchetty/Handsontable-select2-editor
The select2 editor automatically expands to the width of the column text.

extjs 4 How to change ordering of shown column dropdown on grid

Using extjs 4.1.1
I have a grid with lots of columns >20.
Initially, most of these columns are hidden.
If a user wants to unhide the column, they select the menu on any column, then select the "columns" choice, this expands another dropdown/dropout which shows all of the columns. Those with checkboxes next to them are shown.
My issue is this:
The columns in the dropdown are shown in the order in which they are defined/displayed in the grid. The order in which they are displayed in the grid has been chosen for a good reason( e.g. id as the first column). However, when a user wants to display one of the hidden columns, it is hard for them to find it in the list. This is because the list is sorted in the order the columns are defined. I want to sort the column dropdown/dropout list in alphabetical order, without effecting the order of the columns in the grid.
How can this done?
I think I found the solution to your question.
First of all I don't have the Ext JS 4.1.1. framework on my current PC. So I tried to figure out you problem reading the Ext JS 4.1.3. documentation available on Sencha's site. But I don't think that they have made drastical changes in this part of the framework between the two minor releases so my solution should work in your case too.
I have tried out my solution using JSFiddle. Unfortunately they did not have the 4.1.1. ext-all.css file, so I have linked manually the 4.0.2 file available at Sencha, so the menu is looking a bit missplaced.
The header menu and it's submenus are managed by the Ext.grid.header.Container class. The column submenu is constructed by the getColumnMenu method. The whole menu is purged and reconstructed on every drag and drop or other event which should affect the grid view. As a result it is enough to overwrite this method in order to solve the problem. Because the headercontainer class is too deep in the framework it is hard to extend it, so you have to make use of the Ext.base.override method.
The column submenu's menu items are created from the result of the
items = headerContainer.query('>gridcolumn[hideable]')
query. So you have to first sort alphabetically the result, before creating the menu items. I have added to the class the sortColumns method which does all the sorting stuff.
So here is what I did: link to my solution.
I hope that this is what you were looking for.

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.

Resources