Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixing grid sample widths (only in IE) and heights. #800

Merged
merged 5 commits into from
Dec 7, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<p class="grid__wrapper">
<igx-grid #igxGrid1 [data]="localData" [autoGenerate]="true" [height]="null"></igx-grid>
<igx-grid #igxGrid1 [data]="localData" [autoGenerate]="true" [height]="null" width ="975px"></igx-grid>
<button (click)="exportButtonHandler()" class="exportButton">Export Grid to Excel</button>
</p>
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
<div class="grid__wrapper">
<igx-grid #grid1 [data]="data" height="500px" width="100%" [autoGenerate]="false">
<igx-column header="Rank" field="Id" sortable="true" [editable]="true" [sortable]="true" [cellClasses]="rankClasses"></igx-column>
<igx-column field="Name" header="Athlete" [sortable]="true"></igx-column>
<igx-column header="Rank" field="Id" sortable="true" [editable]="true" [sortable]="true" [cellClasses]="rankClasses" width="16%"></igx-column>
<igx-column field="Name" header="Athlete" [sortable]="true" width="18%"></igx-column>
<igx-column field="BeatsPerMinute" header="Beats per minute" dataType="number" [editable]="true" [sortable]="true"
[cellClasses]="beatsPerMinuteClasses"></igx-column>
[cellClasses]="beatsPerMinuteClasses" width="16%"></igx-column>
<igx-column field="TopSpeed" header="Top Speed" dataType="number" [editable]="true" [sortable]="true"
[cellClasses]="speedClasses">
[cellClasses]="speedClasses" width="16%">
<ng-template igxCell let-val>
<div class="cell__inner">
{{ val | number: '1.1-5' }}
</div>
</ng-template>
</igx-column>
<igx-column field="TrackProgress" header="Track Progress" [editable]="true" [sortable]="true">
<igx-column field="TrackProgress" header="Track Progress" [editable]="true" [sortable]="true" width="18%">
<ng-template igxCell let-val>
<div class="cellContainer">
<span class="cellAlignSyle">
Expand All @@ -21,7 +21,7 @@
</div>
</ng-template>
</igx-column>
<igx-column field="CountryFlag" header="Country">
<igx-column field="CountryFlag" header="Country" width="16%">
<ng-template igxCell let-cell="cell">
<div class="cell__inner_2">
<span>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
<div class="grid__wrapper">
<igx-grid #grid1 [data]="data" [autoGenerate]="false" height="600px" width="100%" [allowFiltering]="true">
<igx-column field="ProductName" header="Product Name" [dataType]="'string'" [filters]="caseSensitiveFilteringOperand">
<igx-grid #grid1 [data]="data" [autoGenerate]="false" height="550px" width="100%" [allowFiltering]="true">
<igx-column field="ProductName" header="Product Name" [dataType]="'string'" [filters]="caseSensitiveFilteringOperand" width="20%">
</igx-column>
<igx-column field="QuantityPerUnit" header="Quantity Per Unit" [dataType]="'string'">
<igx-column field="QuantityPerUnit" header="Quantity Per Unit" [dataType]="'string'" width="20%">
</igx-column>
<igx-column field="UnitPrice" header="Unit Price" [dataType]="'number'">
<igx-column field="UnitPrice" header="Unit Price" [dataType]="'number'" width="20%">
<ng-template igxCell let-cell="cell" let-val let-row>
{{+val | currency}}
</ng-template>
</igx-column>
<igx-column field="OrderDate" header="Order Date" [dataType]="'date'" [formatter]="formatDate">
<igx-column field="OrderDate" header="Order Date" [dataType]="'date'" [formatter]="formatDate" width="20%">
</igx-column>
<igx-column field="Discontinued" header="Discontinued" [dataType]="'boolean'" [filters]="booleanFilteringOperand">
<igx-column field="Discontinued" header="Discontinued" [dataType]="'boolean'" [filters]="booleanFilteringOperand" width="20%">
<ng-template igxCell let-cell="cell" let-val>
<img *ngIf="val" src="assets/images/grid/active.png" title="Continued" alt="Continued" />
<img *ngIf="!val" src="assets/images/grid/expired.png" title="Discontinued" alt="Discontinued" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,19 @@
</igx-input-group><br>
</div>

