Jump to content

"datagridview" Objesi Hücre Değeri Bulma


felischaus
 Share

Recommended Posts

İyi günler arkadaşlar, visual basic ile oluşturduğum bir "DataGridView" objesinde yer alan verilere göre istatistiki analizler yapabilen bir program yapmak istiyorum ve bunun için toplam x'lere ihtiyacım var. fakat bunu kodlarken hangi kod vasıtasıyla {1,b} hücresinin değerini elde edeceğimi bulamadım. Yardımcı olabilir misiniz?

 

 

Public Class Form1

    Dim a, c As Integer
    Private Sub DataGridView1_CellLeave(ByVal sender As System.Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles DataGridView1.CellLeave
        TextBox1.Text = DataGridView1.ColumnCount
        TextBox2.Text = DataGridView1.RowCount - 1
        'Toplam x değerleri;
        For b = Val(TextBox2.Text) To 1 Step -1
            c =[birinci sütun, b satırı değeri]
            a = a + c
        Next
        TextBox8.Text = a
    End Sub
End Class

 

Link to comment
Share on other sites

 Private Sub DataGridView1_CellLeave(ByVal sender As System.ObjectByVal e As System.Windows.Forms.DataGridViewCellEventArgsHandles DataGridView1.CellLeave

        TextBox1.Text = DataGridView1.ColumnCount
        TextBox2.Text = DataGridView1.RowCount - 1
        'Toplam x değerleri;
        For b = Val(TextBox2.Text) To 1 Step -1
            c = DataGridView1.Rows(e.RowIndex).Cells("sutun").Value
            a = a + c
        Next
        TextBox8.Text = a
    End Sub

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...