11-06-18, 01:33 AM
(10-06-18, 09:22 PM)elgokr كتب : قم باستخدام الكود بهذه الطريقة
كود :
Dim column As New DataGridViewColumn
column.Name = "mm"
column.Width = 30
column.HeaderText = "mm"
column.CellTemplate = New DataGridViewTextBoxCell
dgv.Columns.Insert(0, column)
Dim i As Integer = 0
Dim ii As Integer = 1
For i = 0 To dgv.Rows.Count
ii += 1
dgv.Item("mm", i).Value = ii.ToString
Next
تحياتى لك
اسف على المداخله
بارك الله فيك وشكرا على الشرح والكود
عندي استفسار
اذا انا محدد في DataGridView1
ال column
كيف بيكون الكود بارك الله فيك
لاني جربت يطلع لي غلط
إقتباس :'Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index'
بارك الله فيك وشكرا