<igx-grid #grid1 [data]="data" [autoGenerate]="false" height="520px" width="100%" [allowFiltering]="true">
<igx-column field="ProductName" header="Product Name" [dataType]="'string'">
<igx-grid #grid1 [data]="data" [autoGenerate]="false" height="480px" width="100%" [allowFiltering]="true">
<igx-column field="ProductName" header="Product Name" [dataType]="'string'" width="20%">
</igx-column>
<igx-column field="QuantityPerUnit" header="Quantity Per Unit" [dataType]="'string'">
<igx-column field="QuantityPerUnit" header="Quantity Per Unit" [dataType]="'string'" width="20%">
</igx-column>
<igx-column field="UnitPrice" header="Unit Price" [dataType]="'number'">
<igx-column field="UnitPrice" header="Unit Price" [dataType]="'number'" width="20%">
<ng-template igxCell let-cell="cell" let-val let-row>
{{+val | currency}}
</ng-template>
</igx-column>
<igx-column field="OrderDate" header="Order Date" [dataType]="'date'" [formatter]="formatDate">
<igx-column field="OrderDate" header="Order Date" [dataType]="'date'" [formatter]="formatDate" width="20%">
</igx-column>
<igx-column field="Discontinued" header="Discontinued" [dataType]="'boolean'">
<igx-column field="Discontinued" header="Discontinued" [dataType]="'boolean'" width="20%">
<ng-template igxCell let-cell="cell" let-val>
<img *ngIf="val" src="assets/images/grid/active.png" title="Continued" alt="Continued" />
<img *ngIf="!val" src="assets/images/grid/expired.png" title="Discontinued" alt="Discontinued" />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<div class="grid__wrapper">
<igx-grid #grid1 [data]="data" [width]="'100%'" [height]="'600px'" [rowSelectable]='true' [groupingExpressions]='expr'>
<igx-grid #grid1 [data]="data" [width]="'100%'" [height]="'570px'" [rowSelectable]='true' [groupingExpressions]='expr'>
<igx-column field="OrderID" header="Order ID" hidden=true >
</igx-column>
<igx-column field="ShipCountry" header="Ship Country" width="200px" [groupable]="true">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,37 +1,37 @@
<div class="grid__wrapper">

<igx-grid #grid1 [data]="data" [paging]="true" [perPage]="10" [paginationTemplate]="pager" height="500px" width="100%" displayDensity="cosy">
<igx-column header="Rank" headerClasses="myClass" field="Id" sortable="true">
<igx-column header="Rank" headerClasses="myClass" field="Id" sortable="true" width = "16%">
</igx-column>

<igx-column field="Name" header="Athlete">
<igx-column field="Name" header="Athlete" width = "16%">
</igx-column>

<igx-column field="BeatsPerMinute" header="Beats per minute" dataType="number">
<igx-column field="BeatsPerMinute" header="Beats per minute" dataType="number" width = "16%">
<ng-template igxCell let-val>
<div class="cell__inner">
{{ val }}
</div>
</ng-template>
</igx-column>

<igx-column field="TopSpeed" header="Top Speed" dataType="number">
<igx-column field="TopSpeed" header="Top Speed" dataType="number" width = "16%">
<ng-template igxCell let-val>
<div class="cell__inner">
{{ val | number: '1.1-5' }}
</div>
</ng-template>
</igx-column>

<igx-column field="TrackProgress" header="Track Progress">
<igx-column field="TrackProgress" header="Track Progress" width = "18%">
<ng-template igxCell let-val>
<div class="linear-bar-container">
<igx-linear-bar [textVisibility]="false" class="cell__inner_2" [value]="val"></igx-linear-bar>
</div>
</ng-template>
</igx-column>

