I've a grid in a UserControl. The CommandItem template is defined like this ...
I need to be able to enble/disable the buttons based on values and events on the calling page.
I thought to do it like this ...
But "GridCommandItemToolbar" isn't recognised, which I suppose is OK. But I can't seem to create a property on the UserControl that lets me get at the ToolBar server-side so I can access its ClientID in the <% %> code block on the page.
Can anyone offer a solution?
--
Stuart
<CommandItemTemplate> |
<telerik:RadToolBar runat="server" ID="GridCommandItemToolbar" AutoPostBack="false" Skin="WebBlue" |
OnClientButtonClicked="ToolBarButtonClicked" Style="width: 100%" Visible="true"> |
<CollapseAnimation Duration="200" Type="OutQuint" /> |
<Items> |
<telerik:RadToolBarButton runat="server" Enabled="false" ToolTip="Add Document" Value="AddDocument" ImageUrl="~/Images/Office/document_file/png/16/document_add_16x16.png"> |
</telerik:RadToolBarButton> |
<telerik:RadToolBarButton runat="server" Enabled="false" ToolTip="Edit Document" Value="EditDocument" ImageUrl="~/Images/Office/document_file/png/16/document_edit_16x16.png"> |
</telerik:RadToolBarButton> |
<telerik:RadToolBarButton runat="server" Enabled="false" ToolTip="Delete Document" Value="DeleteDocument" ImageUrl="~/Images/Office/document_file/png/16/document_delete_16x16.png"> |
</telerik:RadToolBarButton> |
<telerik:RadToolBarButton runat="server" IsSeparator="true"></telerik:RadToolBarButton> |
<telerik:RadToolBarButton runat="server" Enabled="false" ToolTip="View Document History" Value="ViewHistory" CheckOnClick="true" Checked="false" AllowSelfUnCheck="true" ImageUrl="~/Images/Office/document_file/png/16/document_properties_16x16.png"> |
</telerik:RadToolBarButton> |
</Items> |
</telerik:RadToolBar> |
</CommandItemTemplate> |
I need to be able to enble/disable the buttons based on values and events on the calling page.
I thought to do it like this ...
var tb = $find("<%= GridCommandItemToolbar.ClientID %>"); |
Can anyone offer a solution?
--
Stuart