Keep igGrid Filtering settings - infragistics

I am displaying some data in an Infragistics igGrid. After displaying, I manipulate some of the rows displayed and reload the data. After reloading, the datagrid resets the filter settings. How can I call the data filtering function manually after i reload the data.

Use this code to call filtering programmatically.
$(".selector").igGridFiltering("filter", ([{fieldName: "Name", expr: "Adjustable Race", cond: "equals", logic: "OR"}]));
See this link for more details.

Related

Oracle Apex - Problem with InteractiveGrid field in Dynamic Action refresh

I have a problem using a dynamic action refresh in an interactive grid.
I have a field of type popup lov, when I choose one of the items in the list, I am performing a query to fill a collection, and then I do a refresh with a dynamic action, so that the data is reflected in the grid.
But at the moment of doing it, this happens with the field:
enter image description here
and in the console it shows me the following:
enter image description here
I hope to have your help, thank you very much.

Prevent all pages -> page -> visualization filter to apply

I need to create a report with several pages filtered out to some entities (whatever) to display some consumption charts. I made a filter at "all pages" level to modify all pages at once. Working fine!
However I would like to have average for all entities displayed so member of a specific entity can compare to others without having their details.
To do this, I found it would be convenient to have a way to prevent :
visualization to apply "page" and "all pages" filters
"page" to apply"all pages" filters
In other words to prevent filters cascading.
Can this be made ?
Thx,
To stop filter interaction you have to click on your visual and then go to Format > Edit Interaction. Now you see on every other visual a diagram and a circle. If the diagram is grey the interaction is active, is the circle is grey the interaction is inactive.
For your second problem you can activate the sync slicers pane (View > Sync Slicers). However this just works for slivers and not for filters which are in the filter pane.
At the moment it is not possible to stop or edit interactions from filters within the filter pane. They are applied always like it is stated: For a visual, page or all pages.

How to disable edit mode of oracle apex interactive grid on double click?

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.

How can I set the Interactive Grid and its form in same page on Oracle Apex 18?

I set the Interactive Grid and its form in same page. For exampe:
The name of table is TEAM, and it has columns like TEAM_ID, TEAM_NMAE, DESCRIPTION.
These contents are displayed in Interactive Grid, and they can't be edited in interactive grid alone.
I added Row Selector in Interactive Grid, set to select only one row at a time.
As you can see in above picture, below the page I set the form that displays contents from the seleted row in the interactive grid. I also added save, create, delete buttons in the form region.
So, I want to edit the table's contents in one page when clicking the button.
I can just display table's contents in items using '$s("P3_TEAM_ID", team_id);' function, but still, I can't apply changed items to real table (in the interactive grid).
In this case, how can I make the form and interactive grid work as I think?
Your gonna need to do some custom saving.
Display the data with some javascript $s
Then have a process that manually saves the page items into the DB.
UPDATE table
SET name = :P1_NAME
,address = :P1_ADDRESS
...
WHERE id = :P1_ID;
Something like that. Not that hard to do, just set it into processes when a save button is clicked.

Copy Records in Oracle Apex

I need to copy selected row values and store as a new record.
I am using Oracle Apex 4.2 and Tabular Form.
I need to use checkbox to select the rows and button copy. When i select multiple rows followed by click copy button to copy all the selected row values as new rows and save.
Can anyone Help
Copying Records Through an APEX Tabular Form Input
The idea of cloning existing records from a single table through an Oracle APEX Tabular Form works without much interference with the default design that you can set up through the APEX wizard for page region content.
Build a table with an independent primary key.
Suggested to include two auxiliary columns: COPY_REQUEST and COPIED_FROM for running copy operations. Specific form elements will map to these columns on the tabular form that will be set up.
Build an Oracle stored procedure that can read which records need to be copied. This procedure will be invoked each time the SUBMIT button is pressed.
(optional) Consider including a suppression of step (3) in the event that there is nothing to process (i.e., no records marked for copying).
The Working Table for Receiving Input: COPY_ME
TIP: You will have an easier time if you use the standard TABLE creation wizard. Designate CUSTOMER_ID as the PRIMARY_KEY and have APEX create its standard auto-incrementing functionality on top. (sequence plus trigger set up.)
Here's the sample data I used... though it doesn't matter. You can put in your own values and be able to verify what happened easily.
The Heavy Lifting: The Stored Procedure for Cloning Records in COPY_ME
This procedure works with 1 or more records at a time with a special identifier in the COPY_REQUEST table. After the task is done, the procedure cleans up and resets the request value again.
create or replace procedure proc_copy_me_request is
c_request_code CONSTANT char(1):= 'Y';
cursor copy_cursor is
SELECT cme.CUSTOMER_ID, cme.CUSTOMER_NAME, cme.CITY, cme.COUNTRY,
cme.COPY_REQUEST
FROM copy_me cme
WHERE cme.COPY_REQUEST = c_request_code
FOR UPDATE OF cme.COPY_REQUEST;
BEGIN
FOR i in copy_cursor LOOP
INSERT INTO copy_me (customer_name, city, country, copied_from)
VALUES (i.customer_name, i.city, i.country, i.customer_id);
UPDATE copy_me
SET copy_request = null
WHERE CURRENT OF copy_cursor;
END LOOP;
COMMIT;
END proc_copy_me_request;
There is also a column that can be hidden. It tracks where the record was originally copied from.
Note that the cursor is using the FOR UPDATE OF and WHERE CURRENT OF notation. This is important because the procedure is changing the records that are referenced by it.
APEX Page Setup Instructions
Set up a standard FORM type page and choose the TABULAR FORM style. Follow the set up instructions, taking care to map the correct primary key, and also to the PK sequence object created with the table in the previous steps above.
This is what your page set up will look like after these steps are completed:
EDIT The COPY_REQUEST Form Value:
Under the column attributes section, change the Display As option to "simple checkbox"
Under the list of values section, put a single value under the LOV Definition: Y (case sensitive in either way... just be consistent)
EDIT The COPIED_FROM Form Value:
Under the column attributes section, change the Display As option to "Display as Text(Saves State)". This is just to prevent users from stepping on this read-only field. You could also suppress it if it isn't important to know.
CREATE a New Process: Execute Copy Procedure
This is the bottom of the same configuration page, there are very few things to change or add:
Demonstration: Screenshot of COPY_ME Tabular Form Page in Action
The first screenshot below is before the page is tidied up and the checkbox control is put into place.
Plug in some test data and give it at try. The Page Process created in the step above conditionally invokes the stored procedure that processes all copy requests made at the same time when the SUBMIT form button is selected.
COMMENTS: If you spend enough time tinkering around with the built-in wizards in Oracle APEX, there are opportunities to learn new design patterns and process flows compatible within the tool. Adapting your approach can reduce the amount of additional work and frustration.