تقييم الموضوع :
  • 0 أصوات - بمعدل 0
  • 1
  • 2
  • 3
  • 4
  • 5
[VB.NET] استفسار
#1
السلام عليكم كيف يمكن جعل عمود اول في قريد فيو يمكن تحديد checkbox فيه فقط معا بقاء علي خاصية readonly  للقريد فيو
هل هدا ممكن او لا

(08-11-22, 11:09 PM)ali_ahmed12 كتب : السلام عليكم كيف يمكن جعل عمود اول في قريد فيو يمكن تحديد checkbox فيه فقط معا بقاء علي خاصية readonly  للقريد فيو
هل هدا ممكن او لا


الملفات المرفقة صورة/صور
   
الرد }}}
تم الشكر بواسطة:
#2
(08-11-22, 11:09 PM)ali_ahmed12 كتب : السلام عليكم كيف يمكن جعل عمود اول في قريد فيو يمكن تحديد checkbox فيه فقط معا بقاء علي خاصية readonly  للقريد فيو
هل هدا ممكن او لا

(08-11-22, 11:09 PM)ali_ahmed12 كتب : السلام عليكم كيف يمكن جعل عمود اول في قريد فيو يمكن تحديد checkbox فيه فقط معا بقاء علي خاصية readonly  للقريد فيو
هل هدا ممكن او لا


DataGridView1.ReadOnly = False
DataGridView1.Columns(0).ReadOnly = False
For i = 1 To DataGridView1.Columns.Count - 1
   DataGridView1.Columns(i).ReadOnly = True
Next
الرد }}}
تم الشكر بواسطة:
#3
(08-11-22, 11:23 PM)odai كتب :
(08-11-22, 11:09 PM)ali_ahmed12 كتب : السلام عليكم كيف يمكن جعل عمود اول في قريد فيو يمكن تحديد checkbox فيه فقط معا بقاء علي خاصية readonly  للقريد فيو
هل هدا ممكن او لا

(08-11-22, 11:09 PM)ali_ahmed12 كتب : السلام عليكم كيف يمكن جعل عمود اول في قريد فيو يمكن تحديد checkbox فيه فقط معا بقاء علي خاصية readonly  للقريد فيو
هل هدا ممكن او لا


DataGridView1.ReadOnly = False
DataGridView1.Columns(0).ReadOnly = False
For i = 1 To DataGridView1.Columns.Count - 1
   DataGridView1.Columns(i).ReadOnly = True
Next

اريد كود هدا ينفد فقط عندما اضغط علي عمود زر فقط وهو في عمود 1 في قريد فيو 
في اي حدث اضعه 
كود :
  If DataGridView1.Columns(1).Name = "btn" Then
           Dim dr As DataGridViewRow = DataGridView1.SelectedRows(0)
           labell.Text = dr.Cells(3).Value
           label_product.Text = dr.Cells(4).Value
           UNIT.Text = dr.Cells(5).Value
           DateTimePicker1.Text = dr.Cells(6).Value
           Qty.Text = dr.Cells(7).Value
           TKLFA.Text = dr.Cells(8).Value
           Price.Text = dr.Cells(9).Value
       End If
الرد }}}
تم الشكر بواسطة:
#4
(08-11-22, 11:37 PM)ali_ahmed12 كتب :
(08-11-22, 11:23 PM)odai كتب :
(08-11-22, 11:09 PM)ali_ahmed12 كتب : السلام عليكم كيف يمكن جعل عمود اول في قريد فيو يمكن تحديد checkbox فيه فقط معا بقاء علي خاصية readonly  للقريد فيو
هل هدا ممكن او لا

(08-11-22, 11:09 PM)ali_ahmed12 كتب : السلام عليكم كيف يمكن جعل عمود اول في قريد فيو يمكن تحديد checkbox فيه فقط معا بقاء علي خاصية readonly  للقريد فيو
هل هدا ممكن او لا


DataGridView1.ReadOnly = False
DataGridView1.Columns(0).ReadOnly = False
For i = 1 To DataGridView1.Columns.Count - 1
   DataGridView1.Columns(i).ReadOnly = True
