Hi,
Here's my scenario.
I have a diagram (3rd party control) and when a user selects a shape I want to highlight its properties in a toolbar (Telerik), which is also used to set the properties. So it needs to serve a dual purpose.
In particular, I need the appropriate RadToolBarButton item to be selected/highlighted in the RadToolBarSplitButton dropdowns. The value and image associated with the split button itself must not change.
For example, we have a splitbutton that allows the user to select the line style.
If the user selects a line, they would then open the dropdown to see what style had been applied to that line. The "button" would continue to show the last style that was selected and would apply that style should the user click it.
I hope that's clear.
Here's my declaration of the splitbutton:
<telerik:RadToolBarSplitButton runat="server" Value="#style#1#5 0" ToolTip="Connector Style" EnableDefaultButton="False" ImageUrl="Images/Navvia/line-1px.png"> <Buttons> <telerik:RadToolBarButton runat="server" Text="Thin Solid" Value="#style#1#5 0" ImageUrl="Images/Navvia/line-1px.png" Width="130px"> </telerik:RadToolBarButton> <telerik:RadToolBarButton runat="server" Text="Thin Dotted" Value="#style#1#3 3" ImageUrl="Images/Navvia/dotted-1px.png"> </telerik:RadToolBarButton> <telerik:RadToolBarButton runat="server" Text="Thin Dashed" Value="#style#1#7 7" ImageUrl="Images/Navvia/dashed-1px.png"> </telerik:RadToolBarButton> <telerik:RadToolBarButton runat="server" Text="Medium Solid" Value="#style#3#5 0" ImageUrl="Images/Navvia/line-3px.png"> </telerik:RadToolBarButton> <telerik:RadToolBarButton runat="server" Text="Medium Dotted" Value="#style#3#3 3" ImageUrl="Images/Navvia/dotted-3px.png"> </telerik:RadToolBarButton> <telerik:RadToolBarButton runat="server" Text="Medium Dashed" Value="#style#3#7 7" ImageUrl="Images/Navvia/dashed-3px.png"> </telerik:RadToolBarButton> <telerik:RadToolBarButton runat="server" Text="Thick Solid" Value="#style#5#5 0" ImageUrl="Images/Navvia/line-5px.png"> </telerik:RadToolBarButton> <telerik:RadToolBarButton runat="server" Text="Thick Dotted" Value="#style#5#3 3" ImageUrl="Images/Navvia/dotted-5px.png"> </telerik:RadToolBarButton> <telerik:RadToolBarButton runat="server" Text="Thick Dashed" Value="#style#5#7 7" ImageUrl="Images/Navvia/dashed-5px.png"> </telerik:RadToolBarButton> </Buttons></telerik:RadToolBarSplitButton>
I've tried locating the button to highlight using the following (without success):
function SetSelectedConnectorStyle() { var toolbar1 = $find("<%=RadToolBar1.ClientID%>") var connStyleButton = toolbar1.findItemByValue("#style#5#3 3"); connStyleButton.check();}The above finds the button, but checking it does not show any visual indication that it is selected when the dropdown is expanded.
Any suggestions?
Thanks in advance for any assistance.
Jim