angular office fabric ui table, get selected items - javascript

I am working on an angular app that uses ngOfficeUiFabric for their components.
What I want to do is get the selected items from the existing table component.
http://ngofficeuifabric.com/demos/uifTable/
in the documentation is says this is available with the table.selectedItems property. The problem is that I need this outside of the hierarchy of the table.
Is there a way for me to bind that table property to a variable in my controller?
I am new to both angular and office ui fabric so if I am missing something obvious please excuse me!
regards

There is table.selectedItems property, you can get records form this property

Related

Ngrx with Angular Formly and Angular Material

Im using a combination of formly ,ngrx and material. There are few issues that managed to fix and some other on doubt.
Demo is below on stackblitz. :
https://stackblitz.com/edit/new-project-3gxwan?file=src%2Fapp%2Fshared%2Fcomponents%2Fformly-table-generic%2Ftable.ts,src%2Fapp%2Fshared%2Fcomponents%2Fformly-table-generic%2Ftable.html
Im trying to build a filter service and as model have passed an observable. As we filter data of observable change and also model, BUT the view doesnt change. I managed to recall the model and its working but it doesnt look like the most efficent way. especially on big data the view freeze till searching completed.
As on NGRX state is immutable is expected that for every change to be dispatched an action and model to be changed. However the only way to achieve that it was to create my own elements. So in the example if under main.ts comment the following code (my own checkbox element)
{
name: 'checkbox',
component: FormlyFieldCheckbox,
wrappers: [],
},
In table will be implemented tha material checkbox and when we check it will be displayed the read-only error.
Sorting through each columns its not working despite the *matColumnField match with the key name.

How to get view object of Fullcalendar in Vue.js app

My idea is to change the selectable prop based on which full calendar view is displayed(month, week, day). In order to have this information, I have to get a calendar view object which contains property type. I tried everything from their documentation (https://fullcalendar.io/docs/v4/Calendar-view) and I still can't achieve this.
From ratkov_a's comment:
this.$refs.calendar.getApi().view

ExtJS 4.2 How can I get all the stores of a view?

I´m trying to obtain all the stores of a view in a controller. For example my view is a panel that has 2 grids and 4 combos,every one has his own store.
Is there a way to obtain all the stores using Ext.ComponentQuery or something like this.Ext.StoreManager returns all the stores of the app,I only want the stores of a specific view.
If you have a component that does have a store that is not bound using the store property, bad luck. But if you are only working with basic ExtJS components like grid and combo, you may try whether
view.query("[store]").map(function(cmp) {return cmp.getStore() });
does what you want...

use databind on children object

I'm just starting to play with knockout.js and integrating it with a grid widget. I need to set a databind to a checkbox for each row but the checkboxes are created within the widget and I have no access to it. What I do have is access to the cell containing the checkbox.
I believe I could maybe use jquery to add the attributes dynamically to each checkbox and only then call applybindings, but I'm wondering whether I can set data-bind on the cell and tell knockout to "assign" it to its children (in this case always only one checkbox)?
Rivers, you wouldn't want Knockout (or probably any other code) interfering with anything managed by another widget. Generally you'd want to look for an API on that jqGrid that allows you to manage the underlying data. If that's not an option on jqGrid and it's something that you really need, then you should look for a different grid tool. Maybe a knockout-specific grid tool would work better for you, like koGrid : https://github.com/Knockout-Contrib/KoGrid

EXtjs Grid Filters

I am a new user of Extjs library, I created a grid successfully and it works just fine, now I want to use Ext.grid.GridFilters to add filtering to my grid, however I don't see this class in the Extjs source code files, where I can get the required files?
The community-supported plugin for grid filtering is found in this forum thread.
Filtering is a custom thing you have to implement by yourself. There are a few community add-ons which make it easy, but start by looking at the actual grid STORE instead of the grid panel. The store contains the data and supports filtering. Once the data is filtered, the store will raise it's data changed event and as long as the grid is wired accordingly you will see the filtered recordset in the grid. For more info I'd check out their example pages and read the source there.
As mentioned above: use the filter method in the store.
There is a tutorial covering the subject at http://aboutfrontend.com/2011/01/extjs-grid-filter/
There is proper filter option is provided by ExtJs:
store.filterBy(function(rec, id)) { return (rec.get("RecName") =="FilterRecord");}
After filtering data, filter will always present in stores Filters config. So if we want to remove filters and show all records then just clear applied filters like this:
store.clearFilter();

Categories

Resources