Current filter:
                                You should refresh the page.
                                Support Center

                                How to hide an EditForm editor based on a column value

                                0

                                It is safe to hide an editor using the ASPxGridView.CellEditorInitialize event. By using this event handler, it is possible to operate with editors using the e.Editor property.

                                ASPxGridView - How to hide the EditForm editor and column caption programmatically

                                You must  log in  or  register  to leave comments
                                Select file
                                • Default.aspx
                                • Default.aspx.cs
                                Select language
                                • C#
                                • VB.NET
                                Select version
                                • v2013 vol 1.4 - v2013 vol 2.9
                                • v2010 vol 2.3 - v2012 vol 2.16
                                • v2008 vol 1.7 - v2010 vol 1.12
                                <%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default"
                                    MasterPageFile="~/MasterPage.master" %>
                                
                                <%@ Register Assembly="DevExpress.Web.v10.2, Version=10.2.1.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
                                    Namespace="DevExpress.Web.ASPxCallbackPanel" TagPrefix="dxcp" %>
                                <%@ Register Assembly="DevExpress.Web.ASPxTreeList.v10.2, Version=10.2.1.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
                                    Namespace="DevExpress.Web.ASPxTreeList" TagPrefix="dxwtl" %>
                                <%@ Register Assembly="DevExpress.Web.v10.2, Version=10.2.1.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
                                    Namespace="DevExpress.Web.ASPxPanel" TagPrefix="dxp" %>
                                <%@ Register Assembly="DevExpress.Web.ASPxGridView.v10.2, Version=10.2.1.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
                                    Namespace="DevExpress.Web.ASPxGridView" TagPrefix="dxwgv" %>
                                <%@ Register Assembly="DevExpress.Web.ASPxEditors.v10.2, Version=10.2.1.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
                                    Namespace="DevExpress.Web.ASPxEditors" TagPrefix="dxe" %>
                                <%@ Register Assembly="DevExpress.Web.v10.2, Version=10.2.1.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
                                    Namespace="DevExpress.Web.ASPxTabControl" TagPrefix="dxtc" %>
                                <%@ Register Assembly="DevExpress.Web.v10.2, Version=10.2.1.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
                                    Namespace="DevExpress.Web.ASPxClasses" TagPrefix="dxw" %>
                                <%@ Register Assembly="DevExpress.Web.v10.2, Version=10.2.1.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
                                    Namespace="DevExpress.Web.ASPxPopupControl" TagPrefix="dxpc" %>
                                <asp:Content ContentPlaceHolderID="ContentPlaceHolder1" ID="CC" runat="Server">
                                    <dxwgv:ASPxGridView ID="grid" runat="server" AutoGenerateColumns="False" DataSourceID="ads"
                                        KeyFieldName="CategoryID" Width="750px" OnCellEditorInitialize="grid_CellEditorInitialize">
                                        <Columns>
                                            <dxwgv:GridViewCommandColumn VisibleIndex="0">
                                                <EditButton Visible="True">
                                                </EditButton>
                                                <NewButton Visible="True">
                                                </NewButton>
                                            </dxwgv:GridViewCommandColumn>
                                            <dxwgv:GridViewDataTextColumn FieldName="CategoryID" ReadOnly="True" VisibleIndex="1">
                                                <EditFormSettings Visible="False" />
                                            </dxwgv:GridViewDataTextColumn>
                                            <dxwgv:GridViewDataTextColumn FieldName="CategoryName" VisibleIndex="2">
                                            </dxwgv:GridViewDataTextColumn>
                                            <dxwgv:GridViewDataTextColumn FieldName="Description" VisibleIndex="3">
                                            </dxwgv:GridViewDataTextColumn>
                                        </Columns>
                                    </dxwgv:ASPxGridView>
                                    <asp:AccessDataSource ID="ads" runat="server" DataFile="~/App_Data/nwind.mdb" SelectCommand="SELECT * FROM [Categories]">
                                    </asp:AccessDataSource>
                                </asp:Content>

                                To start a chat you should create a support ticket


                                If you need additional product information, write to us at info@devexpress.com 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