01-04-20, 01:08 PM
(01-04-20, 05:40 AM)سامي محمد كتب : أولا استورد مجال الاسماء هذا
بعد ذلك استبدل الكود الذي في حدث الكتابة للتكست بهذاكود :
Imports System.Text.RegularExpressions
كود :
Dim i As Integer = ListBox1.FindString(TextBox9.Text)
ListBox1.SelectedIndex = i
GgDataGridView.DataSource = Nothing
GgDataGridView.Rows.Clear()
Dim N As Integer
Dim Txt As String = Nothing
For Each x As String In TextBox9.Text
x = System.Text.RegularExpressions.Regex.Replace(x, "[إأآا]", "[إأآا]")
x = System.Text.RegularExpressions.Regex.Replace(x, "[هة]", "[هة]")
x = System.Text.RegularExpressions.Regex.Replace(x, "[وؤ]", "[وؤ]")
x = System.Text.RegularExpressions.Regex.Replace(x, "[يى]", "[يى]")
Txt &= x
Next
For Each x As DataRow In EeeeDataSet.gg.Rows
If System.Text.RegularExpressions.Regex.IsMatch(x(1), "^" & Txt) = True Then
GgDataGridView.Rows.Add()
GgDataGridView(0, N).Value = x(0)
GgDataGridView(1, N).Value = x(1)
GgDataGridView(2, N).Value = x(2)
N += 1
End If
Next
او حمله من المرفقات بعد التعديل
آسف لا داعي لكتابة هذا الجزء قبل كل عملية استبدال ان تم استيراد مجال الأسماء
System.Text.RegularExpressions.
شكرا اخي الكريم على مجهودك الرائع الكود يعمل بشك جيد
لكن انا كنت حابب عملية الفلترة تتم داخل الليست بوكس أيضا وليس الداتا كريت فيو فقط
