Hi,
I am using the following RadToolBarSplitButton declaration:
When I select an item from the dropdown, the corresponding image is placed in the splitbutton automatically.
I would like to place a "different" image in the splitbutton (not the one from the child item).
I have tried the following in the OnClientButtonClicked event handler, but it does nothing:
I know I have the right index (16), because when I bump it to 17 I see the desired image appear in the next toolbar button.
Any suggestions?
Thanks in advance.
Jim
I am using the following RadToolBarSplitButton declaration:
<
telerik:RadToolBarSplitButton
runat
=
"server"
Value
=
"textColor"
>
<
Buttons
>
<
telerik:RadToolBarButton
runat
=
"server"
Text
=
"Black"
Value
=
"#text#000000"
ImageUrl
=
"Images/Navvia/standard_color_black_16x16.png"
>
</
telerik:RadToolBarButton
>
<
telerik:RadToolBarButton
runat
=
"server"
Text
=
"White"
Value
=
"#text#ffffff"
ImageUrl
=
"Images/Navvia/standard_color_white_16x16.png"
>
</
telerik:RadToolBarButton
>
<
telerik:RadToolBarButton
runat
=
"server"
Text
=
"Dark Red"
Value
=
"#text#cc0000"
ImageUrl
=
"Images/Navvia/standard_color_dark_red_16x16.png"
>
</
telerik:RadToolBarButton
>
<
telerik:RadToolBarButton
runat
=
"server"
Text
=
"Red"
Value
=
"#text#ff0000"
ImageUrl
=
"Images/Navvia/standard_color_red_16x16.png"
>
</
telerik:RadToolBarButton
>
<
telerik:RadToolBarButton
runat
=
"server"
Text
=
"Orange"
Value
=
"#text#ffcc00"
ImageUrl
=
"Images/Navvia/standard_color_orange_16x16.png"
>
</
telerik:RadToolBarButton
>
<
telerik:RadToolBarButton
runat
=
"server"
Text
=
"Yellow"
Value
=
"#text#ffff00"
ImageUrl
=
"Images/Navvia/standard_color_yellow_16x16.png"
>
</
telerik:RadToolBarButton
>
<
telerik:RadToolBarButton
runat
=
"server"
Text
=
"Light Green"
Value
=
"#text#99cc66"
ImageUrl
=
"Images/Navvia/standard_color_light_green_16x16.png"
>
</
telerik:RadToolBarButton
>
<
telerik:RadToolBarButton
runat
=
"server"
Text
=
"Green"
Value
=
"#text#009966"
ImageUrl
=
"Images/Navvia/standard_color_green_16x16.png"
>
</
telerik:RadToolBarButton
>
<
telerik:RadToolBarButton
runat
=
"server"
Text
=
"Light Blue"
Value
=
"#text#0099ff"
ImageUrl
=
"Images/Navvia/standard_color_light_blue_16x16.png"
>
</
telerik:RadToolBarButton
>
<
telerik:RadToolBarButton
runat
=
"server"
Text
=
"Blue"
Value
=
"#text#0066cc"
ImageUrl
=
"Images/Navvia/standard_color_blue_16x16.png"
>
</
telerik:RadToolBarButton
>
<
telerik:RadToolBarButton
runat
=
"server"
Text
=
"Dark Blue"
Value
=
"#text#003366"
ImageUrl
=
"Images/Navvia/standard_color_dark_blue_16x16.png"
>
</
telerik:RadToolBarButton
>
<
telerik:RadToolBarButton
runat
=
"server"
Text
=
"Purple"
Value
=
"#text#663399"
ImageUrl
=
"Images/Navvia/standard_color_purple_16x16.png"
>
</
telerik:RadToolBarButton
>
</
Buttons
>
</
telerik:RadToolBarSplitButton
>
When I select an item from the dropdown, the corresponding image is placed in the splitbutton automatically.
I would like to place a "different" image in the splitbutton (not the one from the child item).
I have tried the following in the OnClientButtonClicked event handler, but it does nothing:
var
toolBar = $find(
"<%=RadToolBar1.ClientID%>"
);
var
textColorButton = toolBar.get_items().getItem(16);
textColorButton.set_imageUrl(
'Images/Navvia/text_color_16x16.png'
);
I know I have the right index (16), because when I bump it to 17 I see the desired image appear in the next toolbar button.
Any suggestions?
Thanks in advance.
Jim