How refresh / update ng2 smart table when a row is edited Angular7 - angular7

I need to update ng2 smart table after editing a row. Is there a method to refresh the array of objects?

if your are using source, you can use
this.source.refresh();

Related

ASP.NET MVC Table change data function

I want to change a single data from the table index which is stored in the database and not touching any data in the database. I just want the function in the button with a single click, without going through a Edit view in CRUD operation.
this is the data i want to change, thanks for any help.

MVC 4 - Save Row information back to the Database when a user has edited a field

I am using an editorfor template so that users can edit row information inline when the information is displayed as a table. The user then has a save button below the table which when pressed sends the whole Model to a HttpPost method which then iterates over each row and saves the row back to the database. As you can imagine this can become quite slow when the row number increases as it has to iterate over every row then save the information to the database.
I was looking for some way of saving a single row back to the database if a field is edited within that row or maybe setting a flag to true which when the user presses the save button it only iterates over the rows that have been edited and only saves those rows back to the database?
Any help would be much appreciated.
Regards,
Jay
Why you don't use Ajax to update each row?
You can associate the button to a javascript (jquery) function responsible to update (post) the modified row.
In this way you only update the modified row.
To avoid problems you can use a curtain or a spinner during the execution of the update.
Regards,
André

Update NSFetchedResultsController fetch request predicate, refresh table with animations?

I cannot seem to find this laid out anywhere.
I have what is effectively a search box (though it's using a UITextView, not a search box/controller).
As the user types in words, I want to update the 'suggestions' in the table view below that are pulled from Core Data. These are displayed in a table below using the typical NSFRC setup.
After the user types (and with a delay of .5s) I update the fetch request predicate with their text, and call performFetch again.
What I really want is the new results to animate in, as you would normally see with NSFRC, of course leaving any existing matching rows in place. Currently the only way I get these to update is by calling reloadData on the table.
Is there a way to get what I'm after here?

Ios: Saving / update more than one records at the same time with core data

I have a similar question with This. Basically, is there a way to save / update multiple records from the table view at once with core data?
All you really need to do is record which rows are checked and then alter the corresponding managed object appropriately.
A check mark is an accessory view so you would put the code to record which rows are checked (or save right then) in tableView:accessoryButtonTappedForRowWithIndexPath:
If you are using NSFetchedResults controller, you can just save the index path object in an array and it will record which managed object in the controllers fetchedObjects that you need to save/update because its table row got checked.

Web App Saving Entire Table At Once

Set the scene:
New to .NET; drinking from firehose
ASP.NET MVC app, SQL Server back
Editable table in browser with a single SAVE button.
User can right-click to add or delete rows.
Table won't ever have more than approx. 30 rows.
My question :
I'm saving everything upon the Save button click but would it be better to save row by row, AJAX style, as the user makes updates?
I don't like the look of separate buttons for each row, which is why I've designed it this way.
Is this mostly a UI issue? Am I missing any technical gotchas here, such as backend failure during the mass saving of the rows?
Additionally, assume I do save the entire table at once, is it better to create an ADO DataTable object or just loop through, inserting/updating each row as I go by calling a stored procedure. I suppose I could add LINQ to the firehose, but that would make this question even less "answerable".
You don't have a huge volume of data here, so saving all 30 rows at the end of the table is a reasonable approach. But you should be prepared for a failure, particularly if you are changing existing rows when it will fail more often due to other apps/users changing the same data. Just make sure that you wait for confirmation from the SQL server that the changes have been committed.
What I've done before with these sorts of big table views is when somebody clicks on a cell they'd like to edit, run some ajax to display a text field with that text, they can edit, then listen to onmouseout and the enter button to send off the ajax request to modify the single row.
When the response from the ajax call comes back you can add a tooltip or something that it was saved, and then change the cell to the new val.
Assuming you have SQL2005, you could build up an XML document with all of your data rows, then call a single stored proc and pass it your XML. Then the stored proc could save all of the rows at once.

Resources