jqwidgets-framework
Version:
jQWidgets is an advanced Angular, Vue, Blazor, React, Web Components, jquery, ASP .NET MVC, Custom Elements and HTML5 UI framework.
1,479 lines (1,121 loc) • 40.2 kB
text/typescript
/*
jQWidgets v22.0.0 (2025-Jan)
Copyright (c) 2011-2025 jQWidgets.
License: https://jqwidgets.com/license/
*/
/* eslint-disable */
/// <reference path="jqwidgets.d.ts" />
import '../jqwidgets/jqxcore.js';
import '../jqwidgets/modules/jqxtreegrid.js';
import { Component, Input, Output, AfterViewInit, AfterViewChecked, EventEmitter, ElementRef, OnChanges, SimpleChanges } from '@angular/core';
declare let JQXLite: any;
export class jqxTreeGridComponent implements OnChanges, AfterViewInit, AfterViewChecked
{
attrAltRows: boolean;
attrAutoRowHeight: boolean;
attrAggregatesHeight: number;
attrAutoShowLoadElement: boolean;
attrCheckboxes: boolean;
attrColumnsHeight: number;
attrColumns: Array<any>;
attrColumnGroups: Array<any>;
attrColumnsResize: boolean;
attrColumnsReorder: boolean;
attrDisabled: boolean;
attrEditable: boolean;
attrEditSettings: jqwidgets.TreeGridEditSettings;
attrExportSettings: jqwidgets.TreeGridExportSettings;
attrEnableHover: boolean;
attrEnableBrowserSelection: boolean;
attrFilterable: boolean;
attrFilterHeight: number;
attrFilterMode: string;
attrHierarchicalCheckboxes: boolean;
attrIcons: any;
attrIncrementalSearch: boolean;
attrLocalization: any;
attrPagerHeight: number;
attrPageSize: number;
attrPageSizeOptions: Array<number | string>;
attrPageable: boolean;
attrPagerPosition: string;
attrPagerMode: string;
attrPageSizeMode: string;
attrPagerButtonsCount: number;
attrPagerRenderer: () => any;
attrReady: () => void;
attrRowDetails: boolean;
attrRowDetailsRenderer: (key: jqwidgets.TreeGridRowDetailsRenderer['key'], dataRow: jqwidgets.TreeGridRowDetailsRenderer['dataRow']) => any;
attrRenderToolbar: (toolBar?: jqwidgets.TreeGridRenderToolbar['toolbar']) => void;
attrRenderStatusBar: (statusBar?: jqwidgets.TreeGridRenderStatusBar['statusbar']) => void;
attrRendering: () => void;
attrRendered: () => void;
attrRtl: boolean;
attrSource: any;
attrSortable: boolean;
attrShowAggregates: boolean;
attrShowSubAggregates: boolean;
attrShowToolbar: boolean;
attrShowStatusbar: boolean;
attrStatusBarHeight: number;
attrScrollBarSize: number;
attrSelectionMode: string;
attrShowHeader: boolean;
attrTheme: string;
attrToolbarHeight: number;
attrVirtualModeCreateRecords: (expandedRecord?: any, done?: any) => void;
attrVirtualModeRecordCreating: (record?: any) => any;
attrWidth: string | number;
attrHeight: string | number;
autoCreate: boolean = true;
properties: string[] = ['altRows','autoRowHeight','aggregatesHeight','autoShowLoadElement','checkboxes','columnsHeight','columns','columnGroups','columnsResize','columnsReorder','disabled','editable','editSettings','exportSettings','enableHover','enableBrowserSelection','filterable','filterHeight','filterMode','height','hierarchicalCheckboxes','icons','incrementalSearch','localization','pagerHeight','pageSize','pageSizeOptions','pageable','pagerPosition','pagerMode','pageSizeMode','pagerButtonsCount','pagerRenderer','ready','rowDetails','rowDetailsRenderer','renderToolbar','renderStatusBar','rendering','rendered','rtl','source','sortable','showAggregates','showSubAggregates','showToolbar','showStatusbar','statusBarHeight','scrollBarSize','selectionMode','showHeader','theme','toolbarHeight','width','virtualModeCreateRecords','virtualModeRecordCreating'];
host: any;
elementRef: ElementRef;
widgetObject: jqwidgets.jqxTreeGrid;
content: String;
container: HTMLDivElement;
constructor(containerElement: ElementRef) {
this.elementRef = containerElement;
}
ngOnInit() {
};
ngAfterViewInit() {
if (typeof JQXLite === 'undefined') { return; } let children = JQXLite(this.elementRef.nativeElement.children).find('tr');
let html = '';
let options = {};
if (children.length > 0) {
this.container = document.createElement('div');
html = this.elementRef.nativeElement.innerHTML;
this.container.appendChild(this.elementRef.nativeElement.firstChild);
this.elementRef.nativeElement.innerHTML = html;
this.content = html;
let result = JQXLite.jqx.parseSourceTag(this.container);
if (this['attrColumns'] !== undefined) {
; options['source'] = result.source;
}
else {
options['source'] = result.source;
options['columns'] = result.columns;
}
}
if (this.autoCreate) {
this.createComponent(options);
}
};
ngAfterViewChecked() {
if (typeof JQXLite === 'undefined') { return; }
if (this.container) {
if (this.content !== this.container.innerHTML) {
this.content = this.container.innerHTML;
let result = JQXLite.jqx.parseSourceTag(this.container);
let columns = this.host.jqxGrid('columns');
if (columns.length === 0) {
this.host.jqxGrid({ source: result.source, columns: result.columns });
}
else {
this.host.jqxGrid({ source: result.source });
}
}
}
};
ngOnChanges(changes: SimpleChanges) {
if (this.host) {
for (let i = 0; i < this.properties.length; i++) {
let attrName = 'attr' + this.properties[i].substring(0, 1).toUpperCase() + this.properties[i].substring(1);
let areEqual: boolean = false;
if (this[attrName] !== undefined) {
if (typeof this[attrName] === 'object') {
if (this[attrName] instanceof Array) {
areEqual = this.arraysEqual(this[attrName], this.host.jqxTreeGrid(this.properties[i]));
}
if (areEqual) {
return false;
}
this.host.jqxTreeGrid(this.properties[i], this[attrName]);
continue;
}
if (this[attrName] !== this.host.jqxTreeGrid(this.properties[i])) {
this.host.jqxTreeGrid(this.properties[i], this[attrName]);
}
}
}
}
}
arraysEqual(attrValue: any, hostValue: any): boolean {
if ((attrValue && !hostValue) || (!attrValue && hostValue)) {
return false;
}
if (attrValue.length != hostValue.length) {
return false;
}
for (let i = 0; i < attrValue.length; i++) {
if (attrValue[i] !== hostValue[i]) {
return false;
}
}
return true;
}
manageAttributes(): any {
let options = {};
for (let i = 0; i < this.properties.length; i++) {
let attrName = 'attr' + this.properties[i].substring(0, 1).toUpperCase() + this.properties[i].substring(1);
if (this[attrName] !== undefined) {
options[this.properties[i]] = this[attrName];
}
}
return options;
}
moveClasses(parentEl: HTMLElement, childEl: HTMLElement): void {
let classes: any = parentEl.classList;
if (classes.length > 0) {
childEl.classList.add(...classes);
}
parentEl.className = '';
}
moveStyles(parentEl: HTMLElement, childEl: HTMLElement): void {
let style = parentEl.style.cssText;
childEl.style.cssText = style
parentEl.style.cssText = '';
}
createComponent(options?: any): void {
if (this.host) {
return;
}
if (options) {
JQXLite.extend(options, this.manageAttributes());
}
else {
options = this.manageAttributes();
}
this.host = JQXLite(this.elementRef.nativeElement.firstChild);
this.moveClasses(this.elementRef.nativeElement, this.host[0]);
this.moveStyles(this.elementRef.nativeElement, this.host[0]);
this.__wireEvents__();
this.widgetObject = jqwidgets.createInstance(this.host, 'jqxTreeGrid', options);
}
createWidget(options?: any): void {
this.createComponent(options);
}
__updateRect__() : void {
if(this.host) this.host.css({ width: this.attrWidth, height: this.attrHeight });
}
setOptions(options: any) : void {
this.host.jqxTreeGrid('setOptions', options);
}
// jqxTreeGridComponent properties
altRows(arg?: boolean): boolean {
if (this.autoCreate && !this.host) {
this.createComponent();
}
if (arg !== undefined) {
this.host.jqxTreeGrid('altRows', arg);
} else {
return this.host.jqxTreeGrid('altRows');
}
}
autoRowHeight(arg?: boolean): boolean {
if (this.autoCreate && !this.host) {
this.createComponent();
}
if (arg !== undefined) {
this.host.jqxTreeGrid('autoRowHeight', arg);
} else {
return this.host.jqxTreeGrid('autoRowHeight');
}
}
aggregatesHeight(arg?: number): number {
if (this.autoCreate && !this.host) {
this.createComponent();
}
if (arg !== undefined) {
this.host.jqxTreeGrid('aggregatesHeight', arg);
} else {
return this.host.jqxTreeGrid('aggregatesHeight');
}
}
autoShowLoadElement(arg?: boolean): boolean {
if (this.autoCreate && !this.host) {
this.createComponent();
}
if (arg !== undefined) {
this.host.jqxTreeGrid('autoShowLoadElement', arg);
} else {
return this.host.jqxTreeGrid('autoShowLoadElement');
}
}
checkboxes(arg?: boolean): boolean {
if (this.autoCreate && !this.host) {
this.createComponent();
}
if (arg !== undefined) {
this.host.jqxTreeGrid('checkboxes', arg);
} else {
return this.host.jqxTreeGrid('checkboxes');
}
}
columnsHeight(arg?: number): number {
if (this.autoCreate && !this.host) {
this.createComponent();
}
if (arg !== undefined) {
this.host.jqxTreeGrid('columnsHeight', arg);
} else {
return this.host.jqxTreeGrid('columnsHeight');
}
}
columns(arg?: Array<any>): Array<any> {
if (this.autoCreate && !this.host) {
this.createComponent();
}
if (arg !== undefined) {
this.host.jqxTreeGrid('columns', arg);
} else {
return this.host.jqxTreeGrid('columns');
}
}
columnGroups(arg?: Array<any>): Array<any> {
if (this.autoCreate && !this.host) {
this.createComponent();
}
if (arg !== undefined) {
this.host.jqxTreeGrid('columnGroups', arg);
} else {
return this.host.jqxTreeGrid('columnGroups');
}
}
columnsResize(arg?: boolean): boolean {
if (this.autoCreate && !this.host) {
this.createComponent();
}
if (arg !== undefined) {
this.host.jqxTreeGrid('columnsResize', arg);
} else {
return this.host.jqxTreeGrid('columnsResize');
}
}
columnsReorder(arg?: boolean): boolean {
if (this.autoCreate && !this.host) {
this.createComponent();
}
if (arg !== undefined) {
this.host.jqxTreeGrid('columnsReorder', arg);
} else {
return this.host.jqxTreeGrid('columnsReorder');
}
}
disabled(arg?: boolean): boolean {
if (this.autoCreate && !this.host) {
this.createComponent();
}
if (arg !== undefined) {
this.host.jqxTreeGrid('disabled', arg);
} else {
return this.host.jqxTreeGrid('disabled');
}
}
editable(arg?: boolean): boolean {
if (this.autoCreate && !this.host) {
this.createComponent();
}
if (arg !== undefined) {
this.host.jqxTreeGrid('editable', arg);
} else {
return this.host.jqxTreeGrid('editable');
}
}
editSettings(arg?: jqwidgets.TreeGridEditSettings): jqwidgets.TreeGridEditSettings {
if (this.autoCreate && !this.host) {
this.createComponent();
}
if (arg !== undefined) {
this.host.jqxTreeGrid('editSettings', arg);
} else {
return this.host.jqxTreeGrid('editSettings');
}
}
exportSettings(arg?: jqwidgets.TreeGridExportSettings): jqwidgets.TreeGridExportSettings {
if (this.autoCreate && !this.host) {
this.createComponent();
}
if (arg !== undefined) {
this.host.jqxTreeGrid('exportSettings', arg);
} else {
return this.host.jqxTreeGrid('exportSettings');
}
}
enableHover(arg?: boolean): boolean {
if (this.autoCreate && !this.host) {
this.createComponent();
}
if (arg !== undefined) {
this.host.jqxTreeGrid('enableHover', arg);
} else {
return this.host.jqxTreeGrid('enableHover');
}
}
enableBrowserSelection(arg?: boolean): boolean {
if (this.autoCreate && !this.host) {
this.createComponent();
}
if (arg !== undefined) {
this.host.jqxTreeGrid('enableBrowserSelection', arg);
} else {
return this.host.jqxTreeGrid('enableBrowserSelection');
}
}
filterable(arg?: boolean): boolean {
if (this.autoCreate && !this.host) {
this.createComponent();
}
if (arg !== undefined) {
this.host.jqxTreeGrid('filterable', arg);
} else {
return this.host.jqxTreeGrid('filterable');
}
}
filterHeight(arg?: number): number {
if (this.autoCreate && !this.host) {
this.createComponent();
}
if (arg !== undefined) {
this.host.jqxTreeGrid('filterHeight', arg);
} else {
return this.host.jqxTreeGrid('filterHeight');
}
}
filterMode(arg?: string): string {
if (this.autoCreate && !this.host) {
this.createComponent();
}
if (arg !== undefined) {
this.host.jqxTreeGrid('filterMode', arg);
} else {
return this.host.jqxTreeGrid('filterMode');
}
}
height(arg?: number | string): number | string {
if (this.autoCreate && !this.host) {
this.createComponent();
}
if (arg !== undefined) {
this.host.jqxTreeGrid('height', arg);
} else {
return this.host.jqxTreeGrid('height');
}
}
hierarchicalCheckboxes(arg?: boolean): boolean {
if (this.autoCreate && !this.host) {
this.createComponent();
}
if (arg !== undefined) {
this.host.jqxTreeGrid('hierarchicalCheckboxes', arg);
} else {
return this.host.jqxTreeGrid('hierarchicalCheckboxes');
}
}
icons(arg?: any): any {
if (this.autoCreate && !this.host) {
this.createComponent();
}
if (arg !== undefined) {
this.host.jqxTreeGrid('icons', arg);
} else {
return this.host.jqxTreeGrid('icons');
}
}
incrementalSearch(arg?: boolean): boolean {
if (this.autoCreate && !this.host) {
this.createComponent();
}
if (arg !== undefined) {
this.host.jqxTreeGrid('incrementalSearch', arg);
} else {
return this.host.jqxTreeGrid('incrementalSearch');
}
}
localization(arg?: any): any {
if (this.autoCreate && !this.host) {
this.createComponent();
}
if (arg !== undefined) {
this.host.jqxTreeGrid('localization', arg);
} else {
return this.host.jqxTreeGrid('localization');
}
}
pagerHeight(arg?: number): number {
if (this.autoCreate && !this.host) {
this.createComponent();
}
if (arg !== undefined) {
this.host.jqxTreeGrid('pagerHeight', arg);
} else {
return this.host.jqxTreeGrid('pagerHeight');
}
}
pageSize(arg?: number): number {
if (this.autoCreate && !this.host) {
this.createComponent();
}
if (arg !== undefined) {
this.host.jqxTreeGrid('pageSize', arg);
} else {
return this.host.jqxTreeGrid('pageSize');
}
}
pageSizeOptions(arg?: Array<number | string>): Array<number | string> {
if (this.autoCreate && !this.host) {
this.createComponent();
}
if (arg !== undefined) {
this.host.jqxTreeGrid('pageSizeOptions', arg);
} else {
return this.host.jqxTreeGrid('pageSizeOptions');
}
}
pageable(arg?: boolean): boolean {
if (this.autoCreate && !this.host) {
this.createComponent();
}
if (arg !== undefined) {
this.host.jqxTreeGrid('pageable', arg);
} else {
return this.host.jqxTreeGrid('pageable');
}
}
pagerPosition(arg?: string): string {
if (this.autoCreate && !this.host) {
this.createComponent();
}
if (arg !== undefined) {
this.host.jqxTreeGrid('pagerPosition', arg);
} else {
return this.host.jqxTreeGrid('pagerPosition');
}
}
pagerMode(arg?: string): string {
if (this.autoCreate && !this.host) {
this.createComponent();
}
if (arg !== undefined) {
this.host.jqxTreeGrid('pagerMode', arg);
} else {
return this.host.jqxTreeGrid('pagerMode');
}
}
pageSizeMode(arg?: string): string {
if (this.autoCreate && !this.host) {
this.createComponent();
}
if (arg !== undefined) {
this.host.jqxTreeGrid('pageSizeMode', arg);
} else {
return this.host.jqxTreeGrid('pageSizeMode');
}
}
pagerButtonsCount(arg?: number): number {
if (this.autoCreate && !this.host) {
this.createComponent();
}
if (arg !== undefined) {
this.host.jqxTreeGrid('pagerButtonsCount', arg);
} else {
return this.host.jqxTreeGrid('pagerButtonsCount');
}
}
pagerRenderer(arg?: () => any): () => any {
if (this.autoCreate && !this.host) {
this.createComponent();
}
if (arg !== undefined) {
this.host.jqxTreeGrid('pagerRenderer', arg);
} else {
return this.host.jqxTreeGrid('pagerRenderer');
}
}
ready(arg?: () => void): () => void {
if (this.autoCreate && !this.host) {
this.createComponent();
}
if (arg !== undefined) {
this.host.jqxTreeGrid('ready', arg);
} else {
return this.host.jqxTreeGrid('ready');
}
}
rowDetails(arg?: boolean): boolean {
if (this.autoCreate && !this.host) {
this.createComponent();
}
if (arg !== undefined) {
this.host.jqxTreeGrid('rowDetails', arg);
} else {
return this.host.jqxTreeGrid('rowDetails');
}
}
rowDetailsRenderer(arg?: (key: jqwidgets.TreeGridRowDetailsRenderer['key'], dataRow: jqwidgets.TreeGridRowDetailsRenderer['dataRow']) => any): (key: jqwidgets.TreeGridRowDetailsRenderer['key'], dataRow: jqwidgets.TreeGridRowDetailsRenderer['dataRow']) => any {
if (this.autoCreate && !this.host) {
this.createComponent();
}
if (arg !== undefined) {
this.host.jqxTreeGrid('rowDetailsRenderer', arg);
} else {
return this.host.jqxTreeGrid('rowDetailsRenderer');
}
}
renderToolbar(arg?: (toolBar?: jqwidgets.TreeGridRenderToolbar['toolbar']) => void): (toolBar?: jqwidgets.TreeGridRenderToolbar['toolbar']) => void {
if (this.autoCreate && !this.host) {
this.createComponent();
}
if (arg !== undefined) {
this.host.jqxTreeGrid('renderToolbar', arg);
} else {
return this.host.jqxTreeGrid('renderToolbar');
}
}
renderStatusBar(arg?: (statusBar?: jqwidgets.TreeGridRenderStatusBar['statusbar']) => void): (statusBar?: jqwidgets.TreeGridRenderStatusBar['statusbar']) => void {
if (this.autoCreate && !this.host) {
this.createComponent();
}
if (arg !== undefined) {
this.host.jqxTreeGrid('renderStatusBar', arg);
} else {
return this.host.jqxTreeGrid('renderStatusBar');
}
}
rendering(arg?: () => void): () => void {
if (this.autoCreate && !this.host) {
this.createComponent();
}
if (arg !== undefined) {
this.host.jqxTreeGrid('rendering', arg);
} else {
return this.host.jqxTreeGrid('rendering');
}
}
rendered(arg?: () => void): () => void {
if (this.autoCreate && !this.host) {
this.createComponent();
}
if (arg !== undefined) {
this.host.jqxTreeGrid('rendered', arg);
} else {
return this.host.jqxTreeGrid('rendered');
}
}
rtl(arg?: boolean): boolean {
if (this.autoCreate && !this.host) {
this.createComponent();
}
if (arg !== undefined) {
this.host.jqxTreeGrid('rtl', arg);
} else {
return this.host.jqxTreeGrid('rtl');
}
}
source(arg?: any): any {
if (this.autoCreate && !this.host) {
this.createComponent();
}
if (arg !== undefined) {
this.host.jqxTreeGrid('source', arg);
} else {
return this.host.jqxTreeGrid('source');
}
}
sortable(arg?: boolean): boolean {
if (this.autoCreate && !this.host) {
this.createComponent();
}
if (arg !== undefined) {
this.host.jqxTreeGrid('sortable', arg);
} else {
return this.host.jqxTreeGrid('sortable');
}
}
showAggregates(arg?: boolean): boolean {
if (this.autoCreate && !this.host) {
this.createComponent();
}
if (arg !== undefined) {
this.host.jqxTreeGrid('showAggregates', arg);
} else {
return this.host.jqxTreeGrid('showAggregates');
}
}
showSubAggregates(arg?: boolean): boolean {
if (this.autoCreate && !this.host) {
this.createComponent();
}
if (arg !== undefined) {
this.host.jqxTreeGrid('showSubAggregates', arg);
} else {
return this.host.jqxTreeGrid('showSubAggregates');
}
}
showToolbar(arg?: boolean): boolean {
if (this.autoCreate && !this.host) {
this.createComponent();
}
if (arg !== undefined) {
this.host.jqxTreeGrid('showToolbar', arg);
} else {
return this.host.jqxTreeGrid('showToolbar');
}
}
showStatusbar(arg?: boolean): boolean {
if (this.autoCreate && !this.host) {
this.createComponent();
}
if (arg !== undefined) {
this.host.jqxTreeGrid('showStatusbar', arg);
} else {
return this.host.jqxTreeGrid('showStatusbar');
}
}
statusBarHeight(arg?: number): number {
if (this.autoCreate && !this.host) {
this.createComponent();
}
if (arg !== undefined) {
this.host.jqxTreeGrid('statusBarHeight', arg);
} else {
return this.host.jqxTreeGrid('statusBarHeight');
}
}
scrollBarSize(arg?: number): number {
if (this.autoCreate && !this.host) {
this.createComponent();
}
if (arg !== undefined) {
this.host.jqxTreeGrid('scrollBarSize', arg);
} else {
return this.host.jqxTreeGrid('scrollBarSize');
}
}
selectionMode(arg?: string): string {
if (this.autoCreate && !this.host) {
this.createComponent();
}
if (arg !== undefined) {
this.host.jqxTreeGrid('selectionMode', arg);
} else {
return this.host.jqxTreeGrid('selectionMode');
}
}
showHeader(arg?: boolean): boolean {
if (this.autoCreate && !this.host) {
this.createComponent();
}
if (arg !== undefined) {
this.host.jqxTreeGrid('showHeader', arg);
} else {
return this.host.jqxTreeGrid('showHeader');
}
}
theme(arg?: string): string {
if (this.autoCreate && !this.host) {
this.createComponent();
}
if (arg !== undefined) {
this.host.jqxTreeGrid('theme', arg);
} else {
return this.host.jqxTreeGrid('theme');
}
}
toolbarHeight(arg?: number): number {
if (this.autoCreate && !this.host) {
this.createComponent();
}
if (arg !== undefined) {
this.host.jqxTreeGrid('toolbarHeight', arg);
} else {
return this.host.jqxTreeGrid('toolbarHeight');
}
}
width(arg?: string | number): string | number {
if (this.autoCreate && !this.host) {
this.createComponent();
}
if (arg !== undefined) {
this.host.jqxTreeGrid('width', arg);
} else {
return this.host.jqxTreeGrid('width');
}
}
virtualModeCreateRecords(arg?: (expandedRecord?: any, done?: any) => void): (expandedRecord?: any, done?: any) => void {
if (this.autoCreate && !this.host) {
this.createComponent();
}
if (arg !== undefined) {
this.host.jqxTreeGrid('virtualModeCreateRecords', arg);
} else {
return this.host.jqxTreeGrid('virtualModeCreateRecords');
}
}
virtualModeRecordCreating(arg?: (record?: any) => any): (record?: any) => any {
if (this.autoCreate && !this.host) {
this.createComponent();
}
if (arg !== undefined) {
this.host.jqxTreeGrid('virtualModeRecordCreating', arg);
} else {
return this.host.jqxTreeGrid('virtualModeRecordCreating');
}
}
// jqxTreeGridComponent functions
addRow(rowKey: number | string | null, rowData: any, rowPosition: string, parent?: string): void {
if (this.autoCreate && !this.host) {
this.createComponent();
}
this.host.jqxTreeGrid('addRow', rowKey, rowData, rowPosition, parent);
}
addFilter(dataField: string, filerGroup: any): void {
if (this.autoCreate && !this.host) {
this.createComponent();
}
this.host.jqxTreeGrid('addFilter', dataField, filerGroup);
}
applyFilters(): void {
if (this.autoCreate && !this.host) {
this.createComponent();
}
this.host.jqxTreeGrid('applyFilters');
}
beginUpdate(): void {
if (this.autoCreate && !this.host) {
this.createComponent();
}
this.host.jqxTreeGrid('beginUpdate');
}
beginRowEdit(rowKey: number | string): void {
if (this.autoCreate && !this.host) {
this.createComponent();
}
this.host.jqxTreeGrid('beginRowEdit', rowKey);
}
beginCellEdit(rowKey: number | string, dataField: string): void {
if (this.autoCreate && !this.host) {
this.createComponent();
}
this.host.jqxTreeGrid('beginCellEdit', rowKey, dataField);
}
clearSelection(): void {
if (this.autoCreate && !this.host) {
this.createComponent();
}
this.host.jqxTreeGrid('clearSelection');
}
clearFilters(): void {
if (this.autoCreate && !this.host) {
this.createComponent();
}
this.host.jqxTreeGrid('clearFilters');
}
clear(): void {
if (this.autoCreate && !this.host) {
this.createComponent();
}
this.host.jqxTreeGrid('clear');
}
checkRow(rowKey: number | string): void {
if (this.autoCreate && !this.host) {
this.createComponent();
}
this.host.jqxTreeGrid('checkRow', rowKey);
}
collapseRow(rowKey: number | string): void {
if (this.autoCreate && !this.host) {
this.createComponent();
}
this.host.jqxTreeGrid('collapseRow', rowKey);
}
collapseAll(): void {
if (this.autoCreate && !this.host) {
this.createComponent();
}
this.host.jqxTreeGrid('collapseAll');
}
destroy(): void {
if (this.autoCreate && !this.host) {
this.createComponent();
}
this.host.jqxTreeGrid('destroy');
}
deleteRow(rowKey: string[] | string): void {
if (this.autoCreate && !this.host) {
this.createComponent();
}
this.host.jqxTreeGrid('deleteRow', rowKey);
}
expandRow(rowKey: Array<number | string> | string | number): void {
if (this.autoCreate && !this.host) {
this.createComponent();
}
this.host.jqxTreeGrid('expandRow', rowKey);
}
expandAll(): void {
if (this.autoCreate && !this.host) {
this.createComponent();
}
this.host.jqxTreeGrid('expandAll');
}
endUpdate(): void {
if (this.autoCreate && !this.host) {
this.createComponent();
}
this.host.jqxTreeGrid('endUpdate');
}
ensureRowVisible(rowKey: number | string): void {
if (this.autoCreate && !this.host) {
this.createComponent();
}
this.host.jqxTreeGrid('ensureRowVisible', rowKey);
}
endRowEdit(rowKey: number | string, cancelChanges?: boolean): void {
if (this.autoCreate && !this.host) {
this.createComponent();
}
this.host.jqxTreeGrid('endRowEdit', rowKey, cancelChanges);
}
endCellEdit(rowKey: number | string, dataField: string, cancelChanges?: boolean): void {
if (this.autoCreate && !this.host) {
this.createComponent();
}
this.host.jqxTreeGrid('endCellEdit', rowKey, dataField, cancelChanges);
}
exportData(exportDataType: any): any {
if (this.autoCreate && !this.host) {
this.createComponent();
}
return this.host.jqxTreeGrid('exportData', exportDataType);
}
focus(): void {
if (this.autoCreate && !this.host) {
this.createComponent();
}
this.host.jqxTreeGrid('focus');
}
getColumnProperty(dataField: string, propertyName: string): any {
if (this.autoCreate && !this.host) {
this.createComponent();
}
return this.host.jqxTreeGrid('getColumnProperty', dataField, propertyName);
}
goToPage(pageIndex: number): void {
if (this.autoCreate && !this.host) {
this.createComponent();
}
this.host.jqxTreeGrid('goToPage', pageIndex);
}
goToPrevPage(): void {
if (this.autoCreate && !this.host) {
this.createComponent();
}
this.host.jqxTreeGrid('goToPrevPage');
}
goToNextPage(): void {
if (this.autoCreate && !this.host) {
this.createComponent();
}
this.host.jqxTreeGrid('goToNextPage');
}
getSelection(): Array<any> {
if (this.autoCreate && !this.host) {
this.createComponent();
}
return this.host.jqxTreeGrid('getSelection');
}
getKey(row: any): string {
if (this.autoCreate && !this.host) {
this.createComponent();
}
return this.host.jqxTreeGrid('getKey', row);
}
getRow(rowKey: number | string): jqwidgets.TreeGridGetRow {
if (this.autoCreate && !this.host) {
this.createComponent();
}
return this.host.jqxTreeGrid('getRow', rowKey);
}
getRows(): Array<jqwidgets.TreeGridGetRow> {
if (this.autoCreate && !this.host) {
this.createComponent();
}
return this.host.jqxTreeGrid('getRows');
}
getCheckedRows(): Array<jqwidgets.TreeGridGetRow> {
if (this.autoCreate && !this.host) {
this.createComponent();
}
return this.host.jqxTreeGrid('getCheckedRows');
}
getView(): Array<jqwidgets.TreeGridGetRow> {
if (this.autoCreate && !this.host) {
this.createComponent();
}
return this.host.jqxTreeGrid('getView');
}
getCellValue(rowKey: number | string, dataField: string): any {
if (this.autoCreate && !this.host) {
this.createComponent();
}
return this.host.jqxTreeGrid('getCellValue', rowKey, dataField);
}
hideColumn(dataField: string): void {
if (this.autoCreate && !this.host) {
this.createComponent();
}
this.host.jqxTreeGrid('hideColumn', dataField);
}
isBindingCompleted(): boolean {
if (this.autoCreate && !this.host) {
this.createComponent();
}
return this.host.jqxTreeGrid('isBindingCompleted');
}
lockRow(rowKey: string | number | Array<number | string>): void {
if (this.autoCreate && !this.host) {
this.createComponent();
}
this.host.jqxTreeGrid('lockRow', rowKey);
}
refresh(): void {
if (this.autoCreate && !this.host) {
this.createComponent();
}
this.host.jqxTreeGrid('refresh');
}
render(): void {
if (this.autoCreate && !this.host) {
this.createComponent();
}
this.host.jqxTreeGrid('render');
}
removeFilter(dataField: string): void {
if (this.autoCreate && !this.host) {
this.createComponent();
}
this.host.jqxTreeGrid('removeFilter', dataField);
}
scrollOffset(top?: number, left?: number): jqwidgets.TreeGridScrollOffset {
if (top !== undefined || left !== undefined) {
this.host.jqxTreeGrid('scrollOffset', top, left);
} else {
return this.host.jqxTreeGrid('scrollOffset');
}
};
setColumnProperty(dataField: string, propertyName: string, propertyValue: any): void {
if (this.autoCreate && !this.host) {
this.createComponent();
}
this.host.jqxTreeGrid('setColumnProperty', dataField, propertyName, propertyValue);
}
showColumn(dataField: string): void {
if (this.autoCreate && !this.host) {
this.createComponent();
}
this.host.jqxTreeGrid('showColumn', dataField);
}
selectRow(rowId: string | number | Array<number | string>): void {
if (this.autoCreate && !this.host) {
this.createComponent();
}
this.host.jqxTreeGrid('selectRow', rowId);
}
setCellValue(rowId: string, dataField: string, cellValue: any): void {
if (this.autoCreate && !this.host) {
this.createComponent();
}
this.host.jqxTreeGrid('setCellValue', rowId, dataField, cellValue);
}
sortBy(dataField: number | string, sortOrder?: 'asc' | 'desc' | null): void {
if (this.autoCreate && !this.host) {
this.createComponent();
}
this.host.jqxTreeGrid('sortBy', dataField, sortOrder);
}
updating(): boolean {
if (this.autoCreate && !this.host) {
this.createComponent();
}
return this.host.jqxTreeGrid('updating');
}
updateBoundData(): void {
if (this.autoCreate && !this.host) {
this.createComponent();
}
this.host.jqxTreeGrid('updateBoundData');
}
unselectRow(rowId: string | number | Array<number | string>): void {
if (this.autoCreate && !this.host) {
this.createComponent();
}
this.host.jqxTreeGrid('unselectRow', rowId);
}
uncheckRow(rowId: string): void {
if (this.autoCreate && !this.host) {
this.createComponent();
}
this.host.jqxTreeGrid('uncheckRow', rowId);
}
updateRow(rowId: number | string, data: any): void {
if (this.autoCreate && !this.host) {
this.createComponent();
}
this.host.jqxTreeGrid('updateRow', rowId, data);
}
unlockRow(rowId: string | number | Array<number | string>): void {
if (this.autoCreate && !this.host) {
this.createComponent();
}
this.host.jqxTreeGrid('unlockRow', rowId);
}
// jqxTreeGridComponent events
onBindingComplete = new EventEmitter();
onCellBeginEdit = new EventEmitter();
onCellEndEdit = new EventEmitter();
onCellValueChanged = new EventEmitter();
onColumnResized = new EventEmitter();
onColumnReordered = new EventEmitter();
onFilter = new EventEmitter();
onPageChanged = new EventEmitter();
onPageSizeChanged = new EventEmitter();
onRowClick = new EventEmitter();
onRowDoubleClick = new EventEmitter();
onRowSelect = new EventEmitter();
onRowUnselect = new EventEmitter();
onRowBeginEdit = new EventEmitter();
onRowEndEdit = new EventEmitter();
onRowExpand = new EventEmitter();
onRowCollapse = new EventEmitter();
onRowCheck = new EventEmitter();
onRowUncheck = new EventEmitter();
onSort = new EventEmitter();
__wireEvents__(): void {
this.host.on('bindingComplete', (eventData: any) => { this.onBindingComplete.emit(eventData); });
this.host.on('cellBeginEdit', (eventData: any) => { this.onCellBeginEdit.emit(eventData); });
this.host.on('cellEndEdit', (eventData: any) => { this.onCellEndEdit.emit(eventData); });
this.host.on('cellValueChanged', (eventData: any) => { this.onCellValueChanged.emit(eventData); });
this.host.on('columnResized', (eventData: any) => { this.onColumnResized.emit(eventData); });
this.host.on('columnReordered', (eventData: any) => { this.onColumnReordered.emit(eventData); });
this.host.on('filter', (eventData: any) => { this.onFilter.emit(eventData); });
this.host.on('pageChanged', (eventData: any) => { this.onPageChanged.emit(eventData); });
this.host.on('pageSizeChanged', (eventData: any) => { this.onPageSizeChanged.emit(eventData); });
this.host.on('rowClick', (eventData: any) => { this.onRowClick.emit(eventData); });
this.host.on('rowDoubleClick', (eventData: any) => { this.onRowDoubleClick.emit(eventData); });
this.host.on('rowSelect', (eventData: any) => { this.onRowSelect.emit(eventData); });
this.host.on('rowUnselect', (eventData: any) => { this.onRowUnselect.emit(eventData); });
this.host.on('rowBeginEdit', (eventData: any) => { this.onRowBeginEdit.emit(eventData); });
this.host.on('rowEndEdit', (eventData: any) => { this.onRowEndEdit.emit(eventData); });
this.host.on('rowExpand', (eventData: any) => { this.onRowExpand.emit(eventData); });
this.host.on('rowCollapse', (eventData: any) => { this.onRowCollapse.emit(eventData); });
this.host.on('rowCheck', (eventData: any) => { this.onRowCheck.emit(eventData); });
this.host.on('rowUncheck', (eventData: any) => { this.onRowUncheck.emit(eventData); });
this.host.on('sort', (eventData: any) => { this.onSort.emit(eventData); });
}
} //jqxTreeGridComponent