I created an application with
Then I integrated part of KylemWhite's demo into the new application. I only took the grid and put it into my application.
PROBLEM: the filter component of the grid is not properly rendered. The bottom parts of the filter elements are hidden under the header. Please see picture attachment.
QUESTION: how do I properly write SmartClient/KylemWhite typescript applications within the Angular CLI framework?
Here's the setup:
Here's my index.html:
Here's the code for app.module.ts:
And the app.component.ts:
Code:
ng new app
PROBLEM: the filter component of the grid is not properly rendered. The bottom parts of the filter elements are hidden under the header. Please see picture attachment.
QUESTION: how do I properly write SmartClient/KylemWhite typescript applications within the Angular CLI framework?
Here's the setup:
Code:
mikes-laptop:app mike$ ng --version Angular CLI: 1.6.2 Node: 9.2.1 OS: darwin x64 Angular: 5.1.2 ... animations, common, compiler, compiler-cli, core, forms ... http, language-service, platform-browser ... platform-browser-dynamic, router @angular/cli: 1.6.2 @angular-devkit/build-optimizer: 0.0.36 @angular-devkit/core: 0.0.22 @angular-devkit/schematics: 0.0.42 @ngtools/json-schema: 1.1.0 @ngtools/webpack: 1.9.2 @schematics/angular: 0.1.11 @schematics/schematics: 0.0.11 typescript: 2.4.2 webpack: 3.10.0
Code:
<!doctype html> <html lang="en"> <head> <meta charset="utf-8"> <title>Infra</title> <base href="/"> <SCRIPT>var isomorphicDir = "assets/isomorphic/"; </SCRIPT> <SCRIPT SRC=assets/isomorphic/system/modules/ISC_Core.js></SCRIPT> <SCRIPT SRC=assets/isomorphic/system/modules/ISC_Foundation.js></SCRIPT> <SCRIPT SRC=assets/isomorphic/system/modules/ISC_Containers.js></SCRIPT> <SCRIPT SRC=assets/isomorphic/system/modules/ISC_Grids.js></SCRIPT> <SCRIPT SRC=assets/isomorphic/system/modules/ISC_Forms.js></SCRIPT> <SCRIPT SRC=assets/isomorphic/system/modules/ISC_DataBinding.js></SCRIPT> <SCRIPT SRC=assets/isomorphic/skins/Enterprise/load_skin.js></SCRIPT> </head> <body> <app-root></app-root> </body> </html>
Code:
import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { AppComponent } from './app.component';
@NgModule({
declarations: [
AppComponent
],
imports: [
BrowserModule,
],
providers: [],
bootstrap: [AppComponent]
})
export class AppModule { }
Code:
import { Component, OnInit } from '@angular/core';
/// <reference path="../scripts/typings/isc/isc.index.d.ts" />
@Component({
selector: 'app-root',
template: `<div id="iso" style="width: 100%; height: 50%;"></div>`
})
export class AppComponent implements OnInit {
title = 'app';
ngOnInit() {
let countryDS = (isc.DataSource as any).create({
ID: "countryDS"
, dataFormat: "xml"
, recordXPath: "//country"
, fields: [
{ name: "countryCode", title: "Code", primaryKey: true, canEdit: "false" }
, { name: "countryName", title: "Country" }
, { name: "capital", title: "Capital" }
, { name: "population" }
, { name: "independence" }
]
, operationBindings: [
{
operationType: "fetch",
dataURL: "[ISOMORPHIC]/system/reference/inlineExamples/dataIntegration/xml/responses/country_fetch.xml"
},
{
operationType: "add",
dataURL: "[ISOMORPHIC]/system/reference/inlineExamples/dataIntegration/xml/responses/country_add.xml"
},
{
operationType: "update",
dataURL: "[ISOMORPHIC]/system/reference/inlineExamples/dataIntegration/xml/responses/country_update.xml"
},
{
operationType: "remove",
dataURL: "[ISOMORPHIC]/system/reference/inlineExamples/dataIntegration/xml/responses/country_remove.xml"
}
]
});
let viewState = "({ field: [{ name: 'countryCode' }, { name: 'countryName' }, { name: 'capital' }, { name: 'population' }, { name: 'independence', align:'right', title:'ind' }] })";
let grid = isc.ListGrid.create({
ID: "countryList"
, autoDraw: false
, width: "100%"
, height: "100%"
, viewState: viewState
, alternateRecordStyles: true
, dataSource: countryDS
, autoFetchData: true
, showFilterEditor: true
}) as Isc.ListGrid;
let iso = document.getElementById('iso');
let layout = isc.VLayout.create({
htmlElement: iso as HTMLElement
, height: "100%"
, width: "100%"
, members: [grid]
, padding: 0
, margin: 0
});
}
}
Comment