How I can save edit box values on a single button click - repeater

I have an EditBox control in a repeat control and its repeat limit is 30. How I can save all edit box values on a single button click.

Since your fields are bound to data sources....
save() is a global function that saves all bound field regardless to the data source.

Related

How to find unsaved rows in a free-jqgrid?

This may be a strange question. But I encounter such a situation in my implementation. I have three free-jqgrid implementation in a single page. And I have, say 5 records in each. In the first grid, I open row number 2 for editing, do some modification to the columns but didn't click on save-icon to save the changes.
Then I jump to the second grid and open up say row number 4 for editing and make some modifications and don't save that also.
After all the grids, I have a button(say, a "Save" button) at the bottom of the page. Once this button is clicked, I need to validate the above grids and show a validation message that "You have some unsaved data in the grids" how to do this in free-jqgrid???
If that is possible, the next requirement is like, I have to save such unsaved data in the grids automatically - (without waiting for the user to click save for each edited row in each grid) to the db. Is it possible with free-jqgrid? If yes, please share me some example or suggest me how shall I achieve this?
This is is just a hint and do not know if in free-jqGrid this is still available.
When the inline editing is on - a grid parameter savedRow (array of objects) stores the original data of the row(s). In case the user cancel editing the row is restored from this parameter and in case of saving it is deleted.
The idea is simple you can check if this this array is not empty to determine which row is in edit mode and in case the user push a external button you can get the id from savedRow parameter and call saveRow methodto save the unsaved data.
I note again - this is just valid if this parameter is still available in free-jqGrid.

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.

Formula help on IF ELSE on Smartsheet

I want to have a condition where IF Delivered column checkbox is checked, then that whole row will be deleted. Is that feasible?
How can I start with it?
Formulas can't change the condition of an item (like a row), only the value in a cell. So, in other words, you can't delete a row with a formula.
You "could" do this with an external script using the Smartsheet API, but you'll want to take situations that #Ken White mentioned in the comments into account. Your script should make sure that there is a way for users to recover the deleted row if the box is checked by mistake.
There are a couple of ways this might be possible. If you set up a default filter on a sheet to always load rows where complete box is unchecked, then, if you checked off a task or two and reloaded the sheet those tasks would not be visible the next time it loads.
To do this:
Create a new filter.
Title it and check the Share Filter checkbox
Set the criteria to the checkbox is unchecked
Then click okay
Save the sheet to save the shared filter.
Click on SHARE
Scroll down and click edit next to the default view
Set the filter to new filter you saved
Save.
Check off some boxes and save the sheet.
Reload the sheet and the completed items will not be visible.

ListView32 - re-adding column doesn't restore data

I'm implementing show/hide column behaviour in a standard C++ Win32 application (no frameworks).
Say we've got 3 columns in a ListView control in Details view. The user has the option to show/hide the last two columns in order to see the extra detail if wanted or hide them to reduce clutter. All works well except that after the columns are deleted and then re-added, the data from the sub-items in those columns doesn't show up again, i.e. the columns are empty.
None of the items themselves have been altered in the meantime - do I lose the sub-item text when I delete the columns or I am missing something to force the columns to redraw the data?
Steps to reproduce:
1) Create a ListView32 control with 3 columns and add a bunch of items (and text to each of the items' sub-items). All good.
2) The user clicks "Hide Details", so I use LVM_DELETECOLUMN twice to remove the last two columns and they disappear. All good.
3) The user clicks "Show Details", so I use LVM_INSERTCOLUMN to add the last two columns and the headings appear, but the columns themselves are empty.
As an alternative, setting the column widths to zero is a hack and the user can still grab the re-size column splitter, so it's not a great option.
Many thanks for any suggestions.
Typically one does not store data in GUI. In case of plain listview32 you should add items specifying LPSTR_TEXTCALLBACK instead of real text and then handle LVN_GETDISPINFOW notification supplying (sub)item data. Windows will send this notification for all items. You can force Windows to retrieve data again by sending LVM_UPDATE message.
Setting the column widths is a viable solution. That is the way I do it in my UIs when columns can be shown and hidden dynamically. It works fine.
To prevent the user from resizing "hidden" columns, simply subclass the ListView using SetWindowLongPtr(GWL_WNDPROC) or SetWindowSubclass() to intercept HDN_BEGINTRACK notifications from the ListView's header control:
Notifies a header control's parent window that the user has begun dragging a divider in the control (that is, the user has pressed the left mouse button while the mouse cursor is on a divider in the header control). This notification code is sent in the form of a WM_NOTIFY message.
...
Returns FALSE to allow tracking of the divider, or TRUE to prevent tracking.

How to notify the user in case of unsubmitted change in QDataWidgetMapper

I'm using QDataWidgetMapper to display values in a model. I set its submit policy to be ManualSubmit so that users won't accidentally put in wrong values. But I also want to warn the user about unsubmitted change if he/she selects another row without saving. I have consulted the documentation and the Internet, but it seems that no signals are emitted prior to change in selection, nor is there any API querying the dirty status of the QDataWidgetMapper, which makes my task seemingly impossible. Is there any way to achieve this?
You can have a variable in the submit slot whose value you can monitor when the user selects another row.
Let value of that variable be x.
When user selects another row, fire a signal whose slot will check whether some text has changed or appeared in the text box of previous row && if that variable is still x.
If the variable is still x that would mean user didn't click the submit button.
When user clicks the submit button, let the variable be y.