What's new

Closed Help: regarding in datagridview count

Status
Not open for further replies.

earvinnill

Enthusiast
Joined
Feb 28, 2017
Posts
1
Reaction
0
Points
62
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.

Similar threads

Back
Top