27-10-19, 03:29 AM
PHP كود :
Private Sub Student_Somme_Ranking()
DataGridView1.Sort(DataGridView1.Columns(3), System.ComponentModel.ListSortDirection.Descending)
Dim g As Integer = 0
DataGridView1.Rows(0).Cells(4).Value = Student_Ranking(g)
For i As Integer = 1 To DataGridView1.Rows.Count - 2
If DataGridView1.Rows(i - 1).Cells(3).Value = DataGridView1.Rows(i).Cells(3).Value Then
DataGridView1.Rows(i).Cells(4).Value = DataGridView1.Rows(i - 1).Cells(4).Value.ToString.Split(New Char() {" "})(0) + " مكرّر"
g += 1
If g = 12 Then Exit For
ElseIf DataGridView1.Rows(i).Cells(3).Value < DataGridView1.Rows(i - 1).Cells(3).Value Then
g += 1
If g = 12 Then Exit For
DataGridView1.Rows(i).Cells(4).Value = Student_Ranking(g)
End If
Next
DataGridView1.Sort(DataGridView1.Columns(0), System.ComponentModel.ListSortDirection.Ascending)
End Sub
المشكلة بترتيب الاعمدة عندك في كودك اخر سطر اكتب رقم العامود 0 و ليس 1
سبحان الله وبحمده سبحان الله العظيم و الحمد لله ولا اله الا الله والله اكبر
