File

src/ui/grid/smart-grid.component.ts

Extends

SmartTableIOTargetBase

Implements

OnInit DoCheck AfterViewInit OnDestroy

Metadata

Index

Properties
Methods
Inputs
Outputs
HostListeners
Accessors

Constructor

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 :
Name Type Optional
registry DataSourceRegistry No
gridRegistry SmartGridRegistryService No
smartConfig SmartConfig No
smartServiceAdapter SmartServiceAdapter No
smartHttp SmartHttpService No
screenService SmartScreenService No
navigationService SmartNavigationService No
vcRef ViewContainerRef No
route ActivatedRoute No
changeDetector ChangeDetectorRef No
intlService IntlService No
domSanitizer DomSanitizer No
toolbarRegistry SmartToolbarRegistry No
renderer Renderer2 No
elementRef ElementRef No
logicClassesHelperService SmartLogicClassesHelperService No
floatingWindowHelper FloatingWindowHelperService No
injector Injector No

Inputs

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

Outputs

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>

HostListeners

click
Arguments : '$event'
click(event: MouseEvent)

Opens inline row editing when the user clicks anywhere on a data row. Kendo's cellClick output is not emitted for a click on the row that is already selected/active, which otherwise made it impossible to edit the initially selected row without first selecting a different one. This native click fallback derives the row from the DOM (data-kendo-grid-item-index) so editing starts reliably regardless of the current selection.

Parameters :
Name Optional Description
event No
  • The native click event.
contextmenu
Arguments : '$event'
contextmenu(event: MouseEvent)

Triggers the display of the grid context menu on right-click in kendo-grid

Parameters :
Name Optional
event No
dblclick
Arguments : '$event'
dblclick(event: MouseEvent)
Parameters :
Name Optional
event No
keydown
Arguments : '$event.key'
keydown(key: string)
Parameters :
Name Optional
key No
keyup.enter
Arguments : '$event'
keyup.enter(event: Event)

Handles keypress events to apply filters when the Enter key is pressed

Parameters :
Name Optional
event No
mousemove
Arguments : '$event.target'
mousemove(eventTarget: EventTarget)
Parameters :
Name Optional
eventTarget No

Methods

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 :
Name Type Optional Description
state SmartGridViewState No
  • The view state to apply.
options literal type Yes
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 :
Name Type Optional Description
methodName string No
  • The name of the method to call.
args any[] No
  • An array of arguments to pass to the method.
Returns : any
Public callLogicMethod
callLogicMethod(methodName: string, ...args: any[])

Calls a method on the logic class instances

Parameters :
Name Type Optional Description
methodName string No
  • The method name to call
args any[] No
  • Arguments to pass to the method
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 :
Name Type Optional
field string No
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

Parameters :
Name Type Optional
cmd any No
dataItem any No
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 :
Name Type Optional
column any No
Returns : any
Public getDataSource
getDataSource(dataSourceName?: string)

Returns the datasource as an observable

Parameters :
Name Type Optional Description
dataSourceName string Yes
  • The name of the datasource to return. If not provided, the grid's datasource is returned.

the datasource

Public getDefaultOperator
getDefaultOperator(column: any)

Returns the default filter operator for the given column.

Parameters :
Name Type Optional
column any No
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

the toolbar that is used as the table IO source

Public getTemplateValue
getTemplateValue(record: any)
Parameters :
Name Type Optional
record any No
Returns : any
Public getToolbarDispatchPolicy
getToolbarDispatchPolicy(button: SmartToolbarButtonComponent)

Returns the click-time toolbar dispatch policy for this grid.

Parameters :
Name Type Optional Description
button SmartToolbarButtonComponent No

The clicked toolbar button.

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 :
Name Type Optional
ev any No
Returns : void
Public handleCopy
handleCopy()

Handles a copy command

Returns : void
Public handleDataDropped
handleDataDropped(ev: SmartDragDropEvent)

Handles data drop events

Parameters :
Name Type Optional
ev SmartDragDropEvent No
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 :
Name Type Optional
ev any No
Returns : any
Public handleExport
handleExport(exportType: SmartExportType)

Handles export events

Parameters :
Name Type Optional
exportType SmartExportType No
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 :
Name Type Optional
newLayout any No
Returns : void
Public handleListBoxSelectionChange
handleListBoxSelectionChange(ev: ListBoxSelectionEvent)
Parameters :
Name Type Optional
ev ListBoxSelectionEvent No
Returns : void
Public handleSave
handleSave(ev: any)

Handles a save command button click

Parameters :
Name Type Optional
ev any No
Returns : void
Public handleToolbarButton
handleToolbarButton(button: SmartToolbarButtonComponent, context?: TableIOToolbarDispatchContext)

Handles a toolbar button click routed through the active TableIO target.

Parameters :
Name Type Optional Description
button SmartToolbarButtonComponent No

The clicked toolbar button.

context TableIOToolbarDispatchContext Yes

The accepted click state.

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 :
Name Type Optional
field string No
Returns : boolean

