Skip to Content
0

SAPUI5 Grid Table Batch Editing

Apr 21 at 04:59 PM

54

avatar image
Former Member

Hi Guys,

I am working with SAPUI5 Grid Table batch editing(Editable or non-editable cell). I am thinking about two options mentioned below but I am not sure if I can achieve this or is it even supported by Grid Table

1. I want to click on a grid cell and change the control from text to input so that I can edit record and save it later.

2. Keep input editable to false and by clicking the cell or input, whichever is easy, change input editable to true. I was trying this option but once the input editable is set to false no event gets fired on input so, therefore, can't change the state at all.

Also, I have noticed that setting editable to false on Table itself doesn't do anything at least in my case it is not doing anything.

Any help or guidance will be appreciated.


Regards

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Best Answer
VIPLOVE KHUSHALANI Apr 23 at 06:28 AM
1

Hi ,

You can use the below solutions to achieve your 2 options functionality :

1. there is a event cellClick : https://sapui5.hana.ondemand.com/#/api/sap.ui.table.Table/events/cellClick for the sap.ui.table.Table (Grid Table) control and on that event fire change the text control to input control .

2. Same cellClick event of the grid table control will help you on this. On that event you can get the control in the cell and change its editable property from false to true and true to false ..

If this event doesn't help you than and you need to use the input control event for your second option than you need to extend the input control(sap.m.input) to add the input click event .. Example : https://sapui5.hana.ondemand.com/#/sample/sap.m.tutorial.walkthrough.34/code

Thanks

Viplove

Show 2 Share
10 |10000 characters needed characters left characters exceeded
Former Member

I had a look at the cellClick API, but it is in an experimental stage which means it can change in future.

0

Check out cellContextmenu event

https://sapui5.hana.ondemand.com/#/api/sap.ui.table.Table/events/cellContextmenu


Similar to cellClick ..


Thanks

Viplove

0