|
App.component.html
<div class="control-section">
<ejs-grid
[dataSource]="data"
allowPaging="true"
[enableHover]="false"
[allowSelection]="true"
[selectionSettings]="selectOptions"
[editSettings]="editSettings"
width="700"
[toolbar]="toolbar"
>
<e-columns>
<e-column type="checkbox" width="50"></e-column>
<e-column
field="OrderID"
isPrimaryKey="true"
headerText="Order ID"
width="120"
textAlign="Right"
></e-column>
<e-column
field="CustomerName"
headerText="Customer Name"
width="150"
></e-column>
<e-column
field="OrderDate"
headerText="Order Date"
width="130"
format="yMd"
textAlign="Right"
></e-column>
<e-column
field="Freight"
headerText="Freight"
width="120"
format="C2"
textAlign="Right"
></e-column>
<e-column
field="ShippedDate"
headerText="Shipped Date"
width="130"
format="yMd"
textAlign="Right"
></e-column>
</e-columns>
</ejs-grid>
</div>
|
<e-column [field]="columns.CHECKED"
[width]="50"
[minWidth]="50"
[maxWidth]="50"
[allowFiltering]="false"
[allowSorting]="false"
[allowResizing]="false">
<ng-template #headerTemplate let-header>
<span class="p-0">
<ejs-checkbox [cssClass]="'scs-cell'"
[checked]="allChecked.all"
[indeterminate]="allChecked.indeterminate"
(change)="onCheckHeaderToggle($event)"
>
</ejs-checkbox>
</span>
</ng-template>
<ng-template #template let-row>
<span class="p-0">
<ejs-checkbox [cssClass]="'scs-cell'"
[checked]="row.checked"
(change)="onCheckedRowToggle($event, row)"
>
</ejs-checkbox>
</span>
</ng-template>
</e-column>
|
App.component.html
<div class="control-section">
<ejs-grid #grid [dataSource]="data" allowPaging="true" [pageSettings]="pageSettings" [enableHover]="false"
[allowSelection]="true">
<e-columns>
<e-column [field]="'id'" [visible]="false" [isPrimaryKey]="true">
</e-column>
<e-column [field]="'checked'" [width]="50" [minWidth]="50" [maxWidth]="50" [allowFiltering]="false"
[allowSorting]="false" [allowResizing]="false">
<ng-template #headerTemplate let-header>
<span class="p-0">
<ejs-checkbox [cssClass]="'scs-cell'"
[checked]="allChecked.all"
[indeterminate]="allChecked.indeterminate"
(change)="onCheckHeaderToggle($event)"
>
</ejs-checkbox>
</span>
</ng-template>
<ng-template #template let-row>
<span class="p-0">
<ejs-checkbox [cssClass]="'scs-cell'"
[checked]="row.checked"
(change)="onCheckedRowToggle($event, row)"
>
</ejs-checkbox>
</span>
</ng-template>
</e-column>
<e-column field="OrderID" isPrimaryKey="true" headerText="Order ID" width="120" textAlign="Right">
</e-column>
<e-column field="CustomerName" headerText="Customer Name" width="150"></e-column>
<e-column field="Freight" headerText="Freight" width="120" format="C2" textAlign="Right"></e-column>
</e-columns>
</ejs-grid>
</div> |
|
App.component.html
<div class="control-section">
<ejs-grid #grid [dataSource]="data" allowPaging="true" [pageSettings]="pageSettings" [enableHover]="false"
[allowSelection]="true">
<e-columns>
<e-column [field]="'id'" [visible]="false" [isPrimaryKey]="true">
</e-column>
<e-column [field]="'checked'" [width]="70" [allowFiltering]="false" [allowSorting]="false"
[allowResizing]="false">
<ng-template #headerTemplate let-header>
<span class="p-0">
<ejs-checkbox [cssClass]="'scs-cell'"
[checked]="allChecked.all"
[indeterminate]="allChecked.indeterminate"
(change)="onCheckHeaderToggle($event)"
>
</ejs-checkbox>
</span>
</ng-template>
<ng-template #template let-row>
<span class="p-0">
<ejs-checkbox [cssClass]="'scs-cell'"
[checked]="row.checked"
(change)="onCheckedRowToggle($event, row)"
>
</ejs-checkbox>
</span>
</ng-template>
</e-column>
<e-column field="OrderID" isPrimaryKey="true" headerText="Order ID" width="120" textAlign="Right">
</e-column>
<e-column field="CustomerName" headerText="Customer Name" width="150"></e-column>
<e-column field="Freight" headerText="Freight" width="120" format="C2" textAlign="Right"></e-column>
</e-columns>
</ejs-grid>
</div> |