Splitter to Show/Hide Command Item Template on Rad Grid

2 posts, 0 answers
  1. Mark
    Mark avatar
    64 posts
    Member since:
    Nov 2009

    Posted 08 Nov 2011 Link to this post


    I would like to use a Rad Splitter to show and hide the Command Item Template.

    The functionality would be sililar to this example:

    Please advise if this is possible.

    Thanks in advance,

  2. Dobromir
    Dobromir avatar
    1633 posts

    Posted 11 Nov 2011 Link to this post

    Hi Matt,

    RadGrid does not offer the required functionality out of the box. Nevertheless, you can achieve the required result by having a custom buttons outside the grid (in this case in the other RadPane) to and manually fire the grid commands using the MaterTableView's fireCommand() client-side method, e.g:
    <telerik:RadSplitter ID="RadSplitter1" runat="server" Orientation="Horizontal">
        <telerik:RadPane ID="gridPane" runat="server">
            <telerik:RadGrid ID="RadGrid1" runat="server">
        <telerik:RadSplitBar CollapseMode="Both" ID="RadSplitBar2" runat="server" EnableResize="True">
        <telerik:RadPane ID="commandsPane" runat="server" CssClass="TextStyle" BackColor="#d9eeff">
            <asp:Button Text="Add New Item" runat="server" ID="Button1" OnClientClick="fireGridCommand('InitInsert', ''); return false;" />
            <asp:Button Text="Refresh" runat="server" ID="Button2" OnClientClick="fireGridCommand('InitInsert', ''); return false;" />
    <script type="text/javascript">
        function fireGridCommand(commandName, commandArgument)
            var masterTableView = $find("RadGrid1").get_masterTableView();
            masterTableView.fireCommand(commandName, commandArgument);

    More detailed information regarding this method is available in the following help article:

    Kind regards,
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now
Back to Top