Skip to main content
April 26, 2017
Solved

how to disable a Button?

  • April 26, 2017
  • 1 reply
  • 7797 views

Hi,

I have 3 buttons ( port, baudrate and parity)  with respective dropdown list and one normal button "save".

After selecting the values from all those 3 buttons, my "save" button should enable. Till then it should be disabled.

How could I do this one?

Best answer by ankigupta

Bavithraa Marimuthu​,

One way could be to write a custom service which takes 3 input parameters and return Boolean false if none of the parameter is null else true.

Bind the selected value of all dropdown to this service and call this service on SelectedRowsChanged events of the list widgets.

Bind the output of the service to disabled property of the Button.

Disabled property of Button is initially selected.

I hope it helps.

1 reply

ankigupta5-Regular MemberAnswer
5-Regular Member
April 26, 2017

Bavithraa Marimuthu​,

One way could be to write a custom service which takes 3 input parameters and return Boolean false if none of the parameter is null else true.

Bind the selected value of all dropdown to this service and call this service on SelectedRowsChanged events of the list widgets.

Bind the output of the service to disabled property of the Button.

Disabled property of Button is initially selected.

I hope it helps.

April 26, 2017

How to call the service on selectedvalue changed of the list widgets?

Where to find that option?

1-Visitor
April 26, 2017

You can trigger it on the SelectedRowsChanged event of the added service on the list widget. You can find it in the bottom right corner on the UI, please see below

Hope this is helpful!