Trigger refresh of columns when refreshing data in fuelux datagrid - fuelux

Based on a filter we use (show my objects / show objects of all), we would like an optional column to show/hide (if "all objects" is chosen, it should have an additional column indicating what account it belongs to...)
I know we can add the filter, and it is passed along to the data method so I can retrieve the data from the server there, but can we force a column refresh on the grid somehow?
Thanks very much for your assistance and feedback!

Columns are currently set only once, on initialization. There are a couple of related feature requests on UserVoice, where you can vote and participate in the discussion:
http://fuelux.uservoice.com/forums/181290-general/suggestions/3624683-datagrid-should-be-able-to-hide-show-columns
http://fuelux.uservoice.com/forums/181290-general/suggestions/3964374-provide-a-method-to-re-render-the-datagrid-in-full

Related

PowerBI: Giving users the option to include or exclude a type of data

I'm creating my first PowerBI report, analysing staff absence data. The data contains a field of 'Absence Type', which categorises the type of absence the each record refers to.
I would like my users to be able to view my report both with and without the Absence Type of 'Pandemic'. I can hard-filter this on all pages by Excluding it but that gives the users no control.
I thought about using a slicer with a new custom column but I think that would be too confusing. If the column put a 'Yes' or 'No' as to whether the Absence Type was 'Pandemic', that would allow users to view the data without 'Pandemic' entries or just the 'Pandemic' entiries, but give no combined option. Even with a multiselect slicer they could easily deselect everything and see no results at all.
Ideally what I need is either an 'Include Pandemic?' slider where they can choose Yes or No (with Yes being everything and No being everything minus Pandemic records) or a button they can click to toggle the Pandemic records in or out of the visuals.
Apologies if this is has an obvious answer, I'm pioneering PowerBI for my organisation so don't really have anyone to ask here!
There's a way to do this, but it's a bit painful. So you'll want to consider just putting a slicer on AbsenseType and letting the user figure it out.
The extensibility point you can use here is Buttons and Bookmarks.
You can create two buttons, each associated with a Bookmark. Each bookmark can activate set of filters, so one can exclude pandemic AbsenseType and the other can include it. Bookmarks can also toggle the visibility of visuals (see eg here). So when the "ExcludePandemic" bookmark is active, the appropriate filter is active, and the "Include Pandemic" button is visible. When the "IncludePandemic" bookmark is active, the "Exclude Pandemic" button is visible.
In my opinion, the best solution would be tocreate a custom column that will have 2 values:
Pandemic - if the type is Pandemic
Non Pandemic - if the type is different than pandemic
You would then use this new column + Absence Type as a hierarchical slicer.
This would give the user the abilty to pick and choose between:
Select all (If the user deselects everything a select all will also be applied)
Non pandemic only
Pandemic only
Any one or more absence type

How show a static number of rows using Ag datagrid

I'm new on reactjs, and I want to create a table to show some data. In the project I'm working, we are using Ag-Grid datagrid.
I already have created it with basic usage, but my question is:
Supose I have 100 rows as enter, how I can display in datagrid just the 10 firsts?
I stil wanna load all data (for filtering, sort, etc), just don't wanna show all by default.
I'm looking at documentation and do some search, but don't find the proper way to do it.
Edit: I already see the pagination options (the default solution provided by documentation), but in my case, at least for now I don't want pagination. Just wanna render the X first rows (the extra will be ommited in table, but have to be loaded in UI, if not, I could use autoHeight).
Thanks in advance.
I'm assuming you are using the Client Side Row Model and not loading data from a Server. In which case, the easiest way to achieve this would be to show the 10 rows, and add more rows (depending on when you want to load them) via Transaction Updates, please see the documentation on this here
you can use pagination:
documentation reference

React - Data tables with React

I would like to use one of the many table/data-grid components available to render a table. However, I am struggling to choose one as I have very specific requirements and I'm not sure if they are supported by them.
Ok so ideally I would like the table to initialise with only column headers (which are populated by data from a database). I would then like to be able to add a row (by clicking on a button), and be able to enter data into the cells and then save the data in that row to my database. The column headers are generated by form but there can feasibly be any number of them. Most of the examples for the various components seem to expect you to already know what your data is before you render the table. But this will not be the case for me.
I was considering Griddle but they don't have an editable cell option yet (it's only part of the roadmap) so unless I create my own custom function, I think that that is out for now.
I was just hoping for some guidance is choosing the best component for what I need!
Thanks for your time

Grid not updating upon change in model in angularjs

Folks,
I am using ng-grid to display a list of items.
I want to give my users ability to rearrange the rows in the list.
i.e move the rows up and down as they please.
Now,
However when I update the grid data in the backend i.e say change the index of a particular row, that row does not automatically change locations in the front-end.
What am i missing here ?
I have created a plunker to describe the problem
http://plnkr.co/edit/s1hrTSqF2zeZo3Btaln0
The grid doesn't use the index of the array to order it, so even if you are changing it, because the data is still there nothing happens.
What you could do is define an order field and update the value then changing the values as shown in this plukr. The order field you can hide it from the grid if required using columnDefs to explicitly defined which column should be shown.
Regards

Oracle ADF: How to filter out rows in RichTable?

I have following requirement.
Display data in a table
Clicking on checkbox filter out currently displayed rows by some condition
Clicking on checkbox once again return data appearance to it's previous state
To achieve this I've ovverided method rowQualifies in my ViewObject which is simple SQL based view object to apply my custom filter logic.
When user clicks on checkbox I refresh view object data to apply filter
viewObject.setDoFiltering(true);
viewObject.setQueryMode(ViewObject.QUERY_MODE_SCAN_VIEW_ROWS);
viewObject.executeQuery();
It works perfectly, data set updates without interacting with database and my custom filter logic applies as well.
But when I need to cancel filter it wouldn't work because iterator doesn't contain anymore previous rows, and I can only load them from database but it means that I can lose my changes already made to view object rows.
So, when I do
viewObject.setDoFiltering(false);
viewObject.setQueryMode(ViewObject.QUERY_MODE_SCAN_VIEW_ROWS);
viewObject.executeQuery();
It will return me those rows that were displayed previous time.
If I do
viewObject.setDoFiltering(true);
viewObject.setQueryMode(ViewObject.QUERY_MODE_SCAN_DATABASE_TABLES);
viewObject.executeQuery();
It will return me all rows, but I will lost my changes already made to view object rows.
My questions is how to avoid it? Maybe there is another way of doing this? Maybe it is possible to do something with RichTable to tell it how to filter rows in memory.
Any advices are warmly appricated!
I believe this can be done using ViewCriteria, to filter means to apply a ViewCriteria, and then disable it to view all your data

Resources