Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / ASP.NET AJAX > Splitter > Splitter to Show/Hide Command Item Template on Rad Grid

Not answered Splitter to Show/Hide Command Item Template on Rad Grid

Feed from this thread
  • Matt avatar

    Posted on Nov 8, 2011 (permalink)

    Hi,

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

    The functionality would be sililar to this example:
    http://demos.telerik.com/aspnet-ajax/controls/examples/integration/gridandsplitterresizing/defaultcs.aspx?product=splitter

    Please advise if this is possible.


    Thanks in advance,

    Ryan

    Reply

  • Dobromir Dobromir admin's avatar

    Posted on Nov 11, 2011 (permalink)

    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:RadGrid>
        </telerik:RadPane>
        <telerik:RadSplitBar CollapseMode="Both" ID="RadSplitBar2" runat="server" EnableResize="True">
        </telerik:RadSplitBar>
        <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;" />
        </telerik:RadPane>
    </telerik:RadSplitter>
     
    <script type="text/javascript">
        function fireGridCommand(commandName, commandArgument)
        {
            var masterTableView = $find("RadGrid1").get_masterTableView();
            masterTableView.fireCommand(commandName, commandArgument);
        }
    </script>


    More detailed information regarding this method is available in the following help article:
    http://www.telerik.com/help/aspnet-ajax/grid-gridtableview-firecommand.html

    Kind regards,
    Dobromir
    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

    Reply

Back to Top

Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / ASP.NET AJAX > Splitter > Splitter to Show/Hide Command Item Template on Rad Grid
Related resources for "Splitter to Show/Hide Command Item Template on Rad Grid"

ASP.NET Splitter Features   |  Documentation   |  DemosStep-by-step Tutorial  ]