Current filter:
                                You should refresh the page.
                                Support Center

                                How to customize command buttons in individual rows


                                This example demonstrates how to hide a command button in the grid's CommandColumn by handling the ASPxGridView.CommandButtonInitialize event.

                                See Also:
                                How to hide a cell value
                                How to hide template controls in individual cells

                                • Jacob Blumberg 08.28.2013

                                  Is there a way to do this based on the data in the row?

                                You must  log in  or  register  to leave comments
                                Select file
                                • Default.aspx
                                • Default.aspx.cs
                                Select language
                                • C#
                                • VB.NET
                                Select version
                                • v2009 vol 2.4 - v2012 vol 2.16
                                • v2009 vol 1.3 - v2009 vol 1.11
                                <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="HideCommandButtons._Default" %>
                                <%@ Register Assembly="DevExpress.Web.ASPxEditors.v9.2, Version=, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
                                    Namespace="DevExpress.Web.ASPxEditors" TagPrefix="dxe" %>
                                <%@ Register Assembly="DevExpress.Web.ASPxGridView.v9.2, Version=, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
                                    Namespace="DevExpress.Web.ASPxGridView" TagPrefix="dxwgv" %>
                                <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">
                                <html xmlns="" >
                                <head runat="server">
                                    <title>Untitled Page</title>
                                    <form id="form1" runat="server">
                                        <dxwgv:ASPxGridView ID="ASPxGridView1" runat="server" AutoGenerateColumns="False" KeyFieldName="ID" OnCommandButtonInitialize="ASPxGridView1_CommandButtonInitialize">
                                                <dxwgv:GridViewCommandColumn ShowSelectCheckbox="True" VisibleIndex="0" ButtonType="Button">
                                                    <EditButton Visible="True">
                                                    <NewButton Visible="True">
                                                    <DeleteButton Visible="True">
                                                    <ClearFilterButton Visible="True">
                                                <dxwgv:GridViewDataTextColumn FieldName="ID" VisibleIndex="1">

                                To start a chat you should create a support ticket

                                If you need additional product information, write to us at or call us at +1 (818) 844-3383

                                FOLLOW US

                                DevExpress engineers feature-complete Presentation Controls, IDE Productivity Tools, Business Application Frameworks, and Reporting Systems for Visual Studio, along with high-performance HTML JS Mobile Frameworks for developers targeting iOS, Android and Windows Phone. Whether using WPF, Silverlight, ASP.NET, WinForms, HTML5 or Windows 8, DevExpress tools help you build and deliver your best in the shortest time possible.

                                Copyright © 1998-2014 Developer Express Inc.
                                All trademarks or registered trademarks are property of their respective owners