Current filter:
                                You should refresh the page.
                                Support Center
                                0
                                  • Hi..
                                    How can I select a specific row in the gridview depends on one textbox
                                    for example I have one textbox (txtIDNO)
                                    and one gridview (gridview1)

                                    the gridview1 contains on columns (colIDNO, colIDNAME)
                                    what I want is when the user write a number inside the textbox
                                    the row that contains on same this number will select it inside the gridview

                                    thanks

                                0

                                Hello Jassim,

                                To accomplish this task, you can use the ColumnView.LocateByValue method. Also, please note that XtraGrid already provides similar built-in capabilities: Incremental Search and Find Panel.

                                Thanks,
                                Anatol

                                0

                                Thanks for your reply
                                I tried ColumnView.LocateByValue method
                                but its not select the row
                                with normal datagridview I can do it with the following code:

                                 Dim s As String = f2.txtCRSNO.Text.Trim
                                        f2.GridView1.ClearSelection()
                                        For x As Integer = 0 To f2.GridView1.Rows.Count - 1
                                            If CStr(f2.GridView1.Rows(x).Cells("colCRSNO").Value).StartsWith(s) Then
                                                f2.GridView1.FirstDisplayedScrollingRowIndex = x
                                                f2.GridView1.Item(0, x).Selected = True
                                                Exit Sub
                                            End If
                                        Next

                                but with DevExpress XtraGrid I can not do it,

                                0

                                Hello Jassim,

                                I apologize for an incomplete answer. As written in the corresponding help topic, the LocateByValue method finds a row and returns its handle. Then you can assign this row handle to the ColumnView.FocusedRowHandle property to select this row and make it visible.

                                Thanks,
                                Anatol

                                0

                                Hi,

                                I didn't get it..
                                can you write the exact code please

                                thanks

                                0

                                Hello Jassim,

                                I have attached a sample project. Please let me know whether the result meets your requirements.

                                Thanks,
                                Anatol

                                0

                                Yes
                                This is what I want..
                                its working now

                                Thanks

                                0

                                The issue solved

                                0

                                Please feel free to contact us in the future.

                                Thanks,
                                Anatol

                                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