boolean

Public isRowAtIndexVisible
isRowAtIndexVisible(rowIndex: number)

Checks if a row at a specific index is visible in the grid

Parameters :
Name Type Optional Description
rowIndex number No
  • The index of the row to check
Returns : boolean

true if the row is visible, false otherwise

Public navigateGridSelection
navigateGridSelection(direction: "up" | "down")
Parameters :
Name Type Optional
direction "up" | "down" No
Returns : void
navigateToCommandForm
navigateToCommandForm(cmd: any, dataItem: any)

Triggers navigation to the form associated with the given command

Parameters :
Name Type Optional
cmd any No
dataItem any No
Returns : void
onDoubleClick
onDoubleClick(event: MouseEvent)
Decorators :
@HostListener('dblclick', ['$event'])
Parameters :
Name Type Optional
event MouseEvent No
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 :
Name Type Optional Default value
groups GroupDescriptor[] No
refreshForGrouping unknown No true
Returns : void
Public onKeyDown
onKeyDown(key: string)
Decorators :
@HostListener('keydown', ['$event.key'])
Parameters :
Name Type Optional
key string No
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 :
Name Type Optional
event Event No
Returns : void
onRowMouseOver
onRowMouseOver(eventTarget: EventTarget)
Decorators :
@HostListener('mousemove', ['$event.target'])
Parameters :
Name Type Optional
eventTarget EventTarget No
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 :
Name Type Optional Description
fieldName string No

The changed field name.

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 :
Name Type Optional
options literal type Yes
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 :
Name Type Optional Description
rowIndex number No
  • The index of the row to scroll to
Returns : void
selectByIndex
selectByIndex(index: number)

Selects a row by index

Parameters :
Name Type Optional
index number No
Returns : void
Public setRuntimeSsehFieldEnabledState
setRuntimeSsehFieldEnabledState(fieldName: string, enabledState: string | undefined)

Stores a runtime SSEH enabled-state override for the active edit row.

Parameters :
Name Type Optional Description
fieldName string No

The grid field name.

enabledState string | undefined No

The runtime enabled state.

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 :
Name Type Optional Description
toolbar ISmartTableIOSource No
  • The toolbar to sync
Returns : void
Public handleSuppressedToolbarButton
handleSuppressedToolbarButton(button: SmartToolbarButtonComponent, context: TableIOToolbarDispatchContext)

Performs target-specific UI cleanup after a consumer suppresses central toolbar dispatch.

Parameters :
Name Type Optional Description
button SmartToolbarButtonComponent No

The clicked toolbar button.

context TableIOToolbarDispatchContext No

The accepted click state.

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 :
Name Type Optional
objectName string No
Returns : void

void

Properties

_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

Accessors

gridSort
getgridSort()

Returns the grid sort descriptors.

Returns : SortDescriptor[]
setgridSort(value: SortDescriptor[])

Sets the grid sort descriptors.

Parameters :
Name Type Optional Description
value SortDescriptor[] No
  • The sort descriptors.
Returns : void
_gridImages
get_gridImages()

Returns the grid column image info.

set_gridImages(value: SmartGridColumnImageInfo)

Sets the grid column image info.

Parameters :
Name Type Optional Description
value SmartGridColumnImageInfo No
  • The grid images.
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 :
Name Type Optional Description
value string No
  • The instance name.
Returns : void
width
getwidth()
Returns : number
setwidth(value: number)
Parameters :
Name Type Optional
value number No
Returns : void
height
getheight()

Returns the grid height.

Returns : number
setheight(value: number)

Sets the grid height.

Parameters :
Name Type Optional Description
value number No
  • The height value.
Returns : void
virtualScrolling
getvirtualScrolling()

Returns whether virtual scrolling is enabled.

Returns : boolean
setvirtualScrolling(value: boolean)

Sets the virtual scrolling mode.

Parameters :
Name Type Optional Description
value boolean No
  • Whether virtual scrolling is enabled.
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 :
Name Type Optional Description
value boolean | undefined No
  • The component-level display override.
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 :
Name Type Optional Description
value string No
  • The data source name.
Returns : void
sortable
getsortable()

Returns whether sorting is enabled.

Returns : boolean
setsortable(value: boolean)

Sets whether sorting is enabled.

Parameters :
Name Type Optional Description
value boolean No
  • Whether sorting is enabled.
Returns : void
pageable
getpageable()

Returns the pageable property value. @memberof SmartGridComponent

Returns : boolean
setpageable(value: boolean)

Enables or disables paging capabilities

Parameters :
Name Type Optional
value boolean No
Returns : void
filterable
getfilterable()

Returns whether global grid filtering is enabled.

Returns : boolean
setfilterable(value: boolean)

Sets whether global grid filtering is enabled.

Parameters :
Name Type Optional Description
value boolean No
  • Whether filtering is enabled.
Returns : void
pageSize
getpageSize()

Returns the page size.

Returns : number
setpageSize(value: number)

Sets the page size.

