cancel
Showing results for 
Search instead for 
Did you mean: 

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

Former Member
0 Kudos

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

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi all,

I have achieved this using below code :

liveChange: function(oEvent) {										
	var rowindex = oEvent.getSource().getParent().getIndex();
	that.oPriceProcedureTable.setSelectedIndex(rowindex);	
}

Answers (1)

Answers (1)

former_member227918
Active Contributor
0 Kudos

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