Next

اريد كود هدا ينفد فقط عندما اضغط علي عمود زر فقط وهو في عمود 1 في قريد فيو 
في اي حدث اضعه 
كود :
  If DataGridView1.Columns(1).Name = "btn" Then
           Dim dr As DataGridViewRow = DataGridView1.SelectedRows(0)
           labell.Text = dr.Cells(3).Value
           label_product.Text = dr.Cells(4).Value
           UNIT.Text = dr.Cells(5).Value
           DateTimePicker1.Text = dr.Cells(6).Value
           Qty.Text = dr.Cells(7).Value
           TKLFA.Text = dr.Cells(8).Value
           Price.Text = dr.Cells(9).Value
       End If

Private Sub DataGridView1_CellClick(sender As Object, e As DataGridViewCellEventArgs) Handles DataGridView1.CellClick
   If e.ColumnIndex = 1 Then
       If DataGridView1.Columns(1).Name = "btn" Then
           Dim dr As DataGridViewRow = DataGridView1.SelectedRows(0)
           labell.Text = dr.Cells(3).Value
           label_product.Text = dr.Cells(4).Value
           UNIT.Text = dr.Cells(5).Value
           DateTimePicker1.Text = dr.Cells(6).Value
           Qty.Text = dr.Cells(7).Value
           TKLFA.Text = dr.Cells(8).Value
           Price.Text = dr.Cells(9).Value
       End If
   End If
End Sub
الرد }}}
تم الشكر بواسطة:
#5
(08-11-22, 11:44 PM)odai كتب :
(08-11-22, 11:37 PM)ali_ahmed12 كتب :
(08-11-22, 11:23 PM)odai كتب :
(08-11-22, 11:09 PM)ali_ahmed12 كتب : السلام عليكم كيف يمكن جعل عمود اول في قريد فيو يمكن تحديد checkbox فيه فقط معا بقاء علي خاصية readonly  للقريد فيو
هل هدا ممكن او لا

(08-11-22, 11:09 PM)ali_ahmed12 كتب : السلام عليكم كيف يمكن جعل عمود اول في قريد فيو يمكن تحديد checkbox فيه فقط معا بقاء علي خاصية readonly  للقريد فيو
هل هدا ممكن او لا


DataGridView1.ReadOnly = False
DataGridView1.Columns(0).ReadOnly = False
For i = 1 To DataGridView1.Columns.Count - 1
   DataGridView1.Columns(i).ReadOnly = True
Next

اريد كود هدا ينفد فقط عندما اضغط علي عمود زر فقط وهو في عمود 1 في قريد فيو 
في اي حدث اضعه 
كود :
  If DataGridView1.Columns(1).Name = "btn" Then
           Dim dr As DataGridViewRow = DataGridView1.SelectedRows(0)
           labell.Text = dr.Cells(3).Value
           label_product.Text = dr.Cells(4).Value
           UNIT.Text = dr.Cells(5).Value
           DateTimePicker1.Text = dr.Cells(6).Value
           Qty.Text = dr.Cells(7).Value
           TKLFA.Text = dr.Cells(8).Value
           Price.Text = dr.Cells(9).Value
       End If

Private Sub DataGridView1_CellClick(sender As Object, e As DataGridViewCellEventArgs) Handles DataGridView1.CellClick
   If e.ColumnIndex = 1 Then
       If DataGridView1.Columns(1).Name = "btn" Then
           Dim dr As DataGridViewRow = DataGridView1.SelectedRows(0)
           labell.Text = dr.Cells(3).Value
           label_product.Text = dr.Cells(4).Value
           UNIT.Text = dr.Cells(5).Value
           DateTimePicker1.Text = dr.Cells(6).Value
           Qty.Text = dr.Cells(7).Value
           TKLFA.Text = dr.Cells(8).Value
           Price.Text = dr.Cells(9).Value
       End If
   End If
End Sub

