Skip to content

Commit bf6ac95

Browse files
author
pipeline
committed
feature(EJ2-3474): typescript samples for pagesizes feature
1 parent 0abd0bd commit bf6ac95

File tree

5 files changed

+17
-18
lines changed

5 files changed

+17
-18
lines changed

src/common/sampleList.ts

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

src/grid/defaultpaging-plnkr.json

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

src/grid/defaultpaging.html

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

88
<div id="description">
9-
<p>Paging allows you to display the contents of the Grid in page segments.
10-
The number of items on a page is determined
11-
by the <code><a target="_blank" class="code"
12-
href="http://ej2.syncfusion.com/documentation/grid/api-pageSettingsModel.html#pagesize-number">
13-
pageSettings->pageSize
14-
</a></code> property.
15-
If no value is specified for the <code><a target="_blank" class="code"
16-
href="http://ej2.syncfusion.com/documentation/grid/api-pageSettingsModel.html#pagesize-number">
17-
pageSettings->pageSize
18-
</a></code> property,
19-
the Grid will display 12 items on a page. By default, paging is disabled.
9+
<p>Paging allows you to display the contents of the Grid in page segments.
10+
By default, paging is disabled.
2011
To enable paging, set <code><a target="_blank" class="code"
2112
href="http://ej2.syncfusion.com/documentation/grid/api-grid.html#allowpaging-boolean">allowPaging
22-
</a></code> property to true.</p>
13+
</a></code> property to true. <code><a target="_blank" class="code"
14+
href="http://ej2.syncfusion.com/documentation/grid/api-pageSettingsModel.html#pagesizes-boolean---number">
15+
pageSettings->pageSizes
16+
</a></code> property enables a dropdown in pager which allows you to change the number of records in Grid dynamically.
17+
</p>
2318
<p>
24-
In this demo, the Grid is rendered with its default page settings, also the
19+
In this demo, the Grid is rendered with
20+
<code><a target="_blank" class="code"
21+
href="http://ej2.syncfusion.com/documentation/grid/api-pageSettingsModel.html#pagesizes-boolean---number">
22+
pageSettings->pageSizes
23+
</a></code>set to true and
2524
<code><a target="_blank" class="code"
2625
href="http://ej2.syncfusion.com/documentation/grid/api-pageSettingsModel.html#pagecount-number">
2726
pageSettings->pageCount
28-
</a></code> is set to 5.
27+
</a></code> is set to 4.
2928
</p>
3029
<p style="font-weight: 500">Injecting Module</p>
3130
<p>

src/grid/defaultpaging.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ this.default = (): void => {
1919
{ field: 'ShippedDate', headerText: 'Shipped Date', width: 140, format: 'yMd', textAlign: 'right' },
2020
{ field: 'ShipCountry', headerText: 'Ship Country', width: 150 }
2121
],
22-
pageSettings: { pageCount: 5 }
22+
pageSettings: { pageCount: 4, pageSizes: true }
2323
});
2424
grid.appendTo('#Grid');
2525
};

src/grid/sample.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
{"url":"sortingapi", "name": "Sorting API", "category":"Sorting"},
2929
{"url":"filter", "name": "Default Filtering", "category":"Filtering"},
3030
{"url":"search", "name": "Search", "category":"Filtering"},
31-
{"url":"defaultpaging", "name": "Default Paging", "category": "Paging"},
31+
{"url":"defaultpaging", "name": "Default Paging", "category": "Paging", "type": "update"},
3232
{"url":"pagingapi", "name": "Paging API", "category": "Paging"},
3333
{"url":"selection", "name": "Default Selection", "category":"Selection"},
3434
{"url":"selectionapi", "name": "Selection API", "category": "Selection"},

0 commit comments

Comments
 (0)