src/ui/grid/smart-grid.component.ts
OnInit
DoCheck
AfterViewInit
OnDestroy
| changeDetection | ChangeDetectionStrategy.OnPush |
| providers |
FilterService
SmartGridExportService
SmartGridServerSideEventHandlerService
SmartGridSsehAdapter
SmartGridLassoSelectionService
SmartGridPreferencesService
SmartGridViewStateAdapterService
SmartGridHelpTextVisualizationService
|
| selector | smart-grid |
| styleUrls | ./smart-grid.component.scss, |
| templateUrl | ./smart-grid.component.html |
constructor(registry: DataSourceRegistry, gridRegistry: SmartGridRegistryService, smartConfig: SmartConfig, smartServiceAdapter: SmartServiceAdapter, smartHttp: SmartHttpService, screenService: SmartScreenService, navigationService: SmartNavigationService, vcRef: ViewContainerRef, route: ActivatedRoute, changeDetector: ChangeDetectorRef, intlService: IntlService, domSanitizer: DomSanitizer, toolbarRegistry: SmartToolbarRegistry, renderer: Renderer2, elementRef: ElementRef, logicClassesHelperService: SmartLogicClassesHelperService, floatingWindowHelper: FloatingWindowHelperService, injector: Injector)
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Parameters :
|
| disable-text-selection |
Type : boolean
|
|
Sets whether text selection is disabled. |
| filterable |
Type : boolean
|
|
Sets whether global grid filtering is enabled. |
| height |
Type : number
|
|
Sets the grid height. |
| pageable |
Type : boolean
|
|
Enables or disables paging capabilities |
| pageSize |
Type : number
|
|
Sets the page size. |
| prompt-before-export |
Type : string
|
|
Sets whether prompting before export is enabled. |
| smart-auto-select-first-record |
Type : boolean
|
| smart-data-source |
Type : string
|
|
Sets the smart-object name of the SmartDataSource that the SmartGrid should attach to. |
| smart-default-action-behavior |
Type : TableIOAction
|
|
Sets the default action behavior. |
| smart-detail-form |
Type : SmartDetailForm
|
|
The Smart Detail Form for this Smart Grid |
| smart-double-click-action |
Type : GridDoubleClickAction
|
|
Sets the double-click action. |
| smart-event-handlers |
Type : SSEHEventHandlerDefinitions
|
| smart-export-source |
Type : string
|
|
Sets the export source toolbar name. |
| smart-grid-allow-drag |
Type : boolean | undefined
|
|
Sets whether drag is enabled on grid rows. |
| smart-grid-allow-drop |
Type : boolean | undefined
|
|
Sets whether the grid accepts dropped items. |
| smart-grid-data-drop-handler |
Type : void
|
|
Sets the grid drop handler. |
| smart-grid-drag-handle-iconclass |
Type : string | undefined
|
|
Sets the icon class for the drag handle. |
| smart-grid-drag-receive-cursor |
Type : string | unknown | undefined
|
|
Sets the cursor style when receiving a drag. |
| smart-grid-drop-source |
Type : string
|
|
Sets the drop source identifier. |
| smart-grid-layout |
Type : any
|
|
If specified, the SmartGrid will attempt to fetch its layout from the specified URL. |
| smart-help-url |
Type : string
|
| smart-logic-classes |
Type : string[]
|
| smart-object-name |
Type : string
|
|
Sets the grid instance name. |
| smart-report-footer-template |
Type : string
|
|
Sets the report footer template. |
| smart-report-title-template |
Type : string
|
|
Sets the report title template. |
| smart-show-date-time-zone |
Type : boolean | undefined
|
|
Sets whether DATETIME-TZ timezone badges/selectors are displayed. |
| smart-table-ref |
Type : string
|
| smart-tableio-source |
Type : string
|
|
Sets the table IO source toolbar name. |
| smart-virtual-scrolling |
Type : boolean
|
|
Sets the virtual scrolling mode. |
| sortable |
Type : boolean
|
|
Sets whether sorting is enabled. |
| width |
Type : number
|
| allowRememberFilters |
Type : boolean
|
Default value : undefined
|
| bindToDatasourceState |
Type : boolean
|
Default value : true, { alias: 'smart-grid-bind-to-datasource-state' }
|
| prompt-before-delete |
Type : string
|
| ignoreFlexboxLayout |
Type : boolean
|
| smart-help-text |
Type : string | undefined
|
|
Sets the HelpText value for this form child. |
| smart-instance-name |
Type : string
|
|
The instance name of the component |
| on-add |
Type : EventEmitter<any>
|
|
Emits an event after a record is added. |
| on-before-add |
Type : EventEmitter<any>
|
|
Emits an event before a record is added. |
| on-before-delete |
Type : EventEmitter<any>
|
|
Emits an event before a record is deleted. |
| on-before-update |
Type : EventEmitter<any>
|
|
Emits an event before a record is updated. |
| on-command-clicked |
Type : EventEmitter<CommandButtonEventArgs>
|
| on-data-dropped |
Type : EventEmitter<SmartGridDropEvent>
|
| on-delete |
Type : EventEmitter<any>
|
|
Emits an event after a record is deleted. |
| on-header-button-clicked |
Type : EventEmitter<SmartGridHeaderButtonClickedEventArgs>
|
| on-update |
Type : EventEmitter<any>
|
|
Emits an event after a record is updated. |
| onBeforeExport |
Type : EventEmitter<SmartGridExportEvent>
|
| onDetailFormLaunch |
Type : EventEmitter<literal type>
|
| onDoubleClicked |
Type : EventEmitter<GridDoubleClickEvent>
|
| onReady |
Type : EventEmitter<boolean>
|
| selection-changed |
Type : EventEmitter<GridSelectionChangedEventArgs>
|
| onAfterAddRecord |
Type : EventEmitter<AfterAddEventArgument>
|
| onAfterCancelRecord |
Type : EventEmitter<AfterCancelEventArgument>
|
| onAfterCopyRecord |
Type : EventEmitter<AfterCopyEventArgument>
|
| onAfterDeleteRecord |
Type : EventEmitter<AfterDeleteEventArgument>
|
| onAfterEnableFields |
Type : EventEmitter<AfterEnableFieldsEventArgument>
|
| onAfterSaveChanges |
Type : EventEmitter<AfterSaveChangesEventArgument>
|
| onBeforeAddRecord |
Type : EventEmitter<BeforeAddEventArgument>
|
| onBeforeCancelRecord |
Type : EventEmitter<BeforeCancelEventArgument>
|
| onBeforeCopyRecord |
Type : EventEmitter<BeforeCopyEventArgument>
|
| onBeforeDeleteRecord |
Type : EventEmitter<BeforeDeleteEventArgument>
|
| onBeforeEnableFields |
Type : EventEmitter<BeforeEnableFieldsEventArgument>
|
| onBeforeSaveChanges |
Type : EventEmitter<BeforeSaveChangesEventArgument>
|
| contextmenu | ||||
Arguments : '$event'
|
||||
contextmenu(event: MouseEvent)
|
||||
|
Triggers the display of the grid context menu on right-click in kendo-grid
Parameters :
|
| dblclick | ||||
Arguments : '$event'
|
||||
dblclick(event: MouseEvent)
|
||||
|
Parameters :
|
| keydown | ||||
Arguments : '$event.key'
|
||||
keydown(key: string)
|
||||
|
Parameters :
|
| keyup.enter | ||||
Arguments : '$event'
|
||||
keyup.enter(event: Event)
|
||||
|
Handles keypress events to apply filters when the Enter key is pressed
Parameters :
|
| mousemove | ||||
Arguments : '$event.target'
|
||||
mousemove(eventTarget: EventTarget)
|
||||
|
Parameters :
|
| Public Async applyViewState | ||||||||||||
applyViewState(state: SmartGridViewState, options?: literal type)
|
||||||||||||
|
Applies a stored view state to the grid (columns, sort, groups, filter). Triggers a data refetch.
Parameters :
Returns :
Promise<boolean>
True when the view state was applied. |
| Public callLogicClassMethod | ||||||||||||
| Use callLogicMethod instead | ||||||||||||
callLogicClassMethod(methodName: string, args: any[])
|
||||||||||||
|
Invokes a specified method on the first available logic class instance that has the method defined.
Parameters :
Returns :
any
|
| Public callLogicMethod | ||||||||||||
callLogicMethod(methodName: string, ...args: any[])
|
||||||||||||
|
Calls a method on the logic class instances
Parameters :
Returns :
Promise | any
The result of the method call |
| Public captureViewState |
captureViewState()
|
|
Captures the current view state of the grid (columns, sort, groups, filter).
Returns :
SmartGridViewState
The current view state. |
| Public clearFilterForField | ||||||
clearFilterForField(field: string)
|
||||||
|
Clears the filter for a specific field
Parameters :
Returns :
void
|
| commandButtonClicked |
commandButtonClicked(cmd: any, dataItem: any)
|
|
Handles a custom command button click by calling the corresponding method of the parent form's controller
Returns :
void
|
| Public disableGrid |
disableGrid()
|
|
Disables row and page selection and column sorting.
Returns :
void
|
| Public enableGrid |
enableGrid()
|
|
Enables row and page selection and column sorting.
Returns :
void
|
| Public Async exportExcel |
exportExcel()
|
|
Exports the grid as an Excel file
Returns :
any
|
| Public Async exportPDF |
exportPDF()
|
|
Exports the grid as a PDF file
Returns :
any
|
| getColumnEditor | ||||||
getColumnEditor(column: any)
|
||||||
|
Returns the appropriate column editor type for the given grid column, according to the column field data type
Parameters :
Returns :
any
|
| Public getDataSource | ||||||||
getDataSource(dataSourceName?: string)
|
||||||||
|
Returns the datasource as an observable
Parameters :
Returns :
Observable<SmartDataSource>
the datasource |
| Public getDefaultOperator | ||||||
getDefaultOperator(column: any)
|
||||||
|
Returns the default filter operator for the given column.
Parameters :
Returns :
string
|
| Public getEffectivePageableSettings |
getEffectivePageableSettings()
|
|
Computes the effective pageable configuration based on fetch-all mode and grid layout defaults.
Returns :
any
Effective pageable configuration for the Kendo Grid |
| Public getSelectedRecords |
getSelectedRecords()
|
|
Returns the selected records
Returns :
any[]
the selected records |
| getTableIoSource |
getTableIoSource()
|
|
Returns the toolbar that is used as the table IO source
Returns :
SmartToolbarComponent | Promise | null
the toolbar that is used as the table IO source |
| Public getTemplateValue | ||||||
getTemplateValue(record: any)
|
||||||
|
Parameters :
Returns :
any
|
| Public getToolbarDispatchPolicy | ||||||||
getToolbarDispatchPolicy(button: SmartToolbarButtonComponent)
|
||||||||
|
Returns the click-time toolbar dispatch policy for this grid.
Parameters :
Returns :
TableIOToolbarDispatchPolicy
The click-time dispatch policy. |
| Public handleAdd |
handleAdd()
|
|
Handles an add command
Returns :
void
|
| Public handleCancel | ||||||
handleCancel(ev: any)
|
||||||
|
Handles a cancel command button click
Parameters :
Returns :
void
|
| Public handleCopy |
handleCopy()
|
|
Handles a copy command
Returns :
void
|
| Public handleDataDropped | ||||||
handleDataDropped(ev: SmartDragDropEvent)
|
||||||
|
Handles data drop events
Parameters :
Returns :
void
|
| Public Async handleDelete |
handleDelete()
|
|
Handles a delete command
Returns :
any
|
| Public Async handleEdit | ||||||
handleEdit(ev: any)
|
||||||
|
Handles an edit command button click. Cancels any different open edit row through the normal cancel flow, then wraps the new edit start with a synchronous pending-edit guard so selecting the target row cannot cancel the very edit it is opening (SCLNG-1694).
Parameters :
Returns :
any
|
| Public handleExport | ||||||
handleExport(exportType: SmartExportType)
|
||||||
|
Handles export events
Parameters :
Returns :
void
|
| Public handleLayoutChange | ||||||
handleLayoutChange(newLayout: any)
|
||||||
|
Handles layout changes from the parent container to apply stretch mode styling. Guards DOM accesses since this can be called before the grid ViewChild is set (while skeleton is shown).
Parameters :
Returns :
void
|
| Public handleListBoxSelectionChange | ||||||
handleListBoxSelectionChange(ev: ListBoxSelectionEvent)
|
||||||
|
Parameters :
Returns :
void
|
| Public handleSave | ||||||
handleSave(ev: any)
|
||||||
|
Handles a save command button click
Parameters :
Returns :
void
|
| Public handleToolbarButton | ||||||||||||
handleToolbarButton(button: SmartToolbarButtonComponent, context?: TableIOToolbarDispatchContext)
|
||||||||||||
|
Handles a toolbar button click routed through the active TableIO target.
Parameters :
Returns :
boolean
True when the grid handled the button. |
| Public handleToolbarCancel |
handleToolbarCancel()
|
|
Handles toolbar Cancel using the current grid edit row context.
Returns :
void
|
| Public handleUpdate |
handleUpdate()
|
|
Handles an update operation
Returns :
void
|
| Public handleView |
handleView()
|
|
Handles a view operation
Returns :
void
|
| Public hasDateTimeTZSelectorPreferenceContextMenuItem |
hasDateTimeTZSelectorPreferenceContextMenuItem()
|
|
Indicates whether the DATETIME-TZ usage preference menu item is applicable.
Returns :
boolean
|
| Public isFilterable | ||||||
isFilterable(field: string)
|
||||||
|
Parameters :
Returns :
boolean
boolean |
| Public isRowAtIndexVisible | ||||||||
isRowAtIndexVisible(rowIndex: number)
|
||||||||
|
Checks if a row at a specific index is visible in the grid
Parameters :
Returns :
boolean
true if the row is visible, false otherwise |
| Public navigateGridSelection | ||||||
navigateGridSelection(direction: "up" | "down")
|
||||||
|
Parameters :
Returns :
void
|
| navigateToCommandForm |
navigateToCommandForm(cmd: any, dataItem: any)
|
|
Triggers navigation to the form associated with the given command
Returns :
void
|
| onDoubleClick | ||||||
onDoubleClick(event: MouseEvent)
|
||||||
Decorators :
@HostListener('dblclick', ['$event'])
|
||||||
|
Parameters :
Returns :
void
|
| onGridGroupChange | ||||||||||||
onGridGroupChange(groups: GroupDescriptor[], refreshForGrouping: unknown)
|
||||||||||||
|
Handles group settings changes. This method is for internal use only and SHOULD NOT be called externally.
Parameters :
Returns :
void
|
| Public onKeyDown | ||||||
onKeyDown(key: string)
|
||||||
Decorators :
@HostListener('keydown', ['$event.key'])
|
||||||
|
Parameters :
Returns :
void
|
| Public onKeyPress | ||||||
onKeyPress(event: Event)
|
||||||
Decorators :
@HostListener('keyup.enter', ['$event'])
|
||||||
|
Handles keypress events to apply filters when the Enter key is pressed
Parameters :
Returns :
void
|
| onRowMouseOver | ||||||
onRowMouseOver(eventTarget: EventTarget)
|
||||||
Decorators :
@HostListener('mousemove', ['$event.target'])
|
||||||
|
Parameters :
Returns :
void
|
| Public refreshAfterSsehFieldControls |
refreshAfterSsehFieldControls()
|
|
Refreshes grid bindings after SSEH field controls changed columns.
Returns :
void
|
| Public Async refreshAfterSsehScreenValues |
refreshAfterSsehScreenValues()
|
|
Refreshes grid bindings after SSEH screen values were applied.
Returns :
Promise<void>
|
| Public refreshCurrentEditControlAfterSsehFieldControl | ||||||||
refreshCurrentEditControlAfterSsehFieldControl(fieldName: string)
|
||||||||
|
Refreshes the current edit control after SSEH changed a column.
Parameters :
Returns :
void
|
| Public Async resetViewState | ||||||
resetViewState(options?: literal type)
|
||||||
|
Resets the grid to its original layout (columns, sort, groups, filter). Triggers a data refetch.
Parameters :
Returns :
Promise<boolean>
True when the default view state was applied. |
| resize |
resize()
|
|
Returns :
void
|
| Public saveChanges |
saveChanges()
|
|
Saves the current grid edit row.
Returns :
Promise<void>
|
| Public scrollToRow | ||||||||
scrollToRow(rowIndex: number)
|
||||||||
|
Scrolls to a row at a specific index If the row is already visible, it will not scroll
Parameters :
Returns :
void
|
| selectByIndex | ||||||
selectByIndex(index: number)
|
||||||
|
Selects a row by index
Parameters :
Returns :
void
|
| Public setRuntimeSsehFieldEnabledState | ||||||||||||
setRuntimeSsehFieldEnabledState(fieldName: string, enabledState: string | undefined)
|
||||||||||||
|
Stores a runtime SSEH enabled-state override for the active edit row.
Parameters :
Returns :
void
|
| Public syncToolbarWithTableIOState | ||||||||
syncToolbarWithTableIOState(toolbar: ISmartTableIOSource)
|
||||||||
|
Syncs the toolbar button states with the current state of this table IO target. This method is called when the target is activated and should ensure the toolbar buttons reflect the current state.
Parameters :
Returns :
void
|
| Public handleSuppressedToolbarButton | ||||||||||||
handleSuppressedToolbarButton(button: SmartToolbarButtonComponent, context: TableIOToolbarDispatchContext)
|
||||||||||||
|
Performs target-specific UI cleanup after a consumer suppresses central toolbar dispatch.
Parameters :
Returns :
void
|
| Async registerTableIOTarget |
registerTableIOTarget()
|
|
Registers the table IO target with the registry
Returns :
any
|
| Public notifyLoadingFinished | ||||||
notifyLoadingFinished(objectName: string)
|
||||||
|
Notifies the parent Smart Form that this form child has finished loading
Parameters :
Returns :
void
void |
| _htmlRows |
Type : QueryList<ElementRef>
|
Decorators :
@ViewChildren('tr[data-kendo-grid-item-index]', {read: ElementRef})
|
| Readonly dataDropHandlerSignal |
Type : Signal<void>
|
Default value : this._dataDropHandlerSignal.asReadonly()
|
| Readonly defaultActionBehaviorSignal |
Type : Signal<TableIOAction>
|
Default value : this._defaultActionBehaviorSignal.asReadonly()
|
| Public detailTemplateView |
Type : any
|
| Readonly disableTextSelectionSignal |
Type : Signal<boolean>
|
Default value : this._disableTextSelectionSignal.asReadonly()
|
| Readonly doubleClickActionSignal |
Type : Signal<GridDoubleClickAction>
|
Default value : this._doubleClickActionSignal.asReadonly()
|
| Readonly dropSourceSignal |
Type : Signal<string>
|
Default value : this._dropSourceSignal.asReadonly()
|
| editMode |
Type : unknown
|
Default value : false
|
| fetchEnd |
Type : Date
|
| fetchStart |
Type : Date
|
| gridContextMenu |
Type : unknown
|
Default value : viewChild('gridmenu', { read: ContextMenuComponent })
|
| gridLayout |
Type : any
|
|
If specified, the SmartGrid will use the specified object for setting its layout. |
| Public Readonly hasRememberFilterContextMenuItems |
Type : Signal<boolean>
|
Default value : computed(() => {
if (!this.isRememberFiltersEnabled()) {
return false;
}
const layout = this.gridLayoutSignal();
if (!layout || layout.filterable === false) {
return false;
}
return (
this.hasLayoutDeclaredFilterableColumns() ||
this.hasActiveAppliedGridFilters() ||
this.pendingFilters().length > 0
);
})
|
|
Indicates whether filter context menu items are available. |
| menuSettings |
Type : ColumnMenuSettings
|
Default value : {
columnChooser: {
expanded: true
},
filter: false,
sort: false
}
|
| messages |
Type : object
|
Default value : {
noRecords: 'The current query returned no records.'
}
|
| Readonly nameSignal |
Type : Signal<string>
|
Default value : this._nameSignal.asReadonly()
|
| Readonly pageableSignal |
Type : Signal<boolean>
|
Default value : this._pageableSignal.asReadonly()
|
| pdfExportColumns |
Type : any[]
|
Default value : []
|
|
Columns prepared for PDF export |
| pdfExportComponent |
Type : SmartGridPdfExportComponent
|
Decorators :
@ViewChild('pdfExport', {static: false})
|
| pdfExportData |
Type : any[]
|
Default value : []
|
|
Data prepared for PDF export |
| Public preferencesService |
Type : unknown
|
Default value : inject(SmartGridPreferencesService)
|
| Readonly promptBeforeExportSignal |
Type : Signal<string>
|
Default value : this._promptBeforeExportSignal.asReadonly()
|
| selectedItem |
Type : any
|
| Public Readonly showGridContextMenu |
Type : Signal<boolean>
|
Default value : computed(() => {
return (
this.hasRememberFilterContextMenuItems() ||
this.hasDateTimeTZSelectorPreferenceContextMenuItem()
);
})
|
| viewStateChanged |
Type : EventEmitter<void>
|
Default value : new EventEmitter<void>(false)
|
| Public tableIoStateSignal |
Type : WritableSignal<TableIOTargetState>
|
Default value : signal(
TableIOTargetState.IDLE
)
|
|
Signal that tracks the current TableIO operation state. Used for synchronizing state between group assign source/target viewers. |
| Public injector |
Type : Injector
|
| gridSort | ||||||||
getgridSort()
|
||||||||
|
Returns the grid sort descriptors.
Returns :
SortDescriptor[]
|
||||||||
setgridSort(value: SortDescriptor[])
|
||||||||
|
Sets the grid sort descriptors.
Parameters :
Returns :
void
|
| _gridImages | ||||||||
get_gridImages()
|
||||||||
|
Returns the grid column image info.
Returns :
SmartGridColumnImageInfo
|
||||||||
set_gridImages(value: SmartGridColumnImageInfo)
|
||||||||
|
Sets the grid column image info.
Parameters :
Returns :
void
|
| dataAggregates |
getdataAggregates()
|
|
Exposes the aggregates signal for templates.
Returns :
WritableSignal<Record<string, unknown>>
|
| filterCellInputs |
getfilterCellInputs()
|
|
All Smart Grid filter cell DOM elements
Returns :
HTMLInputElement[]
|
| selectedRows |
getselectedRows()
|
|
Returns :
SmartGridRow[]
|
| filter |
getfilter()
|
|
Returns the current grid filter.
Returns :
any
|
| smartDragDropTarget |
getsmartDragDropTarget()
|
|
Returns :
string
|
| rowDropTargetId |
getrowDropTargetId()
|
|
Returns :
string
|
| rowDropTargetSelector |
getrowDropTargetSelector()
|
|
Used for providing the smart-drag-drop-target for drag&drop targets
Returns :
string
|
| currentFormGroup |
getcurrentFormGroup()
|
|
Used to expose the editing row in the SmartGrid
Returns :
FormGroup
|
| name | ||||||||
getname()
|
||||||||
|
Returns the grid instance name.
Returns :
string
|
||||||||
setname(value: string)
|
||||||||
|
Sets the grid instance name.
Parameters :
Returns :
void
|
| width | ||||||
getwidth()
|
||||||
|
Returns :
number
|
||||||
setwidth(value: number)
|
||||||
|
Parameters :
Returns :
void
|
| height | ||||||||
getheight()
|
||||||||
|
Returns the grid height.
Returns :
number
|
||||||||
setheight(value: number)
|
||||||||
|
Sets the grid height.
Parameters :
Returns :
void
|
| virtualScrolling | ||||||||
getvirtualScrolling()
|
||||||||
|
Returns whether virtual scrolling is enabled.
Returns :
boolean
|
||||||||
setvirtualScrolling(value: boolean)
|
||||||||
|
Sets the virtual scrolling mode.
Parameters :
Returns :
void
|
| showDateTimeZone | ||||||||
getshowDateTimeZone()
|
||||||||
|
Returns whether DATETIME-TZ timezone badges/selectors are displayed.
Returns :
boolean
|
||||||||
setshowDateTimeZone(value: boolean | undefined)
|
||||||||
|
Sets whether DATETIME-TZ timezone badges/selectors are displayed.
Parameters :
Returns :
void
|
| showNoRecords |
getshowNoRecords()
|
|
Returns :
boolean
|
| shouldTruncateText |
getshouldTruncateText()
|
|
Returns :
boolean
|
| dataSourceName | ||||||||
getdataSourceName()
|
||||||||
|
Returns the smart-object name of the attached SmartDataSource.
Returns :
string
|
||||||||
setdataSourceName(value: string)
|
||||||||
|
Sets the smart-object name of the SmartDataSource that the SmartGrid should attach to.
Parameters :
Returns :
void
|
| sortable | ||||||||
getsortable()
|
||||||||
|
Returns whether sorting is enabled.
Returns :
boolean
|
||||||||
setsortable(value: boolean)
|
||||||||
|
Sets whether sorting is enabled.
Parameters :
Returns :
void
|
| pageable | ||||||
getpageable()
|
||||||
|
Returns the pageable property value. @memberof SmartGridComponent
Returns :
boolean
|
||||||
setpageable(value: boolean)
|
||||||
|
Enables or disables paging capabilities
Parameters :
Returns :
void
|
| filterable | ||||||||
getfilterable()
|
||||||||
|
Returns whether global grid filtering is enabled.
Returns :
boolean
|
||||||||
setfilterable(value: boolean)
|
||||||||
|
Sets whether global grid filtering is enabled.
Parameters :
Returns :
void
|
| pageSize | ||||||||
getpageSize()
|
||||||||
|
Returns the page size.
Returns :
number
|
||||||||
setpageSize(value: number)
|
||||||||
|
Sets the page size.
Parameters :
Returns :
void
|
| defaultActionBehavior | ||||||||
getdefaultActionBehavior()
|
||||||||
|
Returns the default action behavior.
Returns :
TableIOAction
|
||||||||
setdefaultActionBehavior(value: TableIOAction)
|
||||||||
|
Sets the default action behavior.
Parameters :
Returns :
void
|
| doubleClickAction | ||||||||
getdoubleClickAction()
|
||||||||
|
Returns the double-click action.
Returns :
GridDoubleClickAction
|
||||||||
setdoubleClickAction(value: GridDoubleClickAction)
|
||||||||
|
Sets the double-click action.
Parameters :
Returns :
void
|
| promptBeforeExport | ||||||||
getpromptBeforeExport()
|
||||||||
|
Returns the prompt before export flag value.
Returns :
string
|
||||||||
setpromptBeforeExport(value: string)
|
||||||||
|
Sets whether prompting before export is enabled.
Parameters :
Returns :
void
|
| dropSource | ||||||||
getdropSource()
|
||||||||
|
Returns the drop source identifier.
Returns :
string
|
||||||||
setdropSource(value: string)
|
||||||||
|
Sets the drop source identifier.
Parameters :
Returns :
void
|
| allowDrop | ||||||||
getallowDrop()
|
||||||||
|
Returns whether the grid accepts dropped items.
Returns :
boolean | undefined
|
||||||||
setallowDrop(value: boolean | undefined)
|
||||||||
|
Sets whether the grid accepts dropped items.
Parameters :
Returns :
void
|
| allowDrag | ||||||||
getallowDrag()
|
||||||||
|
Returns whether drag is enabled on grid rows.
Returns :
boolean | undefined
|
||||||||
setallowDrag(value: boolean | undefined)
|
||||||||
|
Sets whether drag is enabled on grid rows.
Parameters :
Returns :
void
|
| dragReceiveCursor | ||||||||
getdragReceiveCursor()
|
||||||||
|
Returns the cursor style when receiving a drag.
Returns :
string | unknown | undefined
|
||||||||
setdragReceiveCursor(value: string | unknown | undefined)
|
||||||||
|
Sets the cursor style when receiving a drag.
Parameters :
Returns :
void
|
| dragHandleIconClass | ||||||||
getdragHandleIconClass()
|
||||||||
|
Returns the icon class for the drag handle.
Returns :
string | undefined
|
||||||||
setdragHandleIconClass(value: string | undefined)
|
||||||||
|
Sets the icon class for the drag handle.
Parameters :
Returns :
void
|
| style | ||||||||
getstyle()
|
||||||||
|
Returns the grid display style (grid/list).
Returns :
string
|
||||||||
setstyle(value: string)
|
||||||||
|
Sets the grid display style (grid/list).
Parameters :
Returns :
void
|
| view | ||||||||
getview()
|
||||||||
|
Returns the list view template.
Returns :
string
|
||||||||
setview(value: string)
|
||||||||
|
Sets the list view template.
Parameters :
Returns :
void
|
| items | ||||||||
getitems()
|
||||||||
|
Returns the grid items array.
Returns :
any[]
|
||||||||
setitems(value: any[])
|
||||||||
|
Sets the grid items array.
Parameters :
Returns :
void
|
| dataDropHandler | ||||||||
getdataDropHandler()
|
||||||||
|
Returns the grid drop handler.
Returns :
void
|
||||||||
setdataDropHandler(value: (ev: SmartGridDropEvent) => void)
|
||||||||
|
Sets the grid drop handler.
Parameters :
Returns :
void
|
| gridLayoutUrl | ||||||
getgridLayoutUrl()
|
||||||
|
Returns :
any
|
||||||
setgridLayoutUrl(value: any)
|
||||||
|
If specified, the SmartGrid will attempt to fetch its layout from the specified URL.
Parameters :
Returns :
void
|
| pageIndex |
getpageIndex()
|
|
The current page index.
Returns :
number
|
| skip | ||||||
getskip()
|
||||||
|
Number of records to skip.
Returns :
number
|
||||||
setskip(value: number)
|
||||||
|
Parameters :
Returns :
void
|
| dataGroups |
getdataGroups()
|
|
Returns the collection of record group settings.
Returns :
GroupDescriptor[]
|
| loading | ||||||
getloading()
|
||||||
|
Indicates whether the SmartGrid is currently loading data. Returns the signal for use in templates with signal-aware binding.
Returns :
boolean
|
||||||
setloading(value: boolean)
|
||||||
|
Sets the loading state.
Parameters :
Returns :
void
|
| grid | ||||||
getgrid()
|
||||||
|
Gets the Kendo Grid component instance.
Returns :
GridComponent
|
||||||
setgrid(value: GridComponent)
|
||||||
|
The Kendo Grid component instance. Uses a setter to trigger setup when the grid becomes available, eliminating the need for polling in ngDoCheck.
Parameters :
Returns :
void
|
| gridComponent |
getgridComponent()
|
|
Returns :
GridComponent
|
| gridSignal |
getgridSignal()
|
|
Signal that emits whenever the internal Kendo Grid instance changes. Useful for components that need to react to grid recreation
Returns :
Signal<GridComponent | null>
|
| gridDomElement | ||||||
getgridDomElement()
|
||||||
|
Returns :
ElementRef
|
||||||
setgridDomElement(kendoGrid: ElementRef)
|
||||||
|
Parameters :
Returns :
void
|
| gridContainer | ||||||
getgridContainer()
|
||||||
|
Returns :
ElementRef
|
||||||
setgridContainer(container: ElementRef)
|
||||||
|
Container element reference for the grid. Uses a setter to apply stretch mode styling when the container becomes available.
Parameters :
Returns :
void
|
| listBox | ||||||
getlistBox()
|
||||||
|
Gets the Kendo ListBox component instance.
Returns :
ListBoxComponent
|
||||||
setlistBox(value: ListBoxComponent)
|
||||||
|
The Kendo ListBox component instance. Uses a setter to trigger setup when the listbox becomes available.
Parameters :
Returns :
void
|
| listDomElement | ||||||
getlistDomElement()
|
||||||
|
Returns :
ElementRef
|
||||||
setlistDomElement(kendoList: ElementRef)
|
||||||
|
Parameters :
Returns :
void
|
| smartDataSource |
getsmartDataSource()
|
|
The Smart Grid's attached {AbstractSmartDataSource}
Returns :
AbstractSmartDataSource
|
| isServerSideSorting |
getisServerSideSorting()
|
|
Whether server-side sorting is enabled on the attached data source.
Returns :
boolean
|
| hasPendingChanges |
gethasPendingChanges()
|
|
Indicates whether the Smart Grid has pending changes.
Returns :
boolean
|
| selectedKeys |
getselectedKeys()
|
|
Returns the selected row keys for template binding.
Returns :
string[]
|
| tableIoSource | ||||||||
gettableIoSource()
|
||||||||
|
Returns the table IO source toolbar name.
Returns :
string
|
||||||||
settableIoSource(value: string)
|
||||||||
|
Sets the table IO source toolbar name.
Parameters :
Returns :
void
|
| exportSource | ||||||||
getexportSource()
|
||||||||
|
Returns the export source toolbar name.
Returns :
string
|
||||||||
setexportSource(value: string)
|
||||||||
|
Sets the export source toolbar name.
Parameters :
Returns :
void
|
| reportTitleTemplate | ||||||||
getreportTitleTemplate()
|
||||||||
|
Returns the report title template.
Returns :
string
|
||||||||
setreportTitleTemplate(value: string)
|
||||||||
|
Sets the report title template.
Parameters :
Returns :
void
|
| reportFooterTemplate | ||||||||
getreportFooterTemplate()
|
||||||||
|
Returns the report footer template.
Returns :
string
|
||||||||
setreportFooterTemplate(value: string)
|
||||||||
|
Sets the report footer template.
Parameters :
Returns :
void
|
| disableTextSelection | ||||||||
getdisableTextSelection()
|
||||||||
|
Returns whether text selection is disabled.
Returns :
boolean
|
||||||||
setdisableTextSelection(value: boolean)
|
||||||||
|
Sets whether text selection is disabled.
Parameters :
Returns :
void
|
| helpUrl | ||||||
gethelpUrl()
|
||||||
|
Returns :
string
|
||||||
sethelpUrl(value: string)
|
||||||
|
Parameters :
Returns :
void
|
| gridSize | ||||||||
getgridSize()
|
||||||||
|
Returns the current grid responsive size category.
Returns :
string
|
||||||||
setgridSize(value: string)
|
||||||||
|
Sets the current grid responsive size category.
Parameters :
Returns :
void
|
| detailForm | ||||||
getdetailForm()
|
||||||
|
The Smart Detail Form for this Smart Grid
Returns :
SmartDetailForm
|
||||||
setdetailForm(val: SmartDetailForm)
|
||||||
|
The Smart Detail Form for this Smart Grid
Parameters :
Returns :
void
|
| useCentralTableIODispatch |
getuseCentralTableIODispatch()
|
|
Whether toolbar TableIO button clicks should be centrally dispatched.
Returns :
boolean
|
| tableIOTargetKey |
gettableIOTargetKey()
|
|
The canonical TableIO registry/activation key; the grid historically identifies itself by its name before the object name.
Returns :
string
|
| isActiveIOTarget |
getisActiveIOTarget()
|
|
True if this Smart Grid is the current active IO target.
Returns :
boolean
|
| isActiveExportTarget |
getisActiveExportTarget()
|
|
True if this Smart Grid is the current active export target.
Returns :
boolean
|
<!--
**************************************************************************
* Copyright © 2006-2026 by Consultingwerk Ltd. ("CW") - *
* www.consultingwerk.com and other contributors as listed *
* below. All Rights Reserved. *
* *
* Software is distributed on an "AS IS", WITHOUT WARRANTY OF ANY *
* KIND, either express or implied. *
* *
* Contributors: *
* *
**************************************************************************
--------------------------------------------------------------------------
File : smart-grid.component.html
Purpose : Template for Smart Grid.
Author(s) : Radu Nicoara
Created : Dec 07, 2017
--------------------------------------------------------------------------
-->
<!-- Reusable grid skeleton template -->
<ng-template #gridSkeletonTemplate>
<div
class="smart-grid-skeleton"
[style.height]="
isStretchMode()
? '100%'
: _heightSignal()
? _heightSignal() + 'px'
: '100%'
"
>
<div class="skeleton-header">
<kendo-skeleton
shape="rectangle"
[width]="'100%'"
[height]="'32px'"
animation="wave"
></kendo-skeleton>
</div>
<div class="skeleton-body">
@for (row of [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]; track row) {
<div class="skeleton-row">
<kendo-skeleton
shape="rectangle"
[width]="'100%'"
[height]="'28px'"
animation="wave"
></kendo-skeleton>
</div>
}
</div>
<div class="skeleton-footer">
<kendo-skeleton
shape="rectangle"
[width]="'200px'"
[height]="'32px'"
animation="wave"
></kendo-skeleton>
</div>
</div>
</ng-template>
@if (isGridReady()) { @defer {
<div
#container
style="width: 100%"
[smart-drag-drop-target]="_allowDropSignal() ? smartDragDropTarget : null"
(onDropped)="handleDataDropped($event)"
[smart-receiving-cursor]="_dragReceiveCursorSignal()"
>
@if (_styleSignal() === 'grid') {
<kendo-grid
#grid
(edit)="handleEdit($event)"
(cellClick)="onCellClickEdit($event)"
[selectable]="gridLayoutSignal()?.selectable || true"
[navigable]="$safeNavigationMigration(gridLayoutSignal()?.navigable)"
[height]="_heightSignal()"
[scrollable]="
_virtualScrollingSignal()
? 'virtual'
: gridLayoutSignal()?.scrollable || 'none'
"
(cancel)="handleCancel($event)"
(save)="handleSave($event)"
[group]="_dataGroupsSignal()"
(groupChange)="onGridGroupChange($event)"
[groupable]="gridLayoutSignal()?.groupable || false"
style="width: 100%"
[sortable]="$safeNavigationMigration(gridLayoutSignal()?.sortable)"
[sort]="_gridSortSignal()"
(columnReorder)="onColumnReorder()"
(columnResize)="onColumnResize()"
(columnVisibilityChange)="onColumnVisibilityChange($event)"
[data]="
boundData()
| gridDataProcess
: _dataGroupsSignal()
: _gridSortSignal()
: isServerSideSorting
"
[pageSize]="
_pageSizeSignal() ||
smartDataSource?.batchSize ||
gridLayoutSignal()?.pageable?.pageSize
"
[pageable]="effectivePageableSettings()"
[loading]="isLoading()"
[rowHeight]="$safeNavigationMigration(gridLayoutSignal()?.rowHeight)"
[detailRowHeight]="
$safeNavigationMigration(gridLayoutSignal()?.detailRowHeight)
"
[filter]="_gridFilterSignal()"
[filterable]="effectiveFilterable()"
[skip]="skip"
[resizable]="$safeNavigationMigration(gridLayoutSignal()?.resizable)"
[reorderable]="
$safeNavigationMigration(gridLayoutSignal()?.reorderable)
"
kendoGridSelectBy="_id"
[selectedKeys]="_selectedKeysSignal()"
[columnMenu]="menuSettings"
>
@if (_allowDragSignal()) {
<kendo-grid-column [width]="35">
<ng-template kendoGridCellTemplate let-dataItem>
<div
class="w-100 h-100 text-center"
smart-droppable
[droppableData]="dataItem"
>
<div
class="w-100 h-100 text-center pb-1"
[attr.smartGridDroppableRow]="rowDropTargetId"
>
<span
[class]="
_dragHandleIconClassSignal() ||
'fa-solid fa-bars'
"
></span>
</div>
</div>
</ng-template>
</kendo-grid-column>
} @if (gridLayoutSignal()?.selectable?.showCheckboxes) {
<kendo-grid-checkbox-column [width]="40" [autoSize]="false">
<ng-template kendoGridHeaderTemplate>
<input
kendoCheckBox
type="checkbox"
id="selectAllCheckbox"
kendoGridSelectAllCheckbox
/>
</ng-template>
</kendo-grid-checkbox-column>
} @for (column of gridLayoutSignal()?.columns; track column.field ||
$index) { @if (column.type !== 'command') { @if (!column.windowSizes ||
column.windowSizes.indexOf(_gridSizeSignal()) >= 0) {
<kendo-grid-column
[hidden]="column.hidden === true"
[sortable]="column._computedSortable"
[format]="column._computedColumnFormat"
[filterable]="columnEffectivelyFilterable(column)"
[width]="column.width"
[minResizableWidth]="column.type === 'badge' ? (column._badgeMinWidth ?? column.width) : 10"
[editor]="column._computedEditor"
[field]="!!column.template ? undefined : column.field"
[title]="column.title"
[class]="cellClassFor(column)"
[headerClass]="cellClassFor(column)"
[filterClass]="cellClassFor(column)"
>
<ng-template kendoGridHeaderTemplate>
<div class="smart-grid-column-header" [attr.data-field]="column.field">
<span class="column-title">{{ column.title }}</span>
@if (column._computedHeaderButtons?.length) {
<span class="header-buttons">
@for (btn of column._computedHeaderButtons; track btn.buttonName) {
@if (btn.buttonIcon) {
<button
kendoButton
[iconClass]="btn.buttonIcon"
[title]="btn.buttonLabel"
class="smart-grid-column-header-button"
(click)="handleHeaderButtonClicked(column, btn)"
></button>
} @else if (btn.resolvedImageUrl) {
<button
kendoButton
[imageUrl]="btn.resolvedImageUrl"
[title]="btn.buttonLabel"
class="smart-grid-column-header-button"
(click)="handleHeaderButtonClicked(column, btn)"
></button>
} }
</span>
}
</div>
</ng-template>
@if (columnEffectivelyFilterable(column)) {
<ng-template kendoGridFilterCellTemplate let-ff>
<div
#filterCellWrapper
class="smart-grid-filter-cell-wrapper"
[attr.data-field]="column.field"
(keydown)="onEscKey($event, column, filterCellWrapper)"
(click)="
onFilterCellClick($event, column, filterCellWrapper)
"
>
@switch (column._computedEditor) { @case ('combo') {
<smart-grid-combo-filter
[valueList]="column.valueList"
[filter]="_gridFilterSignal()"
[field]="column.field"
>
</smart-grid-combo-filter>
} @case ('text') {
<kendo-grid-string-filter-cell
[filter]="ff"
[operator]="getDefaultOperator(column)"
[column]="column"
>
<kendo-filter-eq-operator></kendo-filter-eq-operator>
<kendo-filter-neq-operator></kendo-filter-neq-operator>
<kendo-filter-startswith-operator></kendo-filter-startswith-operator>
<kendo-filter-endswith-operator></kendo-filter-endswith-operator>
<kendo-filter-isnull-operator></kendo-filter-isnull-operator>
<kendo-filter-isnotnull-operator></kendo-filter-isnotnull-operator>
<kendo-filter-contains-operator></kendo-filter-contains-operator>
</kendo-grid-string-filter-cell>
} @case ('date') {
<kendo-grid-date-filter-cell
[filter]="ff"
[format]="column._computedColumnFormat"
[operator]="getDefaultOperator(column)"
[column]="column"
></kendo-grid-date-filter-cell>
} @case ('numeric') {
<kendo-grid-numeric-filter-cell
[filter]="ff"
[spinners]="false"
[format]="column._computedColumnFormat"
[operator]="getDefaultOperator(column)"
[column]="column"
[min]="
column.ablType === 'int64'
? minInt64
: column.ablType === 'integer'
? minInteger
: null
"
[max]="
column.ablType === 'int64'
? maxInt64
: column.ablType === 'integer'
? maxInteger
: null
"
></kendo-grid-numeric-filter-cell>
} @case ('boolean') {
<smart-grid-checkbox-filter-cell
[filter]="ff"
[field]="column.field"
></smart-grid-checkbox-filter-cell>
} }
</div>
</ng-template>
}
<ng-template kendoGridCellTemplate let-dataItem="dataItem">
<smart-grid-cell
[attr.data-field]="column.field"
[column]="column"
[dataItem]="dataItem"
[shouldTruncateText]="shouldTruncateText"
[rowHeight]="rowHeight()"
[gridImages]="_gridImagesSignal()"
[showDateTimeZone]="showDateTimeZone"
[useDateTimeZones]="preferencesService.useDateTimeZones()"
></smart-grid-cell>
</ng-template>
@if (column.aggregate && column.groupAggregateTextTemplate) {
<ng-template
kendoGridGroupFooterTemplate
let-aggregates="aggregates"
>
<smart-grid-column-footer
[column]="column"
[template]="column.groupAggregateTextTemplate"
[aggregateType]="column.aggregate"
[groupAggregates]="aggregates"
></smart-grid-column-footer>
</ng-template>
} @if (column.aggregate && column.aggregateTextTemplate) {
<ng-template kendoGridFooterTemplate>
<smart-grid-column-footer
[column]="column"
[template]="column.aggregateTextTemplate"
[aggregateType]="column.aggregate"
[aggregateValue]="dataAggregates()[column.field]"
></smart-grid-column-footer>
</ng-template>
} @if (typeof column.editor?.inputType === 'string' ||
column._computedIsDateTimeTZ) {
<ng-template kendoGridEditTemplate let-dataItem>
<smart-grid-edit-cell
[column]="column"
[dataItem]="dataItem"
[formGroup]="currentFormGroup"
[dataSource]="smartDataSource"
[showDateTimeZone]="showDateTimeZone"
[useDateTimeZones]="preferencesService.useDateTimeZones()"
></smart-grid-edit-cell>
</ng-template>
}
</kendo-grid-column>
} } @else {
<kendo-grid-command-column
[width]="column.width"
[title]="column.title || ''"
>
<ng-template kendoGridHeaderTemplate>
{{ column.title || '' }}
</ng-template>
<ng-template kendoGridCellTemplate let-dataItem>
<div
class="smart-grid-command-cell"
[style.maxHeight.px]="rowHeight()"
>
@if (column.form) {
<button
kendoButton
class="smart-grid-command-button"
[style.max-height.px]="commandButtonHeight()"
[iconClass]="column._computedCommandButtonIconClass"
[imageUrl]="column._computedCommandButtonImageUrl"
[title]="column._computedCommandButtonTitle"
(click)="navigateToCommandForm(column, dataItem)"
>
@if (column._computedShowCommandButtonText) {
{{ column.text }}
}
</button>
} @if (column.action && !column.form) {
<button
kendoButton
class="smart-grid-command-button"
[style.max-height.px]="commandButtonHeight()"
[iconClass]="column._computedCommandButtonIconClass"
[imageUrl]="column._computedCommandButtonImageUrl"
[title]="column._computedCommandButtonTitle"
(click)="commandButtonClicked(column, dataItem)"
>
@if (column._computedShowCommandButtonText) {
{{ column.text }}
}
</button>
}
</div>
</ng-template>
</kendo-grid-command-column>
} } @if (gridLayoutSignal()?.editable?.mode === 'inline') {
<kendo-grid-command-column
[title]="gridLayoutSignal()?.editButtonTitle || ''"
[width]="200"
class="edit-cell"
>
<ng-template kendoGridHeaderTemplate>
{{ gridLayoutSignal()?.editButtonTitle || '' }}
</ng-template>
<ng-template kendoGridCellTemplate let-isNew="isNew">
<button kendoGridEditCommand>
{{ editButtonLabels.edit }}
</button>
<button
kendoGridSaveCommand
[disabled]="!currentFormGroup?.valid"
>
{{ editButtonLabels.save }}
</button>
<button kendoGridCancelCommand>
{{ editButtonLabels.cancel }}
</button>
</ng-template>
</kendo-grid-command-column>
} @if (gridLayoutSignal()?.detailTemplate) {
<div *kendoGridDetailTemplate="let dataItem">
<smart-grid-detail-template
[dataItem]="dataItem"
[formConfiguration]="
$safeNavigationMigration(gridLayoutSignal()?.detailTemplate)
"
></smart-grid-detail-template>
</div>
}
<kendo-grid-messages
[noRecords]="(showNoRecords && messages.noRecords) || ''"
>
</kendo-grid-messages>
@if (_exportSourceSignal()) {
<kendo-grid-excel
[fileName]="excelFileName"
[fetchData]="provideExcelExportData"
>
@if (excelExportColumns?.length > 0) { @for (col of
gridLayoutSignal()?.columns; track col.field) { @if (col.field &&
excelExportColumns.indexOf(col.field) > -1) {
<kendo-excelexport-column
[field]="col.field"
[title]="col.title || col.field"
[width]="col.width"
>
</kendo-excelexport-column>
} } }
</kendo-grid-excel>
}
</kendo-grid>
@if (showGridContextMenu()) {
<kendo-contextmenu
#gridmenu
size="small"
[collision]="{ horizontal: 'fit', vertical: 'flip' }"
[popupAnimate]="{ type: 'fade', duration: 100, direction: 'down' }"
(select)="onContextMenuItemSelected($event)"
>
<kendo-menu-item
text="Remember filters"
[icon]="
preferencesService.rememberFilters()
? 'checkbox-checked'
: 'checkbox'
"
[data]="'remember-filters'"
[disabled]="
!preferencesService.preferencesReady() ||
!hasRememberFilterContextMenuItems()
"
>
</kendo-menu-item>
<kendo-menu-item
text="Apply filters"
icon="filter"
[data]="'apply-filters'"
[disabled]="!pendingFilters().length"
>
</kendo-menu-item>
<kendo-menu-item
text="Clear filters"
icon="filter-clear"
[data]="'clear-filters'"
[disabled]="
!_appliedGridFilterSignal()?.filters?.length &&
!pendingFilters().length
"
>
</kendo-menu-item>
<kendo-menu-item
text="Use timezones"
[icon]="
preferencesService.useDateTimeZones()
? 'checkbox-checked'
: 'checkbox'
"
[data]="'use-date-time-zones'"
[disabled]="
!preferencesService.preferencesReady() ||
!hasDateTimeTZSelectorPreferenceContextMenuItem()
"
>
</kendo-menu-item>
</kendo-contextmenu>
} } @if (_styleSignal() === 'list') {
<kendo-listbox
#list
kendoListBoxDataBinding
[data]="_itemsSignal()"
[toolbar]="false"
[style.height]="gridLayoutSignal()?.height || _heightSignal() || 0"
(selectionChange)="handleListBoxSelectionChange($event)"
>
@if (_itemsSignal() && _itemsSignal().length > 0) {
<ng-template kendoListBoxItemTemplate let-dataItem>
@if (_viewSignal()) {
<div class="smart-list-item">
<span>{{ getTemplateValue(dataItem) }}</span>
</div>
} @else {
<div class="smart-list-item">
@for (column of gridLayoutSignal()?.columns; track column.field)
{
<span>{{ dataItem[column.field] }} </span>
}
</div>
}
</ng-template>
}
</kendo-listbox>
}
<kendo-resize-sensor (resize)="resize()"></kendo-resize-sensor>
@if (_exportSourceSignal()) {
<smart-grid-pdf-export
#pdfExport
[data]="pdfExportData"
[shouldTruncateText]="false"
[columns]="pdfExportColumns"
[fileName]="pdfFileName"
[paperSize]="pdfPaperSize"
[landscape]="pdfLandscape"
[scale]="0.8"
[repeatHeaders]="true"
[margin]="{ top: '1cm', right: '1cm', bottom: '2cm', left: '1cm' }"
[gridImages]="_gridImagesSignal()"
[reportTitleTemplate]="_reportTitleTemplateSignal()"
[reportFooterTemplate]="_reportFooterTemplateSignal()"
[showDateTimeZone]="showDateTimeZone"
[useDateTimeZones]="preferencesService.useDateTimeZones()"
>
</smart-grid-pdf-export>
}
</div>
} @loading (minimum 100ms) {
<!-- Loading placeholder while grid components initialize -->
<ng-container *ngTemplateOutlet="gridSkeletonTemplate"></ng-container>
} @placeholder {
<!-- Placeholder before loading starts -->
<ng-container *ngTemplateOutlet="gridSkeletonTemplate"></ng-container>
} } @else {
<!-- Kendo Skeleton placeholder while grid layout is being processed -->
<ng-container *ngTemplateOutlet="gridSkeletonTemplate"></ng-container>
}
./smart-grid.component.scss
/**********************************************************************
* Copyright © 2006-2026 by Consultingwerk Ltd. ("CW") - *
* www.consultingwerk.com and other contributors as listed *
* below. All Rights Reserved. *
* *
* Software is distributed on an "AS IS", WITHOUT WARRANTY OF ANY *
* KIND, either express or implied. *
* *
* Contributors: *
* *
**********************************************************************/
/*------------------------------------------------------------------------
File : smart-grid.component.css
Purpose : Styles for Smart Grid.
Author(s) : Radu Nicoara
Created : Apr 20, 2017
----------------------------------------------------------------------*/
/* Host element styling to ensure height propagates correctly in flex layouts */
:host {
display: block;
height: 100%;
}
@keyframes spin {
to { transform: rotate(1turn); }
}
::ng-deep .progress {
position: relative;
display: inline-block;
width: 5em;
height: 5em;
margin: 0 .5em;
font-size: var(--kendo-font-size-xs, 0.75rem);
text-indent: 999em;
overflow: hidden;
animation: spin 1s infinite steps(8);
background: transparent;
box-shadow: none !important;
position: absolute;
top: 0; left: 0; bottom: 0; right: 0;
margin: auto;
}
::ng-deep .small.progress {
font-size: var(--kendo-font-size-2xs, 0.625rem);
}
::ng-deep .large.progress {
font-size: var(--kendo-font-size-xl, 1.5rem);
}
::ng-deep .progress:before,
::ng-deep .progress:after,
::ng-deep .progress > div:before,
::ng-deep .progress > div:after {
content: '';
position: absolute;
top: 0;
left: 2.25em; /* (container width - part width)/2 */
width: .5em;
height: 1.5em;
border-radius: .2em;
background: var(--kendo-color-border-alt, #e0e0e0);
transform-origin: 50% 2.5em; /* container height / 2 */
}
::ng-deep .progress:before {
background: var(--kendo-color-primary, #0d6efd);
}
::ng-deep .progress:after {
transform: rotate(-45deg);
background: var(--kendo-color-primary-hover, #0b5ed7);
}
::ng-deep .progress > div:before {
transform: rotate(-90deg);
background: var(--kendo-color-primary-active, #0a58ca);
}
::ng-deep .progress > div:after {
transform: rotate(-135deg);
background: var(--kendo-color-border, #dee2e6);
}
::ng-deep .non-sortable {
cursor: default !important;
}
::ng-deep .smart-table-cell {
width: 100%;
}
::ng-deep .smart-table-cell.truncated {
height: 1.333em;
line-height: 1;
min-width: 0;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
::ng-deep .smart-table-cell.truncated .smart-grid-datetime-tz-value,
::ng-deep .smart-table-cell.truncated > span:only-child:not(.image-description) {
display: inline;
line-height: inherit;
vertical-align: baseline;
}
::ng-deep smart-badge.smart-table-cell.truncated,
::ng-deep .smart-table-cell.truncated:has(.cell-image),
::ng-deep .smart-table-cell.truncated:has(> img) {
display: inline-flex !important;
align-items: center;
gap: var(--kendo-spacing-1, 0.25rem);
max-width: 100%;
min-width: 0;
width: auto;
}
::ng-deep .smart-table-cell.truncated:has(.cell-image) > span,
::ng-deep .smart-table-cell.truncated:has(> img) > span,
::ng-deep .smart-table-cell.truncated .image-description,
::ng-deep smart-badge.smart-table-cell.truncated .smart-badge-text {
display: inline-block;
line-height: normal;
max-width: 100%;
min-width: 0;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
vertical-align: middle;
}
::ng-deep .smart-table-cell.text-wrap {
word-break: break-word;
}
::ng-deep .k-grid.truncated table {
table-layout: fixed;
}
::ng-deep smart-grid .smart-grid-column-header {
display: flex;
align-items: center;
justify-content: flex-start;
width: 100%;
gap: 0.25rem;
height: 100% !important;
min-height: 0;
}
::ng-deep smart-grid .smart-grid-column-header .column-title {
flex: 1;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
::ng-deep smart-grid .smart-grid-column-header .header-buttons {
display: flex;
align-items: center;
gap: 2px;
flex-shrink: 0;
margin-left: auto;
height: 100%;
min-height: 0;
}
::ng-deep smart-grid .smart-grid-column-header .smart-grid-column-header-button.k-button {
display: inline-flex;
align-items: center;
justify-content: center;
box-sizing: border-box;
min-width: unset !important;
height: 100% !important;
min-height: 0 !important;
max-height: 100% !important;
line-height: 1 !important;
}
::ng-deep smart-grid .smart-grid-column-header .smart-grid-column-header-button.k-button .k-button-icon,
::ng-deep smart-grid .smart-grid-column-header .smart-grid-column-header-button.k-button .k-icon {
display: inline-flex;
align-items: center;
justify-content: center;
height: 100%;
line-height: 1;
vertical-align: middle;
align-self: center;
margin-top: 0 !important;
margin-bottom: 0 !important;
}
.image-description {
margin-left: var(--kendo-spacing-1, 0.375rem);
margin-right: var(--kendo-spacing-1, 0.375rem);
vertical-align: middle;
}
.cell-image {
margin-right: 0.3em;
vertical-align: middle;
}
::ng-deep .smart-table-cell .cell-image {
margin-right: 5px;
}
::ng-deep .smart-table-cell:not(.truncated) span {
vertical-align: middle;
}
::ng-deep .smart-grid-disabled-overlay {
opacity: var(--smart-disabled-overlay-opacity, 0.6);
background-color: var(--smart-disabled-overlay-background-color, var(--kendo-color-subtle, #f8f9fa));
/* Minimum z-index that is higher than the Kendo UI Grid's pager z-index */
z-index: 3;
}
::ng-deep .k-grid-table-wrap, ::ng-deep .k-grid-table,
::ng-deep .k-grid-header-wrap table {
width: 100% !important;
}
::ng-deep .item-border {
padding: var(--kendo-spacing-2, 0.625rem);
border-bottom: 1px solid var(--kendo-color-border, #dee2e6);
}
::ng-deep .k-listbox {
width: 100%;
}
::ng-deep .k-listbox .k-list-ul {
list-style-type: none;
}
::ng-deep smart-grid kendo-grid tr td.k-focus,
::ng-deep smart-grid kendo-grid tr.k-focus,
::ng-deep smart-grid kendo-grid th.k-focus {
background-color: inherit !important;
}
/* Skeleton placeholder styles for grid loading state */
.smart-grid-skeleton {
display: flex;
flex-direction: column;
width: 100%;
gap: var(--kendo-spacing-1, 0.125rem);
padding: var(--kendo-spacing-2, 0.5rem);
border: 1px solid var(--kendo-color-border, #dee2e6);
border-radius: var(--kendo-border-radius-md, 0.25rem);
background-color: var(--kendo-color-surface, #ffffff);
box-sizing: border-box;
}
.smart-grid-skeleton .skeleton-header {
margin-bottom: var(--kendo-spacing-1, 0.25rem);
}
.smart-grid-skeleton .skeleton-body {
display: flex;
flex-direction: column;
flex: 1;
gap: var(--kendo-spacing-1, 0.25rem);
overflow: hidden;
}
.smart-grid-skeleton .skeleton-row {
width: 100%;
}
.smart-grid-skeleton .skeleton-footer {
margin-top: var(--kendo-spacing-1, 0.25rem);
display: flex;
justify-content: flex-end;
}
::ng-deep .grid-context-menu-item {
display: contents;
cursor: pointer;
}
::ng-deep .k-animation-container.k-context-menu-popup {
z-index: 99999999 !important;
}
.smart-grid-command-cell {
display: flex;
align-items: center;
height: 100%;
max-height: 100%;
box-sizing: border-box;
}
::ng-deep .smart-grid-command-button {
max-height: 100%;
box-sizing: border-box;
display: inline-flex;
align-items: center;
}
::ng-deep .smart-grid-command-button .k-button-icon,
::ng-deep .smart-grid-command-button .k-icon,
::ng-deep .smart-grid-command-button .k-image {
min-width: 0 !important;
min-height: 0 !important;
max-width: 100%;
max-height: inherit;
width: auto;
height: auto;
display: inline-flex;
align-items: center;
justify-content: center;
flex-shrink: 0;
}
::ng-deep .smart-grid-command-button .k-image img,
::ng-deep .smart-grid-command-button img.k-image,
::ng-deep .smart-grid-command-button .k-button-icon img,
::ng-deep .smart-grid-command-button .k-icon img {
max-width: 100%;
max-height: inherit;
width: auto;
height: auto;
object-fit: contain;
display: block;
}
::ng-deep button.smart-grid-command-button.k-button-md.k-icon-button {
padding-inline: var(--kendo-button-md-padding-x, var(--kendo-spacing-2, 0.5rem));
}
./smart-grid-pdf-styles.scss
/**********************************************************************
* Copyright © 2006-2026 by Consultingwerk Ltd. ("CW") - *
* www.consultingwerk.com and other contributors as listed *
* below. All Rights Reserved. *
* *
* Software is distributed on an "AS IS", WITHOUT WARRANTY OF ANY *
* KIND, either express or implied. *
* *
* Contributors: *
* *
**********************************************************************/
/*------------------------------------------------------------------------
File : smart-grid-pdf-styles.scss
Purpose : Styles for Smart Grid Pdf Styles.
Author(s) : Radu Nicoara
Created : May 08, 2025
----------------------------------------------------------------------*/
::ng-deep {
.smart-grid-pdf-page-number {
position: absolute;
bottom: 30px;
left: 30px;
right: 30px;
text-align: center;
color: #888;
}
@media print {
.k-selected {
background-color: inherit !important;
}
}
}