Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9125003
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T06:42:00+00:00 2026-06-17T06:42:00+00:00

i wanted to make cell Brand Code read only when edit was click. But

  • 0

i wanted to make cell Brand Code read only when edit was click. But when i use properties read only it became so complicate. because when click new, the brand code cannot be click.

Here My code

<dx:ASPxGridView id="gvBrand" runat="server" CssPostfix="Aqua" SettingsBehavior-ConfirmDelete="true" CssFilePath="~/App_Themes/styles.css" AutoGenerateColumns="False" 
  DataSourceID="SqlDataSource1" KeyFieldName="BrandCode" >
   <Styles CssPostfix="Aqua" CssFilePath="~/App_Themes/styles.css">
     <LoadingPanel ImageSpacing="8px" />
   </Styles>

   <SettingsPager>
      <AllButton Text="All" />
      <NextPageButton Text="Next &gt;" />
      <PrevPageButton Text="&lt; Prev" />
   </SettingsPager>

   <SettingsText CommandUpdate="Save" />
   <ImagesFilterControl>
        <LoadingPanel Url="~/App_Themes/Editors/Loading.gif"></LoadingPanel>
   </ImagesFilterControl>

   <Images SpriteCssFilePath="~/App_Themes/{0}/sprite.css">
      <LoadingPanelOnStatusBar Url="~/App_Themes/GridView/gvLoadingOnStatusBar.gif">     </LoadingPanelOnStatusBar>

       <LoadingPanel Url="~/App_Themes/GridView/Loading.gif"></LoadingPanel>
    </Images>

        <StylesEditors>
            <CalendarHeader Spacing="1px"></CalendarHeader>

            <ProgressBar Height="25px"></ProgressBar>
            </StylesEditors>
                <SettingsLoadingPanel ImagePosition="Top" />
                <Settings ShowFilterRow="True" ShowGroupPanel="true" />

                <Columns>
                    <dx:GridViewCommandColumn VisibleIndex="0">
                        <EditButton Visible="True" />
                        <NewButton Visible="True" />
                        <DeleteButton Visible="True" />
                    </dx:GridViewCommandColumn>

                <dx:GridViewDataTextColumn FieldName="BrandCode" VisibleIndex="1" Caption="Brand Code"
                        EditCellStyle-HorizontalAlign="Left" >
                        <EditFormSettings Visible="True" ColumnSpan="1" />
                        <PropertiesTextEdit MaxLength="3" Width="35px">
                            <ValidationSettings SetFocusOnError="True">
                                <RequiredField IsRequired="True" />
                            </ValidationSettings>
                        </PropertiesTextEdit>
                    </dx:GridViewDataTextColumn>

                    <dx:GridViewDataTextColumn FieldName="BrandName" VisibleIndex="2" 
                        Caption="Brand Name" >
                        <EditFormSettings ColumnSpan="2" />
                        <PropertiesTextEdit MaxLength="50">
                            <ValidationSettings SetFocusOnError="True">
                                <RequiredField IsRequired="True" />
                            </ValidationSettings>
                        </PropertiesTextEdit>
                    </dx:GridViewDataTextColumn>

                    <dx:GridViewDataCheckColumn FieldName="isBlock" Visible="false"  
                        EditCellStyle-HorizontalAlign="Left" >
                    <EditFormSettings Visible="true"  VisibleIndex="3" Caption="Block"/>
                    </dx:GridViewDataCheckColumn>

                </Columns>
            </dx:ASPxGridView>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T06:42:01+00:00Added an answer on June 17, 2026 at 6:42 am

    You need to handle ASPxGridView.CellEditorInitilaize event:

    protected void MyGridOnCellEditorInitialize(object sender, ASPxGridViewEditorEventArgs e) {
        ASPxGridView gridView = (ASPxGridView).sender;
        e.Editor.ReadOnly = !gridView.IsNewRowEditing && "BrandCode".Equals(e.Column.FieldName);
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I wanted to make a simple parser, for a pseudo code like language(kept rigid),
I wanted to make the listview show thumbnails only when the items are visible
I wanted to make a templated constructor, but I found I had no way
I wanted to make a facebook application in java using servlets and JSP.But as
Edit: Just wanted to make the question I have more clear. I pretty much
I wanted to make a Java based web crawler for an experiment. I heard
I wanted to make a JOptionPane.showOptionDialog with some JTextArea and JLabel . The problem
I wanted to make my top left hand corner of a table rounded in
I wanted to make some simple file recovery software, where I want to try
I wanted to make a basic custom keypad for the iPhone , I did

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.