<igx-column field="CountryFlag" header="Country">
<igx-column field="CountryFlag" header="Country" width = "18%">
<ng-template igxCell let-cell="cell">
<div class="cell__inner_2">
<span>
Expand Down
10 changes: 5 additions & 5 deletions src/app/grid/grid-paste/grid-paste-sample.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@
</igx-drop-down>
<button id="download_excel" igxButton="raised" (click)="downloadExcel($event)">Download Sample Excel File</button>
</div>
<igx-grid #grid1 [data]="data" [width]="'100%'" [height]="'505px'" [autoGenerate]="false" paste-handler (onDataProcessed)="dataPasted($event)" [primaryKey]="'ID'">
<igx-column [field]="'Name'"></igx-column>
<igx-column [field]="'Title'"></igx-column>
<igx-column [field]="'Phone'"></igx-column>
<igx-column [field]="'Country'"></igx-column>
<igx-grid #grid1 [data]="data" [width]="'100%'" [height]="'480px'" [autoGenerate]="false" paste-handler (onDataProcessed)="dataPasted($event)" [primaryKey]="'ID'">
<igx-column [field]="'Name'" width="25%"></igx-column>
<igx-column [field]="'Title'" width="25%"></igx-column>
<igx-column [field]="'Phone'" width="25%"></igx-column>
<igx-column [field]="'Country'" width="25%"></igx-column>
</igx-grid>
</div>
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<div class="grid__wrapper">
<igx-grid #grid [data]="remoteData | async" [height]="'500px'" [width]="'100%'" [autoGenerate]='false'
<igx-grid #grid [data]="remoteData | async" [height]="'440px'" [width]="'100%'" [autoGenerate]='false'
(onDataPreLoad)="processData()" (onSortingDone)="processData()" (onFilteringDone)="processData()"
[allowFiltering]="true">
<igx-column [field]="'ProductID'" [sortable]="true" [filterable]="false"></igx-column>
<igx-column [field]="'ProductName'" [sortable]="true"></igx-column>
<igx-column [field]="'UnitPrice'" [dataType]="'number'" [formatter]="formatCurrency" [sortable]="true"></igx-column>
<igx-column [field]="'UnitsInStock'" [dataType]="'number'" [headerClasses]="'headerAlignSyle'" [sortable]="true">
<igx-column [field]="'ProductID'" [sortable]="true" [filterable]="false" width="18%"></igx-column>
<igx-column [field]="'ProductName'" [sortable]="true" width="16%"></igx-column>
<igx-column [field]="'UnitPrice'" [dataType]="'number'" [formatter]="formatCurrency" [sortable]="true" width="16%"></igx-column>
<igx-column [field]="'UnitsInStock'" [dataType]="'number'" [headerClasses]="'headerAlignSyle'" [sortable]="true" width="16%">
<ng-template igxHeader>
<span class="cellAlignSyle">UnitsInStock</span>
</ng-template>
Expand All @@ -17,8 +17,8 @@
</div>
</ng-template>
</igx-column>
<igx-column [field]="'QuantityPerUnit'" [sortable]="true"></igx-column>
<igx-column [field]="'ReorderLevel'" [dataType]="'number'" [headerClasses]="'headerAlignSyle'" [sortable]="true">
<igx-column [field]="'QuantityPerUnit'" [sortable]="true" width="18%"></igx-column >
<igx-column [field]="'ReorderLevel'" [dataType]="'number'" [headerClasses]="'headerAlignSyle'" [sortable]="true" width="16%">
<ng-template igxHeader>
<span class="cellAlignSyle">ReorderLevel</span>
</ng-template>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
<div class="grid__wrapper">
<igx-grid [data]="data" (onColumnResized)="onResize($event)" [autoGenerate]="false" height="550px" width="100%">
<igx-column [field]="'ID'" [header]="'ID'" width="100px" [resizable]="true"></igx-column>
<igx-column [field]="'CompanyName'" [header]="'Company Name'" width="100px" [resizable]="true"></igx-column>
<igx-column [field]="'ContactName'" [header]="'Contact Name'" width="100px" [resizable]="true" [minWidth]="'60px'" [maxWidth]="'230px'"></igx-column>
<igx-column [field]="'ContactTitle'" [header]="'Contact Title'" width="100px" [resizable]="true"></igx-column>
<igx-column [field]="'Address'" [header]="'Address'" width="100px" [resizable]="true"></igx-column>
<igx-column [field]="'City'" [header]="'City'" width="100px" [resizable]="true"></igx-column>
<igx-column [field]="'Region'" [header]="'Region'" width="100px" [resizable]="true"></igx-column>
<igx-column [field]="'PostalCode'" [header]="'Postal Code'" width="100px" [resizable]="true"></igx-column>
<igx-column [field]="'Phone'" [header]="'Phone'" width="100px" [resizable]="true"></igx-column>
<igx-column [field]="'Fax'" [header]="'Fax'" width="100px" [resizable]="true"></igx-column>
<igx-grid [data]="data" (onColumnResized)="onResize($event)" [autoGenerate]="false" height="500px" width="100%">
<igx-column [field]="'ID'" [header]="'ID'" width="10%" [resizable]="true"></igx-column>
<igx-column [field]="'CompanyName'" [header]="'Company Name'" width="10%" [resizable]="true"></igx-column>
<igx-column [field]="'ContactName'" [header]="'Contact Name'" width="10%" [resizable]="true" [minWidth]="'60px'" [maxWidth]="'230px'"></igx-column>
<igx-column [field]="'ContactTitle'" [header]="'Contact Title'" width="10%" [resizable]="true"></igx-column>
<igx-column [field]="'Address'" [header]="'Address'" width="10%" [resizable]="true"></igx-column>
<igx-column [field]="'City'" [header]="'City'" width="10%" [resizable]="true"></igx-column>
<igx-column [field]="'Region'" [header]="'Region'" width="10%" [resizable]="true"></igx-column>
<igx-column [field]="'PostalCode'" [header]="'Postal Code'" width="10%" [resizable]="true"></igx-column>
<igx-column [field]="'Phone'" [header]="'Phone'" width="10%" [resizable]="true"></igx-column>
<igx-column [field]="'Fax'" [header]="'Fax'" width="10%" [resizable]="true"></igx-column>
</igx-grid>
</div>
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
<div class="sample-wrapper">
<igx-grid #gridRowEdit [data]="data" [primaryKey]="'ProductID'" width="100%" height="500px"
[rowEditable]="true">
<igx-column field="ProductID" header="Product ID"></igx-column>
<igx-column field="ReorderLevel" header="ReorderLever" [dataType]="'number'"></igx-column>
<igx-column field="ProductName" header="ProductName" [dataType]="'string'"></igx-column>
<igx-column field="UnitsInStock" header="UnitsInStock" [dataType]="'number'">
<igx-column field="ProductID" header="Product ID" width = "16%"></igx-column>
<igx-column field="ReorderLevel" header="ReorderLever" [dataType]="'number'" width = "16%"></igx-column>
<igx-column field="ProductName" header="ProductName" [dataType]="'string'" width = "18%"></igx-column>
<igx-column field="UnitsInStock" header="UnitsInStock" [dataType]="'number'" width = "16%">
<ng-template igxCellEditor let-cell="cell">
<input [igxFocus]='true' name="units" [(ngModel)]="cell.value" style="color: black" />
</ng-template>
</igx-column>
<igx-column field="OrderDate" [dataType]="'date'"></igx-column>
<igx-column field="Discontinued" header="Discontinued" [dataType]="'boolean'"></igx-column>
<igx-column field="OrderDate" [dataType]="'date'" width = "18%"></igx-column>
<igx-column field="Discontinued" header="Discontinued" [dataType]="'boolean'" width = "16%"></igx-column>
</igx-grid>
</div>
18 changes: 9 additions & 9 deletions src/app/grid/grid-sample-selection/grid-selection.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
<igx-switch [(ngModel)]="selection"></igx-switch>
</div>
<div class="grid__wrapper">
<igx-grid #grid1 [data]="data | async" [height]="'550px'" width="100%" [autoGenerate]='false' [rowSelectable]="selection"
<igx-grid #grid1 [data]="data | async" [height]="'530px'" width="100%" [autoGenerate]='false' [rowSelectable]="selection"
[allowFiltering]="true" (onSelection)="handleRowSelection($event)">
<igx-column [field]="'Category'" [width]="'150px'"></igx-column>
<igx-column [field]="'Type'" [width]="'120px'" [filterable]='false'></igx-column>
<igx-column [field]="'Price'" [width]="'150px'" [dataType]="'number'" [formatter]="formatCurrency"></igx-column>
<igx-column [field]="'Buy'" [width]="'150px'" [dataType]="'number'" [formatter]="formatCurrency"></igx-column>
<igx-column [field]="'Sell'" [width]="'150px'" [dataType]="'number'" [formatter]="formatCurrency"></igx-column>
<igx-column [field]="'Change'" [width]="'150px'" [dataType]="'number'" [headerClasses]="'headerAlignSyle'">
<igx-column [field]="'Category'" [width]="'12%'"></igx-column>
<igx-column [field]="'Type'" [width]="'10%'" [filterable]='false'></igx-column>
<igx-column [field]="'Price'" [width]="'12%'" [dataType]="'number'" [formatter]="formatCurrency"></igx-column>
<igx-column [field]="'Buy'" [width]="'12%'" [dataType]="'number'" [formatter]="formatCurrency"></igx-column>
<igx-column [field]="'Sell'" [width]="'12%'" [dataType]="'number'" [formatter]="formatCurrency"></igx-column>
<igx-column [field]="'Change'" [width]="'12%'" [dataType]="'number'" [headerClasses]="'headerAlignSyle'">
<ng-template igxHeader>
<span>Change</span>
</ng-template>
Expand All @@ -22,7 +22,7 @@
</div>
</ng-template>
</igx-column>
<igx-column [field]="'Change(%)'" [width]="'150px'" [dataType]="'number'" [formatter]="formatNumber">
<igx-column [field]="'Change(%)'" [width]="'14%'" [dataType]="'number'" [formatter]="formatNumber">
<ng-template igxHeader>
<span>Change(%)</span>
</ng-template>
Expand All @@ -31,7 +31,7 @@
<span class="cellAlignSyle" [class.up]="val>0" [class.down]="val<0">{{ formatNumber(val) }}%</span>
</ng-template>
</igx-column>
<igx-column [field]="'Change On Year(%)'" [width]="'170px'" [dataType]="'number'" [formatter]="formatNumber">
<igx-column [field]="'Change On Year(%)'" [width]="'16%'" [dataType]="'number'" [formatter]="formatNumber">
<ng-template igxCell let-val>
<div class="currency-badge-container">
<igx-badge *ngIf="val>0" type="success" position="bottom-right" icon="arrow_upward" class="badge-left"></igx-badge>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,12 @@
</igx-suffix>
</igx-input-group>

