How do I go about setting a ToolBarButton image sprite on the client side? I want to change the sprite css class depending on user action.
On the server side, I successfully set the sprite for the buttons "Option1" and "Option2" in my toolbar "rtbarLs" like this:
RadToolBarButton rtbb1 = (RadToolBarButton)rtbarLs.FindItemByValue("Option1");rtbb1.SpriteCssClass = "spriteCheck";rtbb1.EnableImageSprite = true;RadToolBarButton rtbb2 = (RadToolBarButton)rtbarLs.FindItemByValue("Option2");rtbb2.SpriteCssClass = "spriteBlank";rtbb2.EnableImageSprite = true;
On the client side, I tried this:
var rtbarSumm = window.$find("<%= rtbarLs.ClientID %>");rtbarSumm.findItemByValue('Option2').set_spriteCssClass("spriteCheck");
but the spriteCssClass for ToolBarButton "Option2" is still "spriteBlank". Note that there is no JavaScript error reported in the debugger console.
Thoughts?
