Skip to Content
0
May 11, 2018 at 01:29 PM

How to disable a button in new sap.m.Button

782 Views Last edit May 11, 2018 at 01:32 PM 2 rev

Hi Guy's

if price less than zero and select "BUY" option all "BUY" buttons should be disable in detail page list

 				venderdata:function(sKey){
			var oTable = this.byId("idTblVendor");
			var url = "/VendorData('"+sKey+"')/Results";
			var itemTemplate = new sap.m.ColumnListItem({
					// type: "",
					
				cells: [
						new sap.m.Text({
							text: "{VENDOR_NO}"
						}),
						new sap.m.Text({
							text: "{VENDOR_NAME}"
						}),
						new sap.m.Text({
							text: "{PRICE}"
						}),
                       new sap.m.Button({
                       	key: "key1",
                        text: "QUOTE",
                        }),
                         new sap.m.Button({
                       	key: "key2",
                        text: "BUY",
                       press: function() {
					// what should i write here
                             }
  })
]
			});
			oTable.bindItems({
				path: url,
				template: itemTemplate
			});
		},

Attachments

capture.jpg (19.4 kB)