Showing results for 
Search instead for 
Did you mean: 

how to get a cell click event of a custom cell in a ui.table?

Active Participant
0 Kudos


i got following code:

	<t:Table id="SeqSubTable" selectionMode="MultiToggle"  rowSelectionChange="onSelChangeSeq" cellClick="selectText" rowActionCount="2"
				visibleRowCountMode="Auto" >
				<t:Column width="100px" sortProperty="Yield"	>
					<t:customData useSmartField="true">
						<core:CustomData key="p13nData"
							value='\{"columnKey": "Yield", "autoColumnWidth": \{ "visibleProperty": "Yield" }, "columnIndex": 3, "leadingProperty": "Yield", "sortProperty": "Yield", "description": "Gutmenge", "displayBehaviour": "descriptionOnly", "width": "360px"}' />
						<Text text="Gutmenge"/>
						<Input id="yield" value="{ path: 'Yield', type: 'sap.ui.model.type.Float',  formatOptions: {minFractionDigits: 3}, columnIndex: 3}" editable="true" onfocusin="selectText" />

How can i manage to get the Cellclick? I simply want to select the text in the clicked cell (Input)?

The normal CellClick Event works JUST for the predefined fields - but not for the custom ones.



Accepted Solutions (1)

Accepted Solutions (1)

Active Participant
0 Kudos

Thanks - the focus event works now:

], function (Input) {
	"use strict";
	return Input.extend("CustomInput", {

		metadata: {
			events: {
				focus: {
					input : { type: "object" }

		renderer: {},

		onAfterRendering: function () {
			if (sap.m.Input.onAfterRendering) {
				sap.m.Input.onAfterRendering.apply(this, arguments);

			this.$().find('input').focus(function () {
				this.fireEvent('focus', { input: this });

Answers (1)

Answers (1)

Active Participant
0 Kudos

Hi Andreas,

cellClick event works if you click outside of the input box but inside the cell.

For your requirement you need to implement a click event on the input box as there is no such event implemented in the standard version of the control.

So either you extend the input control and implement/fire the click event yourself or you use a control which has such an event already available.

Hope this helps!