# DkGridEdition

## Generics

<mark style="color:green;">`<T>`</mark> represents the object's shape coming from the data source.

## Properties

| Property             | Description                                                                                                                                                                                                                                           |
| -------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `rowsInEdition`      | <p>It is a <strong>read-only</strong> property that returns all the rows in edition state.<br></p><p><strong>Type</strong>: <mark style="color:green;"><code>DkGridDataRowEntry\<T>\[]</code></mark>.</p>                                             |
| `modifiedRows`       | <p>It is a <strong>read-only</strong> property that returns all the modified rows.<br></p><p><strong>Type</strong>: <mark style="color:green;"><code>DkGridDataRowEntry\<T>\[]</code></mark>.</p>                                                     |
| `removedRows`        | <p>It is a <strong>read-only</strong> property that returns all the deleted rows.<br></p><p><strong>Type</strong>: <mark style="color:green;"><code>DkGridDataRowEntry\<T>\[]</code></mark>.</p>                                                      |
| `editionFilterState` | <p>It is a <strong>read-only</strong> property that returns <mark style="color:red;"><code>true</code></mark> if the user navigates the edition filters.<br></p><p><strong>Type</strong>: <mark style="color:green;"><code>boolean</code></mark>.</p> |

## Methods

| Method                  | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| ----------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `editRow()`             | <p>It changes the row status to <strong>edition state</strong>.<br></p><p><strong>Params</strong>: </p><ol><li>row: <mark style="color:green;"><code>DkGridDataRowEntry\<T></code></mark>.</li></ol><p><strong>Return</strong>: <mark style="color:green;"><code>void</code></mark>.</p>                                                                                                                                                                                 |
| `updateRow()`           | <p>It <strong>saves</strong> the changes in the given row. The given row must be <strong>valid</strong> and <strong>not pristine</strong>. After updating, DkGrid sets the row status to <mark style="color:red;"><code>Modified</code></mark>.<br></p><p><strong>Params</strong>: </p><ol><li>row: <mark style="color:green;"><code>DkGridDataRowEntry\<T></code></mark>.</li></ol><p><strong>Return</strong>: <mark style="color:green;"><code>void</code></mark>.</p> |
| `cancelRowEdition()`    | <p>It changes the row status to <mark style="color:red;"><code>Read</code></mark> status. This method discards all the changes in the given row.<br></p><p><strong>Params</strong>: </p><ol><li>row: <mark style="color:green;"><code>DkGridDataRowEntry\<T></code></mark>.</li></ol><p><strong>Return</strong>: <mark style="color:green;"><code>void</code></mark>.</p>                                                                                                |
| `removeRow()`           | <p>It changes the row status to <mark style="color:red;"><code>Deleted</code></mark> status.<br></p><p><strong>Params</strong>: </p><ol><li>row: <mark style="color:green;"><code>DkGridDataRowEntry\<T></code></mark>.</li></ol><p><strong>Return</strong>: <mark style="color:green;"><code>void</code></mark>.</p>                                                                                                                                                    |
| `restoreRow()`          | <p>It reverts any change that the user has made.<br></p><p><strong>Params</strong>: </p><ol><li>row: <mark style="color:green;"><code>DkGridDataRowEntry\<T></code></mark>.</li></ol><p><strong>Return</strong>: <mark style="color:green;"><code>void</code></mark>.</p>                                                                                                                                                                                                |
| `updateRowsInEdition()` | <p>It takes all <strong>valid</strong> rows which are <strong>not</strong> <strong>pristine</strong> and saves their changes.<br></p><p><strong>Params</strong>: None</p><p><strong>Return</strong>: <mark style="color:green;"><code>void</code></mark>.</p>                                                                                                                                                                                                            |
| `removeRows()`          | <p>It deletes the given rows that are not in the edition state.<br></p><p><strong>Params</strong>: </p><ol><li>rows: <mark style="color:green;"><code>DkGridDataRowEntry\<T>\[]</code></mark>.</li></ol><p><strong>Return</strong>: <mark style="color:green;"><code>void</code></mark>.</p>                                                                                                                                                                             |
| `cancelRowsInEdition()` | <p>It cancels the current edition state for every row, losing all the changes you have made.<br></p><p><strong>Params</strong>: None.</p><p><strong>Return</strong>: <mark style="color:green;"><code>void</code></mark>.</p>                                                                                                                                                                                                                                            |
| `restoreRows()`         | <p>It takes those <strong>modified</strong> or <strong>removed</strong> rows from the given rows and restores them to their immediate previous state.<br></p><p><strong>Params</strong>: </p><ol><li>rows: <mark style="color:green;"><code>DkGridDataRowEntry\<T>\[]</code></mark>.</li></ol><p><strong>Return</strong>: <mark style="color:green;"><code>void</code></mark>.</p>                                                                                       |
| `setEditionFilter()`    | <p>It displays the corresponding subset of rows editing.<br></p><p><strong>Params</strong>: </p><ol><li>value: <mark style="color:green;"><code>RowStatus</code></mark>.</li></ol><p><strong>Return</strong>: <mark style="color:green;"><code>void</code></mark>.</p>                                                                                                                                                                                                   |
| `cancelEditionFilter()` | <p>It makes DkGrid shows the standard view.<br></p><p><strong>Params</strong>: None</p><p><strong>Return</strong>: <mark style="color:green;"><code>void</code></mark>.</p>                                                                                                                                                                                                                                                                                              |

