I'm using the primeng datatable which have columns are editable. I want to mark the cell as dirty once it's been edited and save the edited rows to the database. Can anyone advise is there a way to do this ?
Angular2 PrimeNG datatable Editable cell dirty flag
517 Views Asked by chloe At
1
There are 1 best solutions below
Related Questions in ANGULAR
- Firebase link existing user to anonymous account?
- It doesnt always show all the books on my homepage
- Google adsense ads.txt status cannot be not found
- When I navigate to the URL'http://localhost:4200/', it redirects me back
- Ionic Angular Standalone ion-icon are not showing at all
- How to make Angular understand that view child is of a specific type, not a general ElementRef?
- vscode, debug angular, first time, doesn't debug, 2nd time stops at main.js then it's ok
- How to perform CRUD operations on a static JSON array in Angular? (without API)
- Ngrx props<>() method in createAction()
- How to animate rotation of an image inside input control?
- Detecting click inside and outside of the listening component in Angular
- Angular - type guard not narrowing types
- In node_modules file i am getting Angular genric error while using fontawesome in angular12
- Angular 16 sending null values to API
- GoogleCloud Error: Not Found The requested URL was not found on this server
Related Questions in PRIMENG-DATATABLE
- how to create a mouseEvent with target in typescript without dispatching?
- How to use headercheckboxicon and checkboxicon tempaltes primeng Checkbox Selection
- PrimeNg Table stops rendering after trying to use [pSelectableRow] with dynamically created component with ngTemplateOutlet
- Scroll to table row in Angular
- How to change the size of a textfield from an primeng columnFilter
- Click on primeng dropdown and p-table paginator dropdown moves the body of the page
- Select all of pTable customize
- PrimeNg Table method "dt.filter" doesn't filter character: "/"
- Prime ng tree table resizer is not working in expand mode when virtual is scroll and scrollable true
- Angular PrimeNG: Column Selection
- p-dropdown not being tabbable after primeng upgrade to latest version
- Primeng custom filter using p-calendar throws error: Error: Error trying to diff '[object Object]'. Only arrays and iterables are allowed
- How do I replace header icons in PrimeNG?
- How to Create a Yes/No Filter for Query Criteria in PrimeNG v11
- when use primeNG table, how to exit row edit when click another line
Related Questions in DIRTY-DATA
- Comparing datasets with dirty data to find common ro
- import dirty csv file with unwanted characters, strings
- c++ when reading from a file i continualy get dirty memory in my array and in my file
- Read from table while prepared statement inserts in batch
- Find item by ID in treeview node list
- Why do we need to write dirty pages back to disk to evict it?
- Use glang to develop web application. How to clear dirty data in the database due to unit testing
- How to set an ImageDocument to be not dirty in dm-script
- How to use imageData in animations
- Input field is dirty and shows red border validation only in IE11 (Angular8)
- Teradata: How to LEFT OUTER JOIN unlike datatypes?
- How to manually set dirty flag on specific cells in GridPanel in ExtJs
- Hibernate refresh only dirty entities
- SQL query for entity names with small differences
- Prevent input change from causing form to dirty (Angular 5.2)
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular # Hahtags
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
It really depends on how you are trying to handle the saves. The default way (save as soon as focus of the input has changed) or save a bunch of changes based on user action (i.e. the user clicks save and saves them all at once). I am assuming the second option since that seems to make the most sense based on your question.
This is how I've accomplished this in a project I'm currently working on.
selectedRows: any[] = [];(onRowSelect)="yourRowSelectHandler($event)"event handler. a. The event will include a data property that has all the data from the selected row. b. Push the data to your selectedRows array.Here is a plunkr to demonstrate the basics: http://plnkr.co/edit/59AghKq6NtOXvndT64Iy?p=preview