انا اريد عندما اضغط علي زر اول فقط يظهر في تكست بوكس وليس اي خليه في قريد فيو
وتوجد مشكله اخري وهيا يمكن تعديل في اي خانه في قريد نفسه كيف منع ذلك 
لانه كودك فعل خليه اول لكي اتمكن من تحديد شيك بوكس وفعل معاه باقي خانات قريد فيو
الرد }}}
تم الشكر بواسطة:
#6
(08-11-22, 11:47 PM)ali_ahmed12 كتب :
(08-11-22, 11:44 PM)odai كتب :
(08-11-22, 11:37 PM)ali_ahmed12 كتب :
(08-11-22, 11:23 PM)odai كتب :
(08-11-22, 11:09 PM)ali_ahmed12 كتب : السلام عليكم كيف يمكن جعل عمود اول في قريد فيو يمكن تحديد checkbox فيه فقط معا بقاء علي خاصية readonly  للقريد فيو
هل هدا ممكن او لا



DataGridView1.ReadOnly = False
DataGridView1.Columns(0).ReadOnly = False
For i = 1 To DataGridView1.Columns.Count - 1
   DataGridView1.Columns(i).ReadOnly = True
Next

اريد كود هدا ينفد فقط عندما اضغط علي عمود زر فقط وهو في عمود 1 في قريد فيو 
في اي حدث اضعه 
كود :
  If DataGridView1.Columns(1).Name = "btn" Then
           Dim dr As DataGridViewRow = DataGridView1.SelectedRows(0)
           labell.Text = dr.Cells(3).Value
           label_product.Text = dr.Cells(4).Value
           UNIT.Text = dr.Cells(5).Value
           DateTimePicker1.Text = dr.Cells(6).Value
           Qty.Text = dr.Cells(7).Value
           TKLFA.Text = dr.Cells(8).Value
           Price.Text = dr.Cells(9).Value
       End If

Private Sub DataGridView1_CellClick(sender As Object, e As DataGridViewCellEventArgs) Handles DataGridView1.CellClick
   If e.ColumnIndex = 1 Then
       If DataGridView1.Columns(1).Name = "btn" Then
           Dim dr As DataGridViewRow = DataGridView1.SelectedRows(0)
           labell.Text = dr.Cells(3).Value
           label_product.Text = dr.Cells(4).Value
           UNIT.Text = dr.Cells(5).Value
           DateTimePicker1.Text = dr.Cells(6).Value
           Qty.Text = dr.Cells(7).Value
           TKLFA.Text = dr.Cells(8).Value
           Price.Text = dr.Cells(9).Value
       End If
   End If
End Sub

القصد عندما اضغط علي زر في حدث cellclik في خليه كنت بامكاني عدم فعل زر من اول انا اقصد عندما اضغط علي زر فقط 
وتوجد مشكله اخر وهيا يمكنني تعديل خانات قريد فيو ماالحل







Private Sub DataGridView1_CellClick(sender As Object, e As DataGridViewCellEventArgs) Handles DataGridView1.CellClick
   If e.ColumnIndex = 1 Then
       Dim dr As DataGridViewRow = DataGridView1.Rows(e.RowIndex)
       labell.Text = dr.Cells(3).Value
       label_product.Text = dr.Cells(4).Value
       UNIT.Text = dr.Cells(5).Value
       DateTimePicker1.Text = dr.Cells(6).Value
       Qty.Text = dr.Cells(7).Value
       TKLFA.Text = dr.Cells(8).Value
       Price.Text = dr.Cells(9).Value
   End If
End Sub
الرد }}}
تم الشكر بواسطة:
#7
(08-11-22, 11:50 PM)odai كتب :
(08-11-22, 11:47 PM)ali_ahmed12 كتب :
(08-11-22, 11:44 PM)odai كتب :
(08-11-22, 11:37 PM)ali_ahmed12 كتب :
(08-11-22, 11:23 PM)odai كتب : DataGridView1.ReadOnly = False
DataGridView1.Columns(0).ReadOnly = False
For i = 1 To DataGridView1.Columns.Count - 1
   DataGridView1.Columns(i).ReadOnly = True
Next

