Skip to Content
0

How to make the row of a sap.ui.table selected while editing the value of a cell ?

Feb 13, 2017 at 06:18 AM

51

avatar image

Hi ,

I am developing sap UI5 application using sap.ui.table.Table.

return new sap.ui.table.Column({
  label: labelname,
  template: new sap.ui.commons.TextField({
  value: {
    path: columnName
  },
  editable: Editable,
  liveChange: function(oEvent) {
     var newUnitPrice = oEvent.getParameter("liveValue");
  }
 })
});

When i am changing the cell of the editable column , particular row has to be selected.

How to do that in javascript code ?

Thanks in Advance,

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

2 Answers

Best Answer
Sandeep Nadubail Feb 20, 2017 at 06:58 AM
0

Hi all,

I have achieved this using below code :

liveChange: function(oEvent) {										
	var rowindex = oEvent.getSource().getParent().getIndex();
	that.oPriceProcedureTable.setSelectedIndex(rowindex);	
}
Share
10 |10000 characters needed characters left characters exceeded
Akhilesh Upadhyay Feb 13, 2017 at 11:16 AM
0

Introduce "selectionBehavior" property to your table as below:

var oTable = new sap.ui.table.Table("idUiTable", {
    selectionBehavior: "Row"
});

while editing input value, particular table row will be selected.

Thanks,

Akhilesh

Share
10 |10000 characters needed characters left characters exceeded