Skip to Content
0
Former Member
Feb 15, 2016 at 09:42 AM

How to read values of particular column after selecting a single row??

60 Views

Hi All,

It's quite urgent ,plz help

I am using sap.ui.table and i am selecting one single row using singleselect mode,

My doubt is how to read the selected row data ?/

I have to pass one particular data from the selected row to next screen's odata which displays the detail respective to that row table...

Below is my code,

oTable = new sap.ui.table.Table({

selectionBehavior: sap.ui.table.SelectionBehavior.RowSelector,

});

var oColumn = new sap.ui.table.Column({

label: new sap.m.Label({text: "Hierarchy Level"}),

template: new sap.ui.commons.TextView().bindProperty("text", "Level"),

width: "200px",

resizable:true

});

oTable.addColumn(oColumn);

var welem = new sap.ui.table.Column({

label: new sap.m.Label({text: "WBS Element"}),

template: new sap.ui.commons.TextView().bindProperty("text", "WBSEleOP"),

width: "200px",

resizable:true

});

oTable.addColumn(welem);

var des10 = new sap.ui.table.Column({

label: new sap.m.Label({text: "Description"}),

template: new sap.ui.commons.TextView().bindProperty("text", "WBSEleOPDes"),

width: "200px",

resizable:true

});

oTable.addColumn(des10);

oTable.bindRows("/results");

oTable.setModel(oModel7);

//var n = new sap.m.Button("n",{text:"Detail",press:oController.onItemPress});

var n = new sap.m.Button({

text: 'Detailed View',

press: oController.onItemPress

}) ;