## Events

| Event                      | Description                                                                                                                                                                                                                     |                                               |
| -------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------- |
| `editionRowChange`         | <p>It emits the row that has been changed to edition mode.<br></p><p><strong>Params</strong>: None.</p><p><strong>Return</strong>: <mark style="color:green;"><code>Observable\<DkGridDataRowEntry\<T>></code></mark>.</p>      |                                               |
| `updateRowChange`          | <p>It emits the modified rows.<br></p><p><strong>Params</strong>: None.</p><p><strong>Return</strong>: <mark style="color:green;"><code>Observable\<DkGridDataRowEntry\<T>                                                      | DkGridDataRowEntry\<T>\[]></code></mark>.</p> |
| `cancelRowEditionChange`   | <p>It emits the rows that have been canceled for edition.<br></p><p><strong>Params</strong>: None.</p><p><strong>Return</strong>: <mark style="color:green;"><code>Observable\<DkGridDataRowEntry\<T>                           | DkGridDataRowEntry\<T>\[]></code></mark>.</p> |
| `removeRowChange`          | <p>It emits the rows that have been deleted.</p><p><br><strong>Params</strong>: None.</p><p><strong>Return</strong>: <mark style="color:green;"><code>Observable\<DkGridDataRowEntry\<T>                                        | DkGridDataRowEntry\<T>\[]></code></mark>.</p> |
| `removeRowChange`          | <p>It emits the rows that have been deleted.</p><p><br><strong>Params</strong>: None.</p><p><strong>Return</strong>: <mark style="color:green;"><code>Observable\<DkGridDataRowEntry\<T>                                        | DkGridDataRowEntry\<T>\[]></code></mark>.</p> |
| `restoreRowChange`         | <p>It emits the rows whose changes were reverted.<br></p><p><strong>Params</strong>: None.</p><p><strong>Return</strong>: <mark style="color:green;"><code>Observable\<DkGridDataRowEntry\<T>                                   | DkGridDataRowEntry\<T>\[]></code></mark>.</p> |
| `editionFilterStateChange` | <p>It emits every time you navigate between the standard and the edition view.<br></p><p><strong>Params</strong>: None.</p><p><strong>Return</strong>: <mark style="color:green;"><code>Observable\<boolean></code></mark>.</p> |                                               |


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.dikesoft.com/reference/dkgrid-api/dkgridedition.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
