Skip to Content

Error when using custom column in UI5 Smart Table

Hi experts,

i have created a normal oData-service(standard-annotations not vocabulary-based-annotations) in the backend and wanted to use this with a smart table. It worked very good. Then i wanted to add a custom column to display an icon.

But then there comes an uncaught exception which says "The table instance provided contain some columns for which a columnKey is provided, some for which a columnKey is not provided. This is not allowed !"

My coding for the smarttable in the view:

<smartTable:SmartTable 
	id="smartTable_ResponsiveTable"
	tableType="ResponsiveTable" 
	editable="false"
	entitySet="PRESSet" 
	useVariantManagement="true"
	useTablePersonalisation="true" 
	showRowCount="true"
	showFullScreenButton="true"
	useExportToExcel="true" 
	initiallyVisibleFields="Pernr,Nachn,Vorna,StatusIcon,Status"
	demandPopin="true"
	enableAutoBinding="true">
				
	     <Table>
		<columns>
		<Column width="100px">
		<customData>
		<core:CustomData key="p13nData"
		value='\{"columnKey": "Icon", "maxLength": "5",
                "columnIndex":"4", "leadingProperty": "Icon"}' />
		</customData>
		<Text text="StatusIcon" />
		</Column>
		</columns>
		<items>
		<ColumnListItem>
			<cells>
			<Text text="{StatusIcon}" />
			</cells>
		</ColumnListItem>
		</items>
		</Table> 
								
</smartTable:SmartTable> 

Anyone has an idea what could be the problem?

Greets

Sascha
smarttable1.png (4.2 kB)
Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Aug 20, 2017 at 02:19 PM

    Hi,

    It is unclear from what you give here to spot the exact problem.

    However, based on what you say, you manage to pass the OData and bind it. If so,then simply pass the icons on the backend odata and present them in the smart-table. You can map the icons column in the controller or onInit phase based on your business need.

    Add comment
    10|10000 characters needed characters exceeded