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.
Related
I need help creating a link in Oracle APEX.
I have two Interactive Report pages created in Oracle APEX.
The first page is an Interactive Report for a list of cats. When clicking on that link, filter the second page's Interactive Report by the "fur color" column. Furthermore, I want to always be "white" in addition to the color of the selected row.
I try 2 types of methods to create a link in Link Builder.
Name = IR_FUR_COLOR, Value = &P18_FUR_COLOR. and more one line Value = White
Name = IR_FUR_COLOR, Value = &P18_FUR_COLOR.,White
But they did not work.
How should I do it? Does anyone help me?
Thank you for watching this question!
Link Builder should contain only
Name: IR_FUR_COLOR, Value: &P18_FUR_COLOR
Modify the second Interactive Report's query so that its where clause looks like this:
where fur_color in ('white', :IR_FUR_COLOR)
which means that it'll always filter white color, along with any color you pass from the previous page.
There are variations to that approach; for example, you could create another (hidden) item on the 2nd page and pass white to it and then
where fur_color in (:HIDDEN_FUR_COLOR, :IR_FUR_COLOR)
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.
I am using an interactive grid in oracle apex. When we double click the grid it goes into an edit mode. I want to get rid of this functionality because my grid is not editable this way.
if you don't want the user to be able to edit row content, change the column type under Report -> Columns -> Your column -> Type. For example try setting it to Display only so that the users cannot change the content.
I have been trying to replicate the same from a long time. Just found a workaround for this.
Create Dynamic Action on Interactive grid on event Double Click
Set Action = Execute JavaScript Code
Use following code in action
apex.region("emp").widget().interactiveGrid("getActions").set("edit", false);
Make sure to replace emp with static ID which you should provide in IG region.
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,..
I have an Interactive Report in Oracle APEX 5.1, i have several columns which i want to Hide but allow the end user to search for a text within the hidden column(s).
I have pasted below in the "Function and Global Variable Declaration" section of JavaScript for the page that contains the interactive report -
function hideColumn(id) {
$(id).remove();
}
and below in the "Execute when Page Loads" section -
hideColumn('#static-id-of-column-to-hide');
But this hides the column header ONLY, the data for the respective column is still visible. The space for the hidden column is taken up by the next column header. Also, i have tried both $(id).remove(); and $(id).hide(); , result is same.
Any suggestion?
You could use CSS instead, where your_report is the Static ID for the region, and YOUR_COL usually comes from the column alias. You can verify this by inspecting the element using the browser tool.
#your_report td[headers="YOUR_COL"]
,#your_report th#YOUR_COL
{
display: none;
}
But you might find the report doesn't always respond as expected, in regard to settling column widths.
If you do go the JS route, you should fire this in a Dynamic Action that's After Refresh of that region, not just on page load.
Try this instead of that. (into page inline CSS) It will fix your trouble with column widths maybe.
.a-IRR tr th:nth-child(X), .a-IRR tr td:nth-child(X) {
display:none;
}
where "X" is the column number what you want to hide.