Skip to content

Commit 8e47212

Browse files
author
pipeline
committed
feature(EJ2-3474): angular samples for pagesizes feature
1 parent c454280 commit 8e47212

File tree

6 files changed

+28
-17
lines changed

6 files changed

+28
-17
lines changed

src/common/samplelist.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ import { circulargaugeAppRoutes } from '../circulargauge/circulargauge.module';
1515
import { lineargaugeAppRoutes } from '../lineargauge/lineargauge.module';
1616
import { textboxesAppRoutes } from '../textboxes/textboxes.module';
1717
import { tooltipAppRoutes } from '../tooltip/tooltip.module';
18+
import { maskedTextBoxAppRoutes } from '../maskedtextbox/maskedtextbox.module';
1819
import { timePickerAppRoutes } from '../timepicker/timepicker.module';
1920
export let samplesList: any = [
2021
{
@@ -70,5 +71,8 @@ export let samplesList: any = [
7071
},
7172
{
7273
'name': 'Tooltip', 'category': 'Layout', 'order': '04', 'path': 'tooltip', 'samples': tooltipAppRoutes
74+
},
75+
{
76+
'name': 'MaskedTextBox', 'category': 'Editors', 'order': '03', 'path': 'maskedtextbox', 'samples': maskedTextBoxAppRoutes, "type": "new"
7377
}
7478
];

src/common/sb.router.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ import { TextboxesModule } from '../textboxes/textboxes.module';
1818
import { TooltipSampleModule } from '../tooltip/tooltip.module';
1919
import { CircularGaugeSampleModule } from '../circulargauge/circulargauge.module';
2020
import { LinearGaugeSampleModule } from '../lineargauge/lineargauge.module';
21+
import { MaskedTextBoxSampleModule } from '../maskedtextbox/maskedtextbox.module';
2122

2223
const appRoutes: any = [
2324
{ path: 'chart', loadChildren: ChartSampleModule },
@@ -38,6 +39,7 @@ const appRoutes: any = [
3839
{ path: 'textboxes', loadChildren: TextboxesModule },
3940
{ path: 'toolbar', loadChildren: ToolbarSampleModule },
4041
{ path: 'tooltip', loadChildren: TooltipSampleModule },
42+
{ path: 'maskedtextbox', loadChildren: MaskedTextBoxSampleModule },
4143
{ path: '', redirectTo: 'material/chart/line', pathMatch: 'full' }
4244
];
4345

@@ -61,6 +63,7 @@ const appRoutes: any = [
6163
DialogSampleModule,
6264
ToolbarSampleModule,
6365
TooltipSampleModule,
66+
MaskedTextBoxSampleModule,
6467
RouterModule.forRoot(appRoutes)
6568
],
6669

src/grid/grid.module.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ import { ColumnResizingComponent } from './column/columnresizing.component';
3939
export const gridRouteConfig: Object[] = [
4040
{ 'path': ':theme/grid/default', component: DefaultComponent, 'name': 'Default Functionalities', order: '01', category: 'Grid' },
4141
{ 'path': ':theme/grid/gridlines', component: GridLinesComponent, 'name': 'Grid Lines', order: '01', category: 'Grid' },
42-
{ 'path': ':theme/grid/paging', component: PageComponent, name: 'Paging', order: '01', category: 'Grid' },
42+
{ 'path': ':theme/grid/paging', component: PageComponent, name: 'Paging', order: '01', category: 'Grid', type: 'update' },
4343
{ 'path': ':theme/grid/filtering', component: FilterComponent, name: 'Filtering', order: '01', category: 'Grid' },
4444
{ 'path': ':theme/grid/grouping', component: GroupComponent, name: 'Grouping', order: '01', category: 'Grid' },
4545
{ 'path': ':theme/grid/sorting', component: SortComponent, name: 'Sorting', order: '01', category: 'Grid' },

src/grid/paging-plnkr.json

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

src/grid/paging.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,6 @@ export class PageComponent implements OnInit {
1111

1212
ngOnInit(): void {
1313
this.data = data;
14-
this.initialPage = { pageSize: 9, pageCount: 8 };
14+
this.initialPage = { pageSizes: true, pageCount: 4 };
1515
}
1616
}

src/grid/paging.html

Lines changed: 18 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -9,24 +9,28 @@
99
</e-columns>
1010
</ej-grid>
1111
<div id="description">
12-
<p>Paging allows you to display the contents of the Grid component in page segments. The number of items on a page is
13-
determined by the <code><a target="_blank" class="code"
12+
<p>Paging allows you to display the contents of the Grid in page segments. By default, paging is disabled. To enable
13+
paging, set <code><a target="_blank" class="code"
14+
href="http://ej2.syncfusion.com/angular/documentation/grid/api-gridComponent.html#allowpaging-boolean">
15+
allowPaging
16+
</a></code> property to true.
17+
<code><a target="_blank" class="code"
1418
href="http://ej2.syncfusion.com/angular/documentation/grid/api-gridComponent.html#pagesettings-pagesettingsmodel">
15-
pageSettings->pageSize
16-
</a></code> property. If no value is specified for the <code><a target="_blank" class="code"
17-
href="http://ej2.syncfusion.com/angular/documentation/grid/api-gridComponent.html#pagesettings-pagesettingsmodel">
18-
pageSettings->pageSize
19-
</a></code> property, the Grid will display 12 items on a page. By default, paging is disabled. To enable paging, set <code><a target="_blank" class="code"
20-
href="http://ej2.syncfusion.com/angular/documentation/grid/api-gridComponent.html#allowpaging-boolean">
21-
allowPaging
22-
</a></code> property to true.</p>
19+
pageSettings->pageSizes
20+
</a></code> property enables a dropdown in pager which allows you to change the number of records in
21+
Grid dynamically.
22+
</p>
2323
<p>
24-
In this demo, the Grid is rendered with its default page settings, also the
25-
<code><a target="_blank" class="code"
24+
In this demo, the Grid is rendered with
25+
<code><a target="_blank" class="code"
26+
href="http://ej2.syncfusion.com/angular/documentation/grid/api-gridComponent.html#pagesettings-pagesettingsmodel">
27+
pageSettings->pageSizes
28+
</a></code>set to true, and
29+
<code><a target="_blank" class="code"
2630
href="http://ej2.syncfusion.com/angular/documentation/grid/api-gridComponent.html#pagesettings-pagesettingsmodel">
2731
pageSettings->pageCount
28-
</a></code> is set to 5.
29-
</p>
32+
</a></code>set to 4.
33+
</p>
3034
<br>
3135
<p style="font-weight: 500">Injecting Module</p>
3236
<p>

0 commit comments

Comments
 (0)