20-05-20, 06:14 PM
20-05-20, 07:48 PM
PHP كود :
جرب هذا
For i = 0 To DataGridView1.RowCount - 1
If DataGridView1.Rows(i).Cells(4).Value Is Nothing OrElse DataGridView1.Rows(i).Cells(4).ToString.Trim = "" Then
DataGridView1.Rows(i).Visible = False
End If
Next
2.12.0.0
21-05-20, 12:07 PM
مشاركة لكم هذا الكود
![[صورة مرفقة: p2.png]](https://i.postimg.cc/d342L6FL/p2.png)
PHP كود :
Dim i As Integer
be:
For i = 0 To Me.DataGridView1.Rows.Count - IIf(Me.DataGridView1.AllowUserToAddRows, 2, 1)
If Me.DataGridView1.Rows(i).Cells(0).Value.ToString.Trim = "" Then
Me.DataGridView1.Rows.RemoveAt(i)
GoTo be
End If
Next
![[صورة مرفقة: p1.png]](https://i.postimg.cc/wM65qPSC/p1.png)
![[صورة مرفقة: p2.png]](https://i.postimg.cc/d342L6FL/p2.png)
03-03-24, 12:57 AM
(21-05-20, 12:07 PM)سعود كتب : [ -> ]مشاركة لكم هذا الكود
PHP كود :Dim i As Integer
be:
For i = 0 To Me.DataGridView1.Rows.Count - IIf(Me.DataGridView1.AllowUserToAddRows, 2, 1)
If Me.DataGridView1.Rows(i).Cells(0).Value.ToString.Trim = "" Then
Me.DataGridView1.Rows.RemoveAt(i)
GoTo be
End If
Next
بارك الله فيك وجزاك كل خير على الكود المفيد
(20-05-20, 07:48 PM)Alhootti1 كتب : [ -> ]و غير رقم الخلية في داتاغريد حسب ما تراه مناسباPHP كود :جرب هذا
For i = 0 To DataGridView1.RowCount - 1
If DataGridView1.Rows(i).Cells(4).Value Is Nothing OrElse DataGridView1.Rows(i).Cells(4).ToString.Trim = "" Then
DataGridView1.Rows(i).Visible = False
End If
Next
2.12.0.0
بارك الله فيك لقد نجح الكود