Skip to main content
Apr 26, 2017 6:17 AM UTC
Solved

how to disable a Button?

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?

ankiguptaAnswer
5-Regular Member
Apr 26, 2017 7:10 AM UTC

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.

19 replies

ankigupta5-Regular MemberAnswer
5-Regular Member
Apr 26, 2017 7:10 AM UTC

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.

Translate
Apr 26, 2017 10:26 AM UTC

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

Where to find that option?

Translate
1-Visitor
Apr 26, 2017 10:50 AM UTC

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!

Translate