Ticket AS7157
Visible to All Users

When Editable is False, row deletion and appending must be also disabled

created 18 years ago

GridView according to documentation is readonly when Optionsbehavior.Editable is set to false. When internal navigator is used the + and - buttons ar enabled and work. Also calling deleteRow deletes the row without checking the editable property.
If a view is non editable then it is expected to be readonly from all ways of interaction including calling of function. But at least it sould prevent the user interface to add or remove rows.
Workaround

C#
gridView1.OptionsBehavior.Editable = false; gridControl1.EmbeddedNavigator.Buttons.Append.Visible = false; gridControl1.EmbeddedNavigator.Buttons.Remove.Visible = false;

This workaround does not work well. The grid may (and in my case does) have many views, others editable others not but the navigator is single instance. And I know I can handle the focusedview changed event and make the changes myself.
So in this case at least it sould be some property to set this kind of behavior.

Show previous comments (1)

    Its been a year since I mention this issue
    Its quite a bug to set the gridview editable property to false an still can add and delete rows
    I think its quite common to business logic to have a way to allow or not adding, editing, deleting row.
    Is there any news about this issue?

    DevExpress Support Team 17 years ago

      Hi Spyros,
      I'm sorry, but I cannot give you any estimate, because we have not established any release date for this feature. We will notify you about our progress over on this feature. Sorry for any inconvenience.
      Thanks,
      Andrew

      MF MF
      Mike Falcon (DevExpress) 16 years ago

        Following two options have been added:
        ColumnView.OptionsBehavior.AllowDeleteRows (DefaultBoolean)
        ColumnView.OptionsBehavior.AllowAddRows (DefaultBoolean)
        (If equals "Default" then Editable state is used)

        Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.

        Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.