@@ -20,6 +20,7 @@ import { IgxGridExcelStyleFilteringComponent } from '../grids/filtering/excel-st
2020import { FilteringLogic } from '../data-operations/filtering-expression.interface' ;
2121import { SortingDirection } from '../data-operations/sorting-expression.interface' ;
2222import { ISortingStrategy } from '../data-operations/sorting-strategy' ;
23+ import { IgxActionStripComponent } from '../action-strip/action-strip.component' ;
2324
2425@Component ( {
2526 template : `<div style="width: 800px; height: 600px;">
@@ -2163,3 +2164,70 @@ export class MRLTestComponent {
21632164 ] ;
21642165 data = SampleTestData . contactInfoDataFull ( ) ;
21652166}
2167+
2168+ @Component ( {
2169+ template : `
2170+ <igx-grid #grid [data]="data" [width]="'800px'" [height]="'500px'"
2171+ [rowEditable]="true" [primaryKey]="'ID'">
2172+ <igx-column *ngFor="let c of columns" [sortable]="true" [field]="c.field" [header]="c.field"
2173+ [width]="c.width">
2174+ </igx-column>
2175+
2176+ <igx-action-strip #actionStrip>
2177+ <igx-grid-editing-actions [addRow]='true'></igx-grid-editing-actions>
2178+ </igx-action-strip>
2179+ </igx-grid>
2180+ `
2181+ } )
2182+ export class IgxAddRowComponent implements OnInit {
2183+ @ViewChild ( 'actionStrip' , { read : IgxActionStripComponent , static : true } )
2184+ public actionStrip : IgxActionStripComponent ;
2185+
2186+ @ViewChild ( 'grid' , { read : IgxGridComponent , static : true } )
2187+ public grid : IgxGridComponent ;
2188+
2189+ data : any [ ] ;
2190+ columns : any [ ] ;
2191+
2192+ ngOnInit ( ) {
2193+
2194+ this . columns = [
2195+ { field : 'ID' , width : '200px' , hidden : false } ,
2196+ { field : 'CompanyName' , width : '200px' } ,
2197+ { field : 'ContactName' , width : '200px' , pinned : false } ,
2198+ { field : 'ContactTitle' , width : '300px' , pinned : false } ,
2199+ ] ;
2200+
2201+ this . data = [
2202+ // tslint:disable:max-line-length
2203+ { 'ID' : 'ALFKI' , 'CompanyName' : 'Alfreds Futterkiste' , 'ContactName' : 'Maria Anders' , 'ContactTitle' : 'Sales Representative' } ,
2204+ { 'ID' : 'ANATR' , 'CompanyName' : 'Ana Trujillo Emparedados y helados' , 'ContactName' : 'Ana Trujillo' , 'ContactTitle' : 'Owner' } ,
2205+ { 'ID' : 'ANTON' , 'CompanyName' : 'Antonio Moreno Taquería' , 'ContactName' : 'Antonio Moreno' , 'ContactTitle' : 'Owner' } ,
2206+ { 'ID' : 'AROUT' , 'CompanyName' : 'Around the Horn' , 'ContactName' : 'Thomas Hardy' , 'ContactTitle' : 'Sales Representative' } ,
2207+ { 'ID' : 'BERGS' , 'CompanyName' : 'Berglunds snabbköp' , 'ContactName' : 'Christina Berglund' , 'ContactTitle' : 'Order Administrator' } ,
2208+ { 'ID' : 'BLAUS' , 'CompanyName' : 'Blauer See Delikatessen' , 'ContactName' : 'Hanna Moos' , 'ContactTitle' : 'Sales Representative' } ,
2209+ { 'ID' : 'BLONP' , 'CompanyName' : 'Blondesddsl père et fils' , 'ContactName' : 'Frédérique Citeaux' , 'ContactTitle' : 'Marketing Manager' } ,
2210+ { 'ID' : 'BOLID' , 'CompanyName' : 'Bólido Comidas preparadas' , 'ContactName' : 'Martín Sommer' , 'ContactTitle' : 'Owner' } ,
2211+ { 'ID' : 'BONAP' , 'CompanyName' : 'Bon app\'' , 'ContactName' : 'Laurence Lebihan' , 'ContactTitle' : 'Owner' } ,
2212+ { 'ID' : 'BOTTM' , 'CompanyName' : 'Bottom-Dollar Markets' , 'ContactName' : 'Elizabeth Lincoln' , 'ContactTitle' : 'Accounting Manager' } ,
2213+ { 'ID' : 'BSBEV' , 'CompanyName' : 'B\'s Beverages' , 'ContactName' : 'Victoria Ashworth' , 'ContactTitle' : 'Sales Representative' , 'Address' : 'Fauntleroy Circus' , 'City' : 'London' , 'Region' : null , 'PostalCode' : 'EC2 5NT' , 'Country' : 'UK' , 'Phone' : '(171) 555-1212' , 'Fax' : null } ,
2214+ { 'ID' : 'CACTU' , 'CompanyName' : 'Cactus Comidas para llevar' , 'ContactName' : 'Patricio Simpson' , 'ContactTitle' : 'Sales Agent' , 'Address' : 'Cerrito 333' , 'City' : 'Buenos Aires' , 'Region' : null , 'PostalCode' : '1010' , 'Country' : 'Argentina' , 'Phone' : '(1) 135-5555' , 'Fax' : '(1) 135-4892' } ,
2215+ { 'ID' : 'CENTC' , 'CompanyName' : 'Centro comercial Moctezuma' , 'ContactName' : 'Francisco Chang' , 'ContactTitle' : 'Marketing Manager' , 'Address' : 'Sierras de Granada 9993' , 'City' : 'México D.F.' , 'Region' : null , 'PostalCode' : '05022' , 'Country' : 'Mexico' , 'Phone' : '(5) 555-3392' , 'Fax' : '(5) 555-7293' } ,
2216+ { 'ID' : 'CHOPS' , 'CompanyName' : 'Chop-suey Chinese' , 'ContactName' : 'Yang Wang' , 'ContactTitle' : 'Owner' , 'Address' : 'Hauptstr. 29' , 'City' : 'Bern' , 'Region' : null , 'PostalCode' : '3012' , 'Country' : 'Switzerland' , 'Phone' : '0452-076545' , 'Fax' : null } ,
2217+ { 'ID' : 'COMMI' , 'CompanyName' : 'Comércio Mineiro' , 'ContactName' : 'Pedro Afonso' , 'ContactTitle' : 'Sales Associate' , 'Address' : 'Av. dos Lusíadas, 23' , 'City' : 'Sao Paulo' , 'Region' : 'SP' , 'PostalCode' : '05432-043' , 'Country' : 'Brazil' , 'Phone' : '(11) 555-7647' , 'Fax' : null } ,
2218+ { 'ID' : 'CONSH' , 'CompanyName' : 'Consolidated Holdings' , 'ContactName' : 'Elizabeth Brown' , 'ContactTitle' : 'Sales Representative' , 'Address' : 'Berkeley Gardens 12 Brewery' , 'City' : 'London' , 'Region' : null , 'PostalCode' : 'WX1 6LT' , 'Country' : 'UK' , 'Phone' : '(171) 555-2282' , 'Fax' : '(171) 555-9199' } ,
2219+ { 'ID' : 'DRACD' , 'CompanyName' : 'Drachenblut Delikatessen' , 'ContactName' : 'Sven Ottlieb' , 'ContactTitle' : 'Order Administrator' , 'Address' : 'Walserweg 21' , 'City' : 'Aachen' , 'Region' : null , 'PostalCode' : '52066' , 'Country' : 'Germany' , 'Phone' : '0241-039123' , 'Fax' : '0241-059428' } ,
2220+ { 'ID' : 'DUMON' , 'CompanyName' : 'Du monde entier' , 'ContactName' : 'Janine Labrune' , 'ContactTitle' : 'Owner' , 'Address' : '67, rue des Cinquante Otages' , 'City' : 'Nantes' , 'Region' : null , 'PostalCode' : '44000' , 'Country' : 'France' , 'Phone' : '40.67.88.88' , 'Fax' : '40.67.89.89' } ,
2221+ { 'ID' : 'EASTC' , 'CompanyName' : 'Eastern Connection' , 'ContactName' : 'Ann Devon' , 'ContactTitle' : 'Sales Agent' , 'Address' : '35 King George' , 'City' : 'London' , 'Region' : null , 'PostalCode' : 'WX3 6FW' , 'Country' : 'UK' , 'Phone' : '(171) 555-0297' , 'Fax' : '(171) 555-3373' } ,
2222+ { 'ID' : 'ERNSH' , 'CompanyName' : 'Ernst Handel' , 'ContactName' : 'Roland Mendel' , 'ContactTitle' : 'Sales Manager' , 'Address' : 'Kirchgasse 6' , 'City' : 'Graz' , 'Region' : null , 'PostalCode' : '8010' , 'Country' : 'Austria' , 'Phone' : '7675-3425' , 'Fax' : '7675-3426' } ,
2223+ { 'ID' : 'FAMIA' , 'CompanyName' : 'Familia Arquibaldo' , 'ContactName' : 'Aria Cruz' , 'ContactTitle' : 'Marketing Assistant' , 'Address' : 'Rua Orós, 92' , 'City' : 'Sao Paulo' , 'Region' : 'SP' , 'PostalCode' : '05442-030' , 'Country' : 'Brazil' , 'Phone' : '(11) 555-9857' , 'Fax' : null } ,
2224+ { 'ID' : 'FISSA' , 'CompanyName' : 'FISSA Fabrica Inter. Salchichas S.A.' , 'ContactName' : 'Diego Roel' , 'ContactTitle' : 'Accounting Manager' , 'Address' : 'C/ Moralzarzal, 86' , 'City' : 'Madrid' , 'Region' : null , 'PostalCode' : '28034' , 'Country' : 'Spain' , 'Phone' : '(91) 555 94 44' , 'Fax' : '(91) 555 55 93' } ,
2225+ { 'ID' : 'FOLIG' , 'CompanyName' : 'Folies gourmandes' , 'ContactName' : 'Martine Rancé' , 'ContactTitle' : 'Assistant Sales Agent' , 'Address' : '184, chaussée de Tournai' , 'City' : 'Lille' , 'Region' : null , 'PostalCode' : '59000' , 'Country' : 'France' , 'Phone' : '20.16.10.16' , 'Fax' : '20.16.10.17' } ,
2226+ { 'ID' : 'FOLKO' , 'CompanyName' : 'Folk och fä HB' , 'ContactName' : 'Maria Larsson' , 'ContactTitle' : 'Owner' , 'Address' : 'Åkergatan 24' , 'City' : 'Bräcke' , 'Region' : null , 'PostalCode' : 'S-844 67' , 'Country' : 'Sweden' , 'Phone' : '0695-34 67 21' , 'Fax' : null } ,
2227+ { 'ID' : 'FRANK' , 'CompanyName' : 'Frankenversand' , 'ContactName' : 'Peter Franken' , 'ContactTitle' : 'Marketing Manager' , 'Address' : 'Berliner Platz 43' , 'City' : 'München' , 'Region' : null , 'PostalCode' : '80805' , 'Country' : 'Germany' , 'Phone' : '089-0877310' , 'Fax' : '089-0877451' } ,
2228+ { 'ID' : 'FRANR' , 'CompanyName' : 'France restauration' , 'ContactName' : 'Carine Schmitt' , 'ContactTitle' : 'Marketing Manager' , 'Address' : '54, rue Royale' , 'City' : 'Nantes' , 'Region' : null , 'PostalCode' : '44000' , 'Country' : 'France' , 'Phone' : '40.32.21.21' , 'Fax' : '40.32.21.20' } ,
2229+ { 'ID' : 'FRANS' , 'CompanyName' : 'Franchi S.p.A.' , 'ContactName' : 'Paolo Accorti' , 'ContactTitle' : 'Sales Representative' , 'Address' : 'Via Monte Bianco 34' , 'City' : 'Torino' , 'Region' : null , 'PostalCode' : '10100' , 'Country' : 'Italy' , 'Phone' : '011-4988260' , 'Fax' : '011-4988261' }
2230+ ] ;
2231+ // tslint:enable:max-line-length
2232+ }
2233+ }
0 commit comments