Guys, I really need your help !! I am using VB.Net & I have a Data Grid View in which I have 3 Columns and Dynamic Rows (user can insert rows based on their requirement). My problem is, I want to populate the value's in the rows that are being input by the User. For Example, user has input up to row 6. And I want to take the values from row 1-6 and calculate the MEAN, MEDIAN, VARIANCE, STANDARD DEVIATION, SIMPLE AVERAGE and so on and Display the result in Column 3 or may be in any text box. I Have attached the screen shot of my form. Plz help me out.
Haxorz
0
Newbie Poster
Recommended Answers
Jump to PostYou can read value at specific cell using,
var1=DataGridView1.Rows(0).Cells(0).Value ...
Jump to PostYou can use loop.
For i=0 to 5 var1=DataGridView1.Rows(i).Cells(0).Value Next
Jump to Post>click total button, its showing "False" in the MessageBox
Because You are comparing these two values.
Dim i As Integer = 0 Dim var1 As Integer=0 For i = 0 To 5 var1 = var1 + val(DataGrid1.Rows(i).Cells(0).Value) Next Msgbox(var1)
All 11 Replies
kvprajapati
1,826
Posting Genius
Team Colleague
Haxorz
0
Newbie Poster
kvprajapati
1,826
Posting Genius
Team Colleague
Haxorz
0
Newbie Poster
kvprajapati
1,826
Posting Genius
Team Colleague
Haxorz
0
Newbie Poster
kvprajapati
1,826
Posting Genius
Team Colleague
Haxorz
0
Newbie Poster
kvprajapati
1,826
Posting Genius
Team Colleague
Haxorz
0
Newbie Poster
Haxorz
0
Newbie Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.