cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Did you get an answer that solved your problem? Please mark it as an Accepted Solution so others with the same problem can find the answer easily. X

Binding 'ButtonType' property.

VR_10133499
14-Alexandrite

Binding 'ButtonType' property.

I am trying to bind the 'ButtonType' property of a button with an expression. The expression is auto evaluated when a property value changes.

The output of the expression is a string with output value as 'Secondary' or 'Danger' depending on the scenario. But the button type does not seems work, it is always in black color instead of changing the color based on expression output.

 

ACCEPTED SOLUTION

Accepted Solutions

The ButtonType values are not the ones you used, instead they are "primary", "secondary" etc.

In the beginning, bind a label as the output for the ButtonType to see the values it has depending on how you set it, then use those in the expression.

View solution in original post

3 REPLIES 3

The ButtonType values are not the ones you used, instead they are "primary", "secondary" etc.

In the beginning, bind a label as the output for the ButtonType to see the values it has depending on how you set it, then use those in the expression.

Thanks alot, it is working. I just checked the options available in ButtonType and tried to use it, but didnt know that i have to use the text in lower case. 

Is it the same case for all the properties? we have to use the options in lower case or is there any place where we can check the which case to use.

Hi,

For all the properties that are in a dropdown (since they are the only one where this applies) you should always verify all their values via the Label approach.

The available values for dropdown lists are not documented in the Help Center - probably a good thing to do in the future - and as far as I know they are not guaranteed by design to be the lowercase versions of what you see, even if most probably they are.

Announcements


Top Tags