Hi,
I'm sure this is something silly on my part, but I can't spot it.
The following code works:
var x = 'text';
var y = 'Red';
var selectedColorButtonValue = String(x + y);
var selectedColorButton = toolBar.findItemByValue(selectedColorButtonValue);
Now, since the actual value of y is dynamic and only known at run time, I have this code:
var selectedColorButtonValue = getColorButtonValue(fontColor); // Returns 'Red' for this demo
selectedColorButtonValue = String('text' + selectedColorButtonValue);
var selectedColorButton = toolBar.findItemByValue(selectedColorButtonValue);
The above does NOT work. The toolbarbutton that I'm trying to find is not found!
The toolbarbutton in question is one of several items in a RadToolBarSplitButton.
I have written to the console, and the value of selectedColorButtonValue appears fine.
Can anyone spot what I'm doing wrong.
Thanks
Jim