السلام عليكم
أردت فرز التسجيلات المعروضة على DataGridView فكان ذلك بواسطة
Dim foundRows As DataRow() = DataSet1.Tables("Table1").Select("Fld1 ='" & cbCJ.Text & "' And Folio = '" & tbFolio.Text & "' And Fld2 = '" & EcritN & "'")فتم الحصول على التسجيلات المعنية في الـ foundRows
كل ما أريده هو كيف هو كبف يتم تحديد DataGridViewRow على DataGridView الموافقة للتسجيلات الموجودة على foundRows
طبعا دون المرور على كل DataGridViewRow هذا قصد الجدية أكثر و ربح الوقت أيضا
يعني البديل لـ
For Each drv As DataGridViewRow In DataGridView1.Rows
If CType(drv.DataBoundItem.Row, DataSet1.Table1Row)("Fld1") = FildS Then
drv.Selected = True
DataGridView1.CurrentCell = DataGridView1(0, drv.Index)
End If
Next