I am trying to programatically modify a ToolBarButton which I declared in the ASPX page (specifically I want to set the Checked and CheckedonClick properties).
I can't seem to access the ToolBarButton, eg: RadToolBar1.Items(index).Checked = true doesnt work.
How should I achieve this?
2 Answers, 1 is accepted
0
Erjan Gavalji
Telerik team
answered on 29 May 2008, 08:56 AM
Hi Jude,
You should cast the abstract RadToolBarItem to the RadToolBarButton type, e.g.
Dim item As RadToolBarItem
item = RadToolBar1.Items(index)
If item.GetType Is GetType(RadToolBarButton) Then
CType(item, RadToolBarButton).Checked = True
CType(item, RadToolBarButton).CheckOnClick = True
End If