i have datagridview with 3 columns the first column is Assessment1 the second column is Assessment 2
now i want to get the average of two columns to be as new column in data grid view
this code
any input is greatly appreciated
thanks
now i want to get the average of two columns to be as new column in data grid view
this code
PHP:
01
Dim dictionary As New Dictionary(Of String, Integer)
02
dictionary.Add("A", 100)
03
dictionary.Add("B", 85)
04
dictionary.Add("C", 70)
05
dictionary.Add("D", 60)
06
Dim combo1 = New DataGridViewComboBoxColumn
07
combo1.FlatStyle = FlatStyle.Flat
08
combo1.DisplayMember = "Key"
09
combo1.ValueMember = "Value"
10
combo1.HeaderText = "1st Assessment"
11
combo1.DataSource = New BindingSource(dictionary, Nothing)
12
DataGridView1.Columns.Insert(4, combo1)
13
14
Dim combo2 = New DataGridViewComboBoxColumn
15
combo2.FlatStyle = FlatStyle.Flat
16
combo2.DisplayMember = "Key"
17
combo2.ValueMember = "Value"
18
combo2.HeaderText = "2nd Assessment"
19
combo2.DataSource = New BindingSource(dictionary, Nothing)
20
DataGridView1.Columns.Insert(5, combo2)
21
22
Dim txtbox1 = New DataGridViewTextBoxColumn
23
24
25
'/ what should i write here to get the average for the values of two columns
any input is greatly appreciated
thanks