on 02-15-2016 9:42 AM
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
}) ;
Check this example JS Bin - Collaborative JavaScript Debugging
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
var currentRowContext = oEvent.getParameter("rowContext");
var model=******* //get reference to your model
var cellproperty=model.getProperty("attributewhichbindtocolumn",currentRowContext)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.