اريد كود هدا ينفد فقط عندما اضغط علي عمود زر فقط وهو في عمود 1 في قريد فيو 
في اي حدث اضعه 
كود :
  If DataGridView1.Columns(1).Name = "btn" Then
           Dim dr As DataGridViewRow = DataGridView1.SelectedRows(0)
           labell.Text = dr.Cells(3).Value
           label_product.Text = dr.Cells(4).Value
           UNIT.Text = dr.Cells(5).Value
           DateTimePicker1.Text = dr.Cells(6).Value
           Qty.Text = dr.Cells(7).Value
           TKLFA.Text = dr.Cells(8).Value
           Price.Text = dr.Cells(9).Value
       End If

Private Sub DataGridView1_CellClick(sender As Object, e As DataGridViewCellEventArgs) Handles DataGridView1.CellClick
   If e.ColumnIndex = 1 Then
       If DataGridView1.Columns(1).Name = "btn" Then
           Dim dr As DataGridViewRow = DataGridView1.SelectedRows(0)
           labell.Text = dr.Cells(3).Value
           label_product.Text = dr.Cells(4).Value
           UNIT.Text = dr.Cells(5).Value
           DateTimePicker1.Text = dr.Cells(6).Value
           Qty.Text = dr.Cells(7).Value
           TKLFA.Text = dr.Cells(8).Value
           Price.Text = dr.Cells(9).Value
       End If
   End If
End Sub

القصد عندما اضغط علي زر في حدث cellclik في خليه كنت بامكاني عدم فعل زر من اول انا اقصد عندما اضغط علي زر فقط 
وتوجد مشكله اخر وهيا يمكنني تعديل خانات قريد فيو ماالحل







Private Sub DataGridView1_CellClick(sender As Object, e As DataGridViewCellEventArgs) Handles DataGridView1.CellClick
   If e.ColumnIndex = 1 Then
       Dim dr As DataGridViewRow = DataGridView1.Rows(e.RowIndex)
       labell.Text = dr.Cells(3).Value
       label_product.Text = dr.Cells(4).Value
       UNIT.Text = dr.Cells(5).Value
       DateTimePicker1.Text = dr.Cells(6).Value
       Qty.Text = dr.Cells(7).Value
       TKLFA.Text = dr.Cells(8).Value
       Price.Text = dr.Cells(9).Value
   End If
End Sub
يمكنني تعديل في خانات قريد كيف امنع دلك


الملفات المرفقة صورة/صور
   
الرد }}}
تم الشكر بواسطة:
#8
(08-11-22, 11:57 PM)ali_ahmed12 كتب :
(08-11-22, 11:50 PM)odai كتب :
(08-11-22, 11:47 PM)ali_ahmed12 كتب :
(08-11-22, 11:44 PM)odai كتب :
(08-11-22, 11:37 PM)ali_ahmed12 كتب : اريد كود هدا ينفد فقط عندما اضغط علي عمود زر فقط وهو في عمود 1 في قريد فيو 
في اي حدث اضعه 
كود :
  If DataGridView1.Columns(1).Name = "btn" Then
           Dim dr As DataGridViewRow = DataGridView1.SelectedRows(0)
           labell.Text = dr.Cells(3).Value
           label_product.Text = dr.Cells(4).Value
           UNIT.Text = dr.Cells(5).Value
           DateTimePicker1.Text = dr.Cells(6).Value
           Qty.Text = dr.Cells(7).Value
           TKLFA.Text = dr.Cells(8).Value
           Price.Text = dr.Cells(9).Value
       End If

Private Sub DataGridView1_CellClick(sender As Object, e As DataGridViewCellEventArgs) Handles DataGridView1.CellClick
   If e.ColumnIndex = 1 Then
       If DataGridView1.Columns(1).Name = "btn" Then
           Dim dr As DataGridViewRow = DataGridView1.SelectedRows(0)
           labell.Text = dr.Cells(3).Value
           label_product.Text = dr.Cells(4).Value
           UNIT.Text = dr.Cells(5).Value
           DateTimePicker1.Text = dr.Cells(6).Value
           Qty.Text = dr.Cells(7).Value
           TKLFA.Text = dr.Cells(8).Value
           Price.Text = dr.Cells(9).Value
       End If
   End If
