Skip to content

Commit 5670a64

Browse files
author
pipeline
committed
feature(EJ2-3951): Editing samples added.
1 parent f321b61 commit 5670a64

File tree

7 files changed

+52
-15
lines changed

7 files changed

+52
-15
lines changed

src/grid/batch-editing-plnkr.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

src/grid/batch-editing.html

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,28 @@
55
</div>
66

77
<div id="description">
8+
<p> The Grid supports CRUD operations. This CRUD operations can be configured in Grid using
9+
<code><a target="_blank" class="code" href="http://ej2.syncfusion.com/documentation/grid/api-editSettings.html">
10+
editSettings</a></code>. Also, It has different modes to manipulate the datasource.
11+
</p>
12+
<p>The available modes are,</p>
13+
<ul>
14+
<li><code>Inline</code></li>
15+
<li><code>Dialog</code></li>
16+
<li><code>Batch</code></li>
17+
</ul>
818
<p>
9-
Batch editing mode is used to send bulk request (add, update and delete) to Grid. You can start editing by double clicking
10-
a cell and can change cell value. Edited cell will be highlighted while navigating to next cell or any other row,
11-
so that you know which fields or cells has been edited.
19+
In this demo, Batch mode is enabled for Editing by defining <code><a target="_blank" class="code"
20+
href="http://ej2.syncfusion.com/documentation/grid/api-editSettings.html#mode-string">
21+
editSettings.mode
22+
</a></code> as <code>batch</code>. You can start editing by double clicking a cell and can change cell value.
23+
The edited cell will be highlighted while navigating to a new cell, so that you know which cells had been edited.
24+
You can bulk save the edited data to datasource by click on the toolbar's <code>update</code> button
25+
or by externally invoking the <code><a target="_blank" class="code"
26+
href="http://ej2.syncfusion.com/documentation/grid/api-edit.html#batchsave">
27+
batchSave
28+
</a></code> method.
1229
</p>
13-
<p>In this demo, batch editing is enabled by defining mode as `batch`.</p>
1430
<p style="font-weight: 500">Injecting Module</p>
1531
<p>
1632
Grid features are segregated into individual feature-wise modules. To use editing feature, we need to inject

src/grid/batch-editing.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ this.default = (): void => {
1313
editSettings: { allowEditing: true, allowAdding: true, allowDeleting: true, mode: 'batch' },
1414
allowPaging: true,
1515
pageSettings: {pageCount: 5},
16-
toolbar: ['add', 'edit', 'delete', 'update', 'cancel'],
16+
toolbar: ['add', 'delete', 'update', 'cancel'],
1717
columns: [
1818
{
1919
field: 'OrderID', isPrimaryKey: true, headerText: 'Order ID', textAlign: 'right',

src/grid/dialog-editing-plnkr.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

src/grid/dialog-editing.html

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,23 @@
55
</div>
66

77
<div id="description">
8+
<p> The Grid supports CRUD operations. This CRUD operations can be configured in Grid using
9+
<code><a target="_blank" class="code" href="http://ej2.syncfusion.com/documentation/grid/api-editSettings.html">
10+
editSettings</a></code>. Also, It has different modes to manipulate the datasource.
11+
</p>
12+
<p>The available modes are,</p>
13+
<ul>
14+
<li><code>Inline</code></li>
15+
<li><code>Dialog</code></li>
16+
<li><code>Batch</code></li>
17+
</ul>
818
<p>
9-
Dialog Editing is used to edit rows through dialog component. You can start editing by double clicking a row or toolbar `Edit`
10-
button and then you can change the row values.
19+
In this demo, Dialog mode is enabled for Editing by defining <code><a target="_blank" class="code"
20+
href="http://ej2.syncfusion.com/documentation/grid/api-editSettings.html#mode-string">
21+
editSettings.mode
22+
</a></code> as <code>dialog</code>. You can start editing by double clicking a row or click on toolbar's <code>Edit</code>
23+
button, then the currently selected row will be shown on a dialog and you can change the row values and save edited data to the datasource.
1124
</p>
12-
<p>In this demo, dialog editing is enabled by defining mode as `dialog`.</p>
1325
<p style="font-weight: 500">Injecting Module</p>
1426
<p>
1527
Grid features are segregated into individual feature-wise modules. To use editing feature, we need to inject

src/grid/dialog-editing.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ this.default = (): void => {
1212
editSettings: { allowEditing: true, allowAdding: true, allowDeleting: true, mode: 'dialog' },
1313
allowPaging: true,
1414
pageSettings: {pageCount: 5},
15-
toolbar: ['add', 'edit', 'delete', 'update', 'cancel'],
15+
toolbar: ['add', 'edit', 'delete'],
1616
columns: [
1717
{
1818
field: 'OrderID', isPrimaryKey: true, headerText: 'Order ID', textAlign: 'right',

src/grid/normal-editing.html

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,22 @@
66
</div>
77

88
<div id="description">
9+
<p> The Grid supports CRUD operations. This CRUD operations can be configured in Grid using
10+
<code><a target="_blank" class="code" href="http://ej2.syncfusion.com/documentation/grid/api-editSettings.html">
11+
editSettings</a></code>. Also, It has different modes to manipulate the datasource.
12+
</p>
13+
<p>The available modes are,</p>
14+
<ul>
15+
<li><code>Inline</code></li>
16+
<li><code>Dialog</code></li>
17+
<li><code>Batch</code></li>
18+
</ul>
919
<p>
10-
Inline Editing is used to handle CRUD opertions. In Inline Editing mode the row itself is changed as edited row. You can
11-
start editing by double clicking a row or toolbar `Edit` button and then you can change the row values.
20+
In this demo, Inline mode is enabled for Editing. You can start edit any row by double clicking on it or click on toolbar’s
21+
<code>Edit</code> button, then the currently selected row will be changed to edited state. You can change the row values
22+
and save edited data to datasource.
1223
</p>
1324

14-
<p>In this demo, inline editing is enabled by defining mode as `normal`.</p>
15-
1625
<p style="font-weight: 500">Injecting Module</p>
1726
<p>
1827
Grid features are segregated into individual feature-wise modules. To use editing feature, we need to inject

0 commit comments

Comments
 (0)