Current filter:
                                You should refresh the page.
                                Support Center
                                1
                                  • I need to iterate over all the rows in a grid and check for null values but only for the visible rows.

                                    How do I do that?

                                0

                                Hi Joseph,

                                Thank you for the message.

                                If you wish to traverse grid rows, you can use the approach demonstrated in the Traversing Rows help article.

                                If you wish to iterate through only visible rows in the grid, use the following approach:

                                [C#]
                                GridViewInfo viewInfo = gridView1.GetViewInfo() as GridViewInfo; foreach(GridRowInfo rowInfo in viewInfo.RowsInfo) { int rowHandle = rowInfo.RowHandle; // your code here }

                                We hope that you find this information helpful.

                                Thanks,
                                Svetlana

                                0

                                Sorry, I meant to say "only for the visible columns"

                                0

                                Hi Joseph,

                                The GridView has the VisibleColumns property representing a collection of currently visible columns. Also each column has the Visible property indicating whether this column is visible or hidden.
                                I have created a sample project where I set cells in visible columns to null by using the VisibleColumns property. You can find this sample in the attachment.

                                Thanks,
                                Ted.

                                0

                                Thank you very much!

                                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, ASP.NET, WinForms, HTML5 or Windows 10, DevExpress tools help you build and deliver your best in the shortest time possible.

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