End Sub

القصد عندما اضغط علي زر في حدث cellclik في خليه كنت بامكاني عدم فعل زر من اول انا اقصد عندما اضغط علي زر فقط 
وتوجد مشكله اخر وهيا يمكنني تعديل خانات قريد فيو ماالحل







Private Sub DataGridView1_CellClick(sender As Object, e As DataGridViewCellEventArgs) Handles DataGridView1.CellClick
   If e.ColumnIndex = 1 Then
       Dim dr As DataGridViewRow = DataGridView1.Rows(e.RowIndex)
       labell.Text = dr.Cells(3).Value
       label_product.Text = dr.Cells(4).Value
       UNIT.Text = dr.Cells(5).Value
       DateTimePicker1.Text = dr.Cells(6).Value
       Qty.Text = dr.Cells(7).Value
       TKLFA.Text = dr.Cells(8).Value
       Price.Text = dr.Cells(9).Value
   End If
End Sub
يمكنني تعديل في خانات قريد كيف امنع دلك












DataGridView1.ReadOnly = False
DataGridView1.Columns(0).ReadOnly = False
For i = 1 To DataGridView1.Columns.Count - 1
DataGridView1.Columns(i).ReadOnly = True
Next
الرد }}}
تم الشكر بواسطة:
#9
(08-11-22, 11:58 PM)odai كتب :
(08-11-22, 11:57 PM)ali_ahmed12 كتب :
(08-11-22, 11:50 PM)odai كتب :
(08-11-22, 11:47 PM)ali_ahmed12 كتب :
(08-11-22, 11:44 PM)odai كتب : Private Sub DataGridView1_CellClick(sender As Object, e As DataGridViewCellEventArgs) Handles DataGridView1.CellClick
   If e.ColumnIndex = 1 Then
       If DataGridView1.Columns(1).Name = "btn" Then
           Dim dr As DataGridViewRow = DataGridView1.SelectedRows(0)
           labell.Text = dr.Cells(3).Value
           label_product.Text = dr.Cells(4).Value
           UNIT.Text = dr.Cells(5).Value
           DateTimePicker1.Text = dr.Cells(6).Value
           Qty.Text = dr.Cells(7).Value
           TKLFA.Text = dr.Cells(8).Value
           Price.Text = dr.Cells(9).Value
       End If
   End If
End Sub

القصد عندما اضغط علي زر في حدث cellclik في خليه كنت بامكاني عدم فعل زر من اول انا اقصد عندما اضغط علي زر فقط 
وتوجد مشكله اخر وهيا يمكنني تعديل خانات قريد فيو ماالحل







Private Sub DataGridView1_CellClick(sender As Object, e As DataGridViewCellEventArgs) Handles DataGridView1.CellClick
   If e.ColumnIndex = 1 Then
       Dim dr As DataGridViewRow = DataGridView1.Rows(e.RowIndex)
       labell.Text = dr.Cells(3).Value
       label_product.Text = dr.Cells(4).Value
       UNIT.Text = dr.Cells(5).Value
       DateTimePicker1.Text = dr.Cells(6).Value
       Qty.Text = dr.Cells(7).Value
       TKLFA.Text = dr.Cells(8).Value
       Price.Text = dr.Cells(9).Value
   End If
End Sub
يمكنني تعديل في خانات قريد كيف امنع دلك











DataGridView1.ReadOnly = False
DataGridView1.Columns(0).ReadOnly = False
For i = 1 To DataGridView1.Columns.Count - 1
  DataGridView1.Columns(i).ReadOnly = True
Next
لاتزال نفس مشكله يمكن تعديل باقي خلايا صف اريد عمود صفر فقط يمكن تحديد شيك بوكس لكن باقي صفوف لايمكن تغير به شي

في form_load
الرد }}}
تم الشكر بواسطة:



التنقل السريع :


يقوم بقرائة الموضوع: