Ticket T434096
Visible to All Users

ASPxGridView - Hidden column's values are null on editing

created 9 years ago

[DevExpress Support Team: CLONED FROM T433500: ASPxGridView - How to upload an image in the edit form]
About this video, if is possible i want to ask another question about another problem…i don't know if it's better to create a new ticket…
…If you see, in edit mode i must see the id field in the readonly mode (but it's ugly to see the id in edit mode).
If i set to visible = false in edit mode the id field, when i take the value of this in RowInserting or RowUpdating i have null value…
You can help me also on this issue?

Thank you so much for you assistance.

Answers approved by DevExpress Support

created 9 years ago (modified 8 years ago)

Hello,

This is the expected behavior. If a column is not in visible in the ASPxGridView and the Update button is clicked, the ASPxGridView will not pass this row value to the update method. Use the approach suggested in the How to preserve hidden columns values when the ASPxGridView updates its data source example to accomplish your task. Please let us know if you need any additional assistance regarding this.
Let us know if you need further assistance.

Updated:

If the ID is specified via the ASPxGridView.KeyFieldName property, you can use the e.Keys collection to get the required key value. If not, you can use the ASPxGridView.GetRowValuesByKeyValue method as it is shown in the How to preserve hidden columns values when the ASPxGridView updates its data source example.

    Show previous comments (1)
    DevExpress Support Team 8 years ago

      Hello Raffaele,

      If the ID is specified via the ASPxGridView.KeyFieldName property, you can use the e.Keys collection to get the required key value. If not, you can use the ASPxGridView.GetRowValuesByKeyValue method as it is shown in the How to preserve hidden columns values when the ASPxGridView updates its data source example. Please let us know if you need further assistance.

      RV RV
      Raffaele Vitiello 1 8 years ago

        Ok,i use e.keys.Thank you.

        DevExpress Support Team 8 years ago

          You are welcome.

          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.