(15-04-17, 02:46 AM)khodor1985 كتب : أرفق المشروع للتعديل عليه وشكرا
لم اكتب شي في هذا الموضوع
كل ما اريد هو حدث التعديل
تم الحل شكرا لك اخي
Private Sub DataGridView1_CellEndEdit(ByVal sender As Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles DataGridView1.CellEndEdit
Dim n As Integer = DataGridView1.CurrentRow.Cells(3).Value
If n > firstquantite Then
MsgBox("لقد ادخلت كمية اكبر من الموجود في المخزن الرجاء ادخال كميه مناسبة", MsgBoxStyle.Critical)
DataGridView1.CurrentRow.Cells(3).Value = firstquantite
n = 0
End If
MsgBox(n)
End Sub
Private Sub DataGridView1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles DataGridView1.Click
DataGridView1.Columns("code_article").ReadOnly = True
DataGridView1.Columns("designation").ReadOnly = True
DataGridView1.Columns("prix_achat").ReadOnly = True
DataGridView1.Columns("date").ReadOnly = True
Dim pos As Integer = Me.DataGridView1.CurrentRow.Index
firstquantite = DataGridView1.Rows(pos).Cells(3).Value
End Sub