Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 8533

hide button in table column

$
0
0

Hi ,

 

    I have added 2 buttons in one table column using layout. if the bindproperty for that column is "Approved" than that buttons set to false, if the bindproperty is "Pending" than buttons get visible. i am trying this code

 

     oTable.addColumn(new sap.ui.table.Column({

      label: new sap.ui.commons.Label({text: "Status"}),

      template: new sap.ui.layout.HorizontalLayout({id:"HL",

        content : [

          new sap.ui.commons.Button({id:"btn1",

            text: "Assign status"

 

          }),

          new sap.ui.commons.Label({}),

          new sap.ui.commons.Button({id:"btn2",

            text : "Deny"

          })

        ]

      })

    })    

     ).bindProperty("visible","Status",function(oEvent){

      var bt = sap.ui.getCore().byId("HL");

   //   var bt1 = sap.ui.getCore().byId("btn2");

     // var bt2 = sap.ui.getCore().byId("btn3");

      if (oEvent === "Approved"){

       bt.setVisible(false);

      }


Viewing all articles
Browse latest Browse all 8533

Trending Articles



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