Visual Basic:
Dim dr() As DataRow
Dim i As Integer
dr = SalesRep1.Tables("sales_representative").Select("ID = '" + searchtxt.Text + "'")
For i = 0 To UBound(dr)
MsgBox((dr(i)("Name")))
Next
In the above program if the user enters the sales_representative id it will search the SalesRep1 DataSet and display the name of the Sales Representative in Message Box. This is what I have done. It works perfectly.
I am displaying the Sales Representative Details in the DataGrid in form1 . There is also a search button in the bottom of the form1. Once the search button is clicked the above program gets triggered.
If the Sales_representative ID is available in the DataSet then I would like to highlight the details of the particular row in DataGrid say in red color.
Can we achieve this.