cancel
Showing results for 
Search instead for 
Did you mean: 

Is there a way to determine what column a user double-clicked on a GridView?

former_member238607
Participant
0 Kudos
493

Hi,

We are running Personas 3.0 SP7. As the title says, I'm trying to determine what column a user double-clicks in a GridView.

I have a flavor for IW29, and if a user double-clicks on the main work center column, I need to cancel the action as we do not want them navigating to IR03.

I can use the onCellDoubleClick event, and "return true;" appears to cancel the action; I just need to identify the column as I only want to cancel the event for one column.

Thanks for your help!

Accepted Solutions (1)

Accepted Solutions (1)

0 Kudos

Hi Jeff,

The onCellDoubleClick event has the following signature. You can use the columnName parameter to selectively handle the bubbling of the event.

Signature: onCellDoubleClick(GuiGridView source, String columnName, Number rowIndex, String cellValue)

Description: This event is fired when a cell is either double-clicked or selected and then F2 is pressed. This event can be suppressed. In other words, if the script handler returns a JS boolean "true", then the occurrence of this event is not sent to the ABAP backend.

You can find the Scripting API documentation by clicking on the help icon after selecting a control in the script editor. For example, if you are using the SlipstreamEngine, the API documentation for ALV GridView control is available here - /sap/bc/se/m/resources/generated/documentation/PersonasScriptingAPIDoc.html#GuiGridView


Best regards

Kranthi

Answers (2)

Answers (2)

former_member238607
Participant
0 Kudos

This is exactly what I needed.

Thanks to both of you for your help!

Jeff

Brian_Wills
Contributor
0 Kudos

Hi Jeff,

The ARBPL is the Main Work Center column field name. onCellDoubleClick event call the script below.

if(columnName == 'ARBPL')
{
	return true;
}

Cheers,

Brian