<igx-grid #grid1 id="grid1" [data]="data" [autoGenerate]="false" height="500px" width="100%" [allowFiltering]="true">
<igx-column [field]="'IndustrySector'" dataType="string" [sortable]="true"></igx-column>
<igx-column [field]="'IndustryGroup'" dataType="string" [sortable]="true"></igx-column>
<igx-column [field]="'SectorType'" dataType="string" [sortable]="true"></igx-column>
<igx-column [field]="'KRD'" dataType="number" [sortable]="true"></igx-column>
<igx-column [field]="'MarketNotion'" dataType="number" [sortable]="true"></igx-column>
<igx-column [field]="'Date'" dataType="date" [sortable]="true"></igx-column>
<igx-grid #grid1 id="grid1" [data]="data" [autoGenerate]="false" height="480px" width="100%" [allowFiltering]="true">
<igx-column [field]="'IndustrySector'" dataType="string" [sortable]="true" width="18%"></igx-column>
<igx-column [field]="'IndustryGroup'" dataType="string" [sortable]="true" width="18%"></igx-column>
<igx-column [field]="'SectorType'" dataType="string" [sortable]="true" width="16%"></igx-column>
<igx-column [field]="'KRD'" dataType="number" [sortable]="true" width="16%"></igx-column>
<igx-column [field]="'MarketNotion'" dataType="number" [sortable]="true" width="16%"></igx-column>
<igx-column [field]="'Date'" dataType="date" [sortable]="true" width="16%"></igx-column>
</igx-grid>
</div>
Loading