Angular UI Grid expanded subgrid remain expanded after refresh - refresh

I am using the Angular UI grid to display a grid of data, with subgrids that can be expanded. When the subgrid(s) is expanded, if I hit the refresh button to refresh grid, the subgrid(s) become unexpaned (basically back to its original state). How do I make the subgrids remain expanded if the row(s) was expanded, after refresh?
Thank you!

Related

How run a control-broken IG as collapsed in the first place?

I am using Oracle APEX 21.2.5. I have an Interactive Grid. I did a control break on a specific column. I need to display all grid rows as collapsed when I first run the page. But it's displayed as expanded. Is there a way to do so?
Please put the below code in the Javascript -> Execute When Page Loads section of the page
$("#YOUR_IG_STATIC_ID .a-GV-table tr.a-GV-controlBreak .a-GV-controlBreakHeader .a-Button.js-toggleBreak").click();
Note: In the above code replace YOUR_IG_STATIC_ID with the Static ID of your Interactive Grid region.

Interactive Grid autosave and refresh (after processing)

I have Interactive Grid with Static ID full_grid. For auto save I have dynamic action based on JavaScript Expression:
$('input[type=text]')
which saves grid details:
apex.region("full_grid").widget().interactiveGrid("getActions").invoke("save");
and it calls process - Interactive Grid - Automatic Row Processing (DML), with custom PL/SQL logic. This part is okay, everything working, but I have problem with data refresh. If I updating only one cell (row), everything is okay, because it updating only one row (last modified), but sometimes I need to update 1 or 2 additional rows when updated one of row. I mean if I have 10 rows, when I update 5th row, I update 2nd and 3rd rows as well (in database table), and after processing Interactive Grid is not updated visually for 2nd and 3rd rows. I understand that I have to refresh Interactive Grid after processing, but I don't have idea how I can do it. It is possible to call JavaScript function from PL/SQL or maybe there is another solution to refresh Interactive Grid after processing without page submit?
Try:
apex.region("full_grid").widget().interactiveGrid("getActions").invoke("selection-refresh");
for refresh current line, or
apex.region("full_grid").widget().interactiveGrid("getActions").invoke("refresh");
for full refresh.

Dynamic action is not trigger if i will put the LOV select list value in where condition on click button event

I am selecting a value from LoV.Then i am clicking a button to trigger dynamic action(When->event=click,selection type->Button,Button name).Then in Server-side Condition i am putting (rows return->select * from tab)--Its triggering as expected,But if i will change sql query (select * from tab where col=:Lov)(there is 1 record,but its not triggering).
The reason why it is not triggered, is because a server-side condition tells APEX whether or not to load the defined Dynamic Action when rendering the page.
In your first example, the query select * from tab will return rows. So when rendering the page, the dynamic action will be loaded and executed when the button has been pressed.
In your second example, including the where clause select * from tab col=:Lov, page item :lov is most likely still empty when rendering the page and therefore the dynamic action is not being loaded and doesn’t exist for the browser at the moment you press the button.
Server-side condition is not the right solution here.
If you want the dynamic action only being executed when the selected lov item also exist in a table.
In APEX 5.1 you can execute an AJAX call in your DA to check the row existence before executing the actual logic.
In APEX 19.2 you can define extra output columns in a LOV, which you can use to set an additional page item. Set that item as an indicator (Y/N) to run the DA. Then you can use the Client-side condition to determine whether or not the DA should be executed, based on the indicator.
Hope this helps. Let me know when you need further assistence with one of the two solutions.

Oracle Apex - refresh all subregions with one refresh in dynamic action

I am working with APEX 19.2.0.00.18. I have a page with a static region with 4 chart subregions, plus a radio button that allows the user to select which series (total, mean, median) to display in the charts. I have a dynamic action set up to refresh charts when the radio button value is changed. This dynamic action consists of:
execute null PL/SQL code to submit the radio button value
refresh chart subregion 1
refresh chart subregion 2
refresh chart subregion 3
refresh chart subregion 4
Is there any way to simplify this to refresh all 4 chart subregions with a single refresh? I have multiple static regions like this (i.e., containing multiple chart subregions) on this page, so reloading the entire page is not an ideal option.
Scott's answer is pretty much correct, but if you decide to use the newer apex.region JS API, you have to use it with a region static id.
So just give the regions you want to refresh a static id and then use the API like this (e.g. in a Execute JavaScript Dynamic Action):
apex.region('MY_STATIC_ID1').refresh();
apex.region('MY_STATIC_ID2').refresh();
apex.region('MY_STATIC_ID3').refresh();
Answer previously here
https://stackoverflow.com/a/58126513/527513
Can be applied a number of ways, but you're using the JS API refresh any region with a given selector, in this case the refreshme class
$('.refreshme').trigger('apexrefresh');
The API offering has changed over time, apex.region being the newer method.
apex.region( "static_id1" );
apex.region( "static_id2" );
As Daniel noted, these need to be supplied as static IDs, not a given selector. I should have realised this since the example was absent the # of the static ID.

Oracle APEX - Interactive Grid not rendering correctly in IE 11

I am currently using Oracle APEX version 18.2.0.00.12 on Internet Explorer 11 and I am experiencing problems with getting my interactive grids to render correctly with regards to the widths of the columns.
I created an Interactive Grid on my page with the following query:
SELECT * FROM TABLE_NAME;
I did not change any of the default settings for the region; all I did was create the IG and then run the page.
When I run the page in IE, this is what I see:
Note: I have not yet added any data to the table.
The problem is that all of the columns are too narrow. However, when I run the same page in Google Chrome, this is what I see:
The columns are all sized proportionally in order to take up the full width of the IG, which is what I want.
I do not understand why the IG is rendered differently in IE versus Chrome. I know that I can set the Minimum Column Width for each column in the IG, but I would hate to do that every time I create an IG. Is there a different solution that would make the IG render in IE the same way that it does in Chrome?
Thank you in advance.
Actually remembered a solutuion. I cannot explain to you why this works, or how best to use it. But when I had this problem I sort of patched it by saving a default report.
But the strange thing, you had to manually adjust every column, even if it was to the same size as before, it just had to have been adjusted before the default report was saved. Then the grid would show as it should, but this isnt that good a solution since its only ok if everybody uses the same size display,..