Bug Report Q261712
Visible to All Users

ASPxGridView - The e.OldValues dictionary has no values for template editors in the RowValidating event handler

created 15 years ago

I am having an issue with no values being populated in the OldValues of ASPxDataValidationEventArgs.
When I run through the code the first validation occurs as a result of performing a DoRowValidation(). When the validation routine runs, both OldValues and NewValues are populated correctly. The process continues and when the validation routine is run again, as a result of the database update, the NewValues are populated but the OldValues aren't. From everything I have read in the support center, this is not possible but I have included a zip file which contains both the aspx and aspx.vb files as well as a Word doc with screen shots showing the first and second passes through the validation routine.
I have debugged it everywhich way I know how but cannot determine why the OldValues are not populated.
Any suggestions would be welcome.

Show previous comments (5)

    Marion,
    Thank you for looking into my markup, however one of the columns that I am most concerned with (Premise) does indeed have the Value property.
                        <dx:GridViewDataComboBoxColumn Caption="<%$ Resources:RZAgro, Premise %>" FieldName="id_Premise"
                            VisibleIndex="1">
                            <PropertiesComboBox DataSourceID="sdsPremises" TextField="dt_NameEn" ValueField="pk">
                                <ValidationSettings SetFocusOnError="True">
                                    <RequiredField ErrorText="Please Select a valid value" IsRequired="True" />
                                </ValidationSettings>
                            </PropertiesComboBox>
                            <EditItemTemplate>
                                <dx:ASPxComboBox ID="cbProd" runat="server" DataSourceID="sdsPremises" TextField="dt_NameEn"
                                    ValueField="pk" Value='<%# Bind("id_Premise") %>' AutoPostBack="True" OnSelectedIndexChanged="Prod_SelectedIndexChanged"
                                    ValueType="System.Int32" ClientIDMode="AutoID"
                                    CssFilePath="~/App_Themes/Office2003Blue/{0}/styles.css"
                                    CssPostfix="Office2003Blue"
                                    SpriteCssFilePath="~/App_Themes/Office2003Blue/{0}/sprite.css">
                                    <LoadingPanelImage Url="~/App_Themes/Office2003Blue/Web/Loading.gif">
                                    </LoadingPanelImage>
                                    <ButtonStyle Width="13px">
                                    </ButtonStyle>
                                </dx:ASPxComboBox>
                            </EditItemTemplate>
                        </dx:GridViewDataComboBoxColumn>
    and it is set with the Bind: Value='<%# Bind("id_Premise") %>'
    Is there something else that I need to do to access it inside an EditItemTemplate?
    Regards,
    Stephen

    DevExpress Support Team 15 years ago

      Hello Stephen,
      Thank you for the clarification. Yes, I've reproduced the issue, and it looks like a bug. Therefore, I've decided to convert it to a bug issue and forwarded it to our developers for a detailed investigation. Sorry for a possible delay.
      Thanks,
      Marion

        Public patch applied - issue corrected

        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.