🔒 Closed Help: regarding in datagridview count

Status
Not open for further replies.

earvinnill

Leecher
Rintrieve ko yung data ko sa dgv tapos pinasa ko yung value sa variable array

Dim meanminusdata(DataGridView1.RowCount) As String
Dim allnum(DataGridView1.RowCount) As String
Dim summation As String = 0

' MsgBox(DataGridView1.RowCount - 1)

'transfer the values of dgv to variable
For a As Integer = 0 To DataGridView1.RowCount - 1
If DataGridView1.Rows(a).Cells(3).Value = "" Then

Else

allnum(a) = Val(DataGridView1.Rows(a).Cells(3).Value)
MsgBox(DataGridView1.Rows(a).Cells(3).Value + "ASDF")
End If
Next

dito sa part na to kasi ay yung dgv ko ay may 6 na rows including yung blank row sa ilalim. ngayon kapag
nag forloop ako which is may -1. dapat lima lang yung data na makukuha ko diba? How come 6 na data parin ang narretrieve ko kung naka minus 1 naman ako.
 
Correct me if im wrong, row count yata sa vb ay magsisimula sa 0, bale kung may 6 na laman DB mo, magsisimula yan sa 0,1,2,3,4,5,6 bale pag binilang mo 7 sya lalabas, kaya may minus 1. Again di ko sure kung tama yan, tagal ko nang di nagvvb.
 
Correct me if im wrong, row count yata sa vb ay magsisimula sa 0, bale kung may 6 na laman DB mo, magsisimula yan sa 0,1,2,3,4,5,6 bale pag binilang mo 7 sya lalabas, kaya may minus 1. Again di ko sure kung tama yan, tagal ko nang di nagvvb.

If 6 po ang size.. 0 hanggang 5 po ang index.. ;(
 
Status
Not open for further replies.

About this Thread

  • 4
    Replies
  • 891
    Views
  • 3
    Participants
Last reply from:
FreeAllYouCan-OFFICIAL

Trending Topics

Online now

Members online
1,107
Guests online
1,617
Total visitors
2,724

Forum statistics

Threads
2,315,521
Posts
29,182,908
Members
1,182,625
Latest member
leon_li
Back
Top