Quantcast
Channel: SCN : All Content - All Communities
Viewing all articles
Browse latest Browse all 7790

Reading specific row values from the table bound with Odata

$
0
0

Hi All,

 

I have a table (sap.m) which is bound with an oData service.

 

I would like to get the value of one of the column, if the user clicks on one particular row.

 

Please find my table structure as below:

 

var oModelNotification = new sap.ui.model.odata.ODataModel(our service);

  sap.ui.getCore().setModel(oModelNotification,"notificationModel");

 

  var oNotificate = new sap.m.Text({text: "{notificationModel>Notificat}"}); 

  var oNotifytype = new sap.m.Text({text: "{notificationModel>Notif_Type}"}); 

  var oDescript = new sap.m.Text({text: "{notificationModel>Descript}"});

 

  var oColNotificate = new sap.m.Column({header: new sap.m.Text({text:"Notification Number"}) }); 

  var oColNotifytype = new sap.m.Column({header: new sap.m.Text({text:"Notification Type"}) }); 

  var oColDescript = new sap.m.Column({header: new sap.m.Text({text:"Description"}) }); 

 

  var oRowNotification = new sap.m.ColumnListItem(); 

  oRowNotification.addCell(oNotificate).addCell(oNotifytype).addCell(oDescript);

 

  var oTabNotification = new sap.m.Table("oTabNotification"); 

  oTabNotification.addColumn(oColNotificate).addColumn(oColNotifytype).addColumn(oColDescript); 

 

  oTabNotification.setModel(oModelNotification);

  oTabNotification.bindItems("notificationModel>/Notificationlist?Customerno='123456', oRowNotification); 

 

 

I would like to get the value of the notification number if the user clicks on one particular row.

 

Regards,

Arun


Viewing all articles
Browse latest Browse all 7790

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>