Ticket T950812
Visible to All Users

DataGrid - How to enable\disable a column editor when adding a new row

created 4 years ago

Hey there,

I have a loop set up for DxColumn and the allowEditing option is dynamic. Now, when adding a new row the column is disabled which is disabled from being edited.
Is there a way that we can bypass the disabled field when we are adding a new row?

Answers approved by DevExpress Support

created 4 years ago

Hi Ron,

The allowEditing option is designed as a static option at the column level. I suggest you don't use it and specify the disabled option for an editor instead. This topic describes how to complete a similar task: Dynamically Change Editor Options in the Editing State

In your case, you can use the row.isNewRow parameter to check if a new record is being edited. Please test this solution and let us know your results.

Thanks,
Artem

    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.