Current filter:
                                You should refresh the page.
                                Support Center
                                0
                                  • I'm trying to change the backcolor of a row based on it's state (I need to change the color if the row has unsaved edits). I'm using the gridView RowStyle event:

                                    If e.State = GridRowCellState.Dirty Then
                                                e.Appearance.BackColor = Color.Yellow
                                                e.Appearance.BackColor2 = Color.YellowGreen
                                    End If

                                    I've set the optionsView EnableAppearance even/odd to false.

                                    This seems to have no effect. When is the RowStyle event fired? Does the .Dirty enum indicate a row has some changes? Is there some other way to achieve this?

                                0

                                Sorry for double post, left out meaningful subject.

                                I'm trying to change the backcolor of a row based on it's state (I need to change the color if the row has unsaved edits). I'm using the gridView RowStyle event:

                                If e.State = GridRowCellState.Dirty Then
                                            e.Appearance.BackColor = Color.Yellow
                                            e.Appearance.BackColor2 = Color.YellowGreen
                                End If

                                I've set the optionsView EnableAppearance even/odd to false.

                                This seems to have no effect. When is the RowStyle event fired? Does the .Dirty enum indicate a row has some changes? Is there some other way to achieve this?

                                0

                                Hello Tim,

                                The e.State set to Dirty does not mean that the corresponding data row was changed. This enumeration unit is used for inner purposes. However, you can easily recognize whether the data row was changed. You only need to get the data row by the row handle of the processed grid row and check its RowState property. Please review a sample that illustrates my suggestion.

                                Thank you,
                                Paul

                                DXSample.zip
                                0

                                Thanks Paul, that works great.

                                0

                                Please feel free to ask us questions on any further problems you may have. We are glad to help you at any time.

                                Thank you,
                                Paul

                                0

                                Paul, this question is related so I will just reactivate this issue.

                                I'm using the embedded navigators to let the enduser control editing. I've noticed that when I move off of a row, then back onto the row, the end edit button does not reactivate unless the enduser clicks on the specific cell that was edited. Is there anyway to change this behavior to the end edit button reactivating if the enduser just goes back to the row, and not necessarily finding the specific cell? If not, can you give me an example of how to modify the code you provided to just highlight the edited cell? I need to give my endusers some easy way to identify a row that has been edited and allow them to use the end edit button. I would prefer the first scenario above. Thanks again.

                                0

                                Hello,

                                I'm sorry, the task you are describing is not quite clear to me. The end edit button is used for end editing in the currently active cell. So, the edit button is active only if a particular cell is active, this is by design. As far as I understand, you want to activate the end edit button every time the user moves cursor to one of the changed row. If it's so could you please explain in detail what action you wish to do on pressing the end edit button, etc.?
                                Speaking about highlighting individual cells, I would like to know which cells you want to highlight: the cells that have been modified in the changed rows, or only in the latest modified row? The short description of problem domain might be also helpful, so we can understand your task specificity better.

                                Thank you,
                                Paul

                                To start a chat you should create a support ticket


                                If you need additional product information, write to us at info@devexpress.com or call us at +1 (818) 844-3383

                                FOLLOW US

                                DevExpress engineers feature-complete Presentation Controls, IDE Productivity Tools, Business Application Frameworks, and Reporting Systems for Visual Studio, along with high-performance HTML JS Mobile Frameworks for developers targeting iOS, Android and Windows Phone. Whether using WPF, Silverlight, ASP.NET, WinForms, HTML5 or Windows 8, DevExpress tools help you build and deliver your best in the shortest time possible.

                                Copyright © 1998-2014 Developer Express Inc.
                                All trademarks or registered trademarks are property of their respective owners