NSTableView with expandable/collapsable groups using Core Data & Cocoa Bindings - cocoa

I have a data model stored in core data that is basically an array of items with a date.
They are currently displayed in a NSTableView using cocoa bindings via a NSArrayController.
What I'm trying to achieve, is to have the items grouped by months. Something like this
August 2019 // can be collapsed
2019-08-05 ...
2019-08-04 ...
2019-08-01 ...
> July 2019 // can be expanded
June 2019 // can be expanded
2019-06-30 ...
2019-06-22 ...
...etc
I found two leads for this :
NSOutlineView but it seems that it must be bound to a TreeController, and I'm not sure I should dive into this
Use NSTableView tableView:isGroupRow:
What should I do to achieve this goal?
Thanks!

Related

Why Bar Chart Always Showing 2 Years Value After Using Control Form?

I have a problem in my dashboard because It is always showing Bar Charts with all Values after using control field "Year" like this
I use Year Control Form and set the default in the control field into 2021 like this But it always shows all the values of 2021 and 2022 (like the first picture). But when I choose only '2021' or '2022' on the control form, it shows like what I want (only represent data for that years) like this.
I want to set the default is like the 2nd Picture when First opening the dashboard because it made so many problem in my organization. Here's the link for my dashboard : https://lookerstudio.google.com/reporting/1268a7e6-33bd-4deb-9c37-7abfd73f5126
And here's for the data source : https://docs.google.com/spreadsheets/d/1A_xB97Q25e0hqpkjSQcP9BzakwTUdzIJLUUnMOtBs04/edit?usp=sharing
For information, the bar chart is created by using blended data from 2 tables and also I turn on the cross-filtering where the setting is like this
any solution?

Highlighting specific days on Calendar

I'm using the Nativescript Pro UI RadCalendar and have a requirement which requires me to highlight certain specific days when the calendar is in Month View.
I understand I can use dayCellStyle however this doesn't allow me to apply this style to only specific days.
I have also tried using the selectedDayStyle and passing in my array of selected dates which works but only if I pass in Multiple to the selectionMode property which allows the user to unselect the highlighted dates.
Is there something I'm missing or is this use case not supported yet?
Styling or preventing selection of a particular day is not supported by RadCalendar. But an ugly workaround could be listening to selected dates change event and apply the selected dates you want back at RadCalendar.
Here is a Playground Sample, I was able to verify it with Android, hope it works with iOS too.

Kendo Grid - Customize Filter Row

there is a feature called "Filter Row" in Kendo Grid
http://demos.telerik.com/kendo-ui/grid/filter-row
I want to add a drop-down list instead of a text box or a number box, to the filter box. It's for filtering a column that has countries. So I want list of countries in a drop-down list. How can I do this?
It's very similar to the custom Filter Menu (http://demos.telerik.com/kendo-ui/grid/filter-menu-customization). I made the mistake of no using valuePrimitive: true. You might not want it in your situation but keep that in mind.
Here's a sample: http://dojo.telerik.com/OKaS
Also, the filter menu should take up the editor model of the column but it's not always what you want.
Edit
Starting from 2014 Q2 SP1, the template function now receives an object containing "datasource" and "element". In my example, you would have to change the dropdown initialization from "container.kendoDropDownList" to "container.element.kendoDropDownList". The datasource is empty in my example but I'm assuming this can be used to pass the choices to a control without requiring another datasource or to externalize your current. I have not experimented with this feature but I suggest you do before taking my sample blindly.
As Pluc mentioned earlier valuePrimitive: true will help you create a custom filter for your grid/columns to send id's to your controller, if you are not using setting this property true you will receive an Object in your controller instead of a number, the conversion will not be made automatically . This is still working as of 2019

How to show decoration in place of event names in dojo calendar?

We are using dojo calendar in our web application. We are also showing events on the calendar.
In the matrix view we do not need to show event names. But just some indicator that there are some events on that day. e.g. If 15 Jan has 5 events, currently it shows 5 events names on the 15 Jan cell in the matrix view.
See below
We now want that instead of the 5 events names, we can show some indicator like may be some different color or a vertical line to indicate that there are events on 15 jan, and when you click on the cell you will then get the details of all events on the date.
See below
Is there any setting in dojo calendar which can do this?
I believe you should go first on this : http://livedocs.dojotoolkit.org/dojox/calendar#grid-cell-styling, so you can change the css to the cell look like what you want.

Column selection in ListView (MFC)

I want to select a particular column in a ListView. When I search for it I always find ways to select row-wise only. Any idea how do I do it? Also how do I get the selected column index?
Using MFC-VS2005.
There's a CListCtrl::SetSelectedColumn() method that looks like it does what you want: it posts an LVM_SETSELECTEDCOLUMN message to the list view control.
Similarly, CListCtrl::GetSelectedColumn() gets the selected column.
I'm maintaining a VS6.0 app that I've ported to VS 2005, and SetSelectedColumn isn't available in CListCtrl unless _WIN32_WINNT >= 0x0501.
Mine was 0x400 & I couldn't understand at first why using SetSelectedColumn caused a compiler error. see commctrl.h for details

Resources