felischaus Posted November 23, 2013 Share Posted November 23, 2013 İ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 Quote Link to comment Share on other sites More sharing options...
bilaltr2 Posted November 27, 2013 Share Posted November 27, 2013 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 = DataGridView1.Rows(e.RowIndex).Cells("sutun").Value a = a + c Next TextBox8.Text = a End Sub Quote Link to comment Share on other sites More sharing options...
felischaus Posted November 28, 2013 Author Share Posted November 28, 2013 Çok teşekkürler :) Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.