Parameters :
Name Type Optional Description
value number No
  • The page size.
Returns : void
defaultActionBehavior
getdefaultActionBehavior()

Returns the default action behavior.

Returns : TableIOAction
setdefaultActionBehavior(value: TableIOAction)

Sets the default action behavior.

Parameters :
Name Type Optional Description
value TableIOAction No
  • The default behavior.
Returns : void
doubleClickAction
getdoubleClickAction()

Returns the double-click action.

setdoubleClickAction(value: GridDoubleClickAction)

Sets the double-click action.

Parameters :
Name Type Optional Description
value GridDoubleClickAction No
  • The double-click action.
Returns : void
promptBeforeExport
getpromptBeforeExport()

Returns the prompt before export flag value.

Returns : string
setpromptBeforeExport(value: string)

Sets whether prompting before export is enabled.

Parameters :
Name Type Optional Description
value string No
  • The prompt flag value.
Returns : void
dropSource
getdropSource()

Returns the drop source identifier.

Returns : string
setdropSource(value: string)

Sets the drop source identifier.

Parameters :
Name Type Optional Description
value string No
  • The drop source.
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 :
Name Type Optional Description
value boolean | undefined No
  • Whether drop is allowed.
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 :
Name Type Optional Description
value boolean | undefined No
  • Whether drag is allowed.
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 :
Name Type Optional Description
value string | unknown | undefined No
  • The cursor or cursor function.
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 :
Name Type Optional Description
value string | undefined No
  • The icon class.
Returns : void
style
getstyle()

Returns the grid display style (grid/list).

Returns : string
setstyle(value: string)

Sets the grid display style (grid/list).

Parameters :
Name Type Optional Description
value string No
  • The style value.
Returns : void
view
getview()

Returns the list view template.

Returns : string
setview(value: string)

Sets the list view template.

Parameters :
Name Type Optional Description
value string No
  • The template for the list.
Returns : void
items
getitems()

Returns the grid items array.

Returns : any[]
setitems(value: any[])

Sets the grid items array.

Parameters :
Name Type Optional Description
value any[] No
  • The items.
Returns : void
dataDropHandler
getdataDropHandler()

Returns the grid drop handler.

Returns : void
setdataDropHandler(value: (ev: SmartGridDropEvent) => void)

Sets the grid drop handler.

Parameters :
Name Type Optional Description
value function No
  • The handler function.
Returns : void
gridLayoutUrl
getgridLayoutUrl()
Returns : any
setgridLayoutUrl(value: any)

If specified, the SmartGrid will attempt to fetch its layout from the specified URL.

Parameters :
Name Type Optional
value any No
Returns : void
pageIndex
getpageIndex()

The current page index.

Returns : number
skip
getskip()

Number of records to skip.

Returns : number
setskip(value: number)
Parameters :
Name Type Optional
value number No
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 :
Name Type Optional
value boolean No
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 :
Name Type Optional
value GridComponent No
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 :
Name Type Optional
kendoGrid ElementRef No
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 :
Name Type Optional
container ElementRef No
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 :
Name Type Optional
value ListBoxComponent No
Returns : void
listDomElement
getlistDomElement()
Returns : ElementRef
setlistDomElement(kendoList: ElementRef)
Parameters :
Name Type Optional
kendoList ElementRef No
Returns : void
smartDataSource
getsmartDataSource()

The Smart Grid's attached {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 :
Name Type Optional Description
value string No
  • The toolbar name.
Returns : void
exportSource
getexportSource()

Returns the export source toolbar name.

Returns : string
setexportSource(value: string)

Sets the export source toolbar name.

Parameters :
Name Type Optional Description
value string No
  • The toolbar name.
Returns : void
reportTitleTemplate
getreportTitleTemplate()

Returns the report title template.

Returns : string
setreportTitleTemplate(value: string)

Sets the report title template.

Parameters :
Name Type Optional Description
value string No
  • The template string.
Returns : void
reportFooterTemplate
getreportFooterTemplate()

Returns the report footer template.

Returns : string
setreportFooterTemplate(value: string)

Sets the report footer template.

Parameters :
Name Type Optional Description
value string No
  • The template string.
Returns : void
disableTextSelection
getdisableTextSelection()

Returns whether text selection is disabled.

Returns : boolean
setdisableTextSelection(value: boolean)

Sets whether text selection is disabled.

Parameters :
Name Type Optional Description
value boolean No
  • The disable flag.
Returns : void
helpUrl
gethelpUrl()
Returns : string
sethelpUrl(value: string)
Parameters :
Name Type Optional
value string No
Returns : void
gridSize
getgridSize()

Returns the current grid responsive size category.

Returns : string
setgridSize(value: string)

Sets the current grid responsive size category.

Parameters :
Name Type Optional Description
value string No
  • The size category.
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 :
Name Type Optional
val SmartDetailForm No
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] }}&nbsp;</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;
        }
    }
}
Legend
Html element
Component
Html element with directive

results matching ""

    No results matching ""