Hello,
I have a datagridview on my form which populates when the form is loaded.
As you can see by my code, one of the columns in this datagridview is "Hours".
I would like a textbox at the bottom to show the total of this "hours" column.Code:Try dsOvertime = Overtime.Get_Overtime() Dim dv As DataView dv = New DataView(dsOvertime.Tables(0)) dgvOvertime.DataSource = dv dgvOvertime.ReadOnly = True dgvOvertime.Columns("OvertimeID").Visible = True dgvOvertime.Columns("Employee").Visible = True dgvOvertime.Columns("OvertimeDate").Visible = True dgvOvertime.Columns("Hours").Visible = True Catch ex As Exception MessageBox.Show(ex.ToString) End Try
How do I do it please ?
I've been searching on here and on the following thread jmcilhinney has suggested a line of code, but it relies os the Datagridview being bound to a datatable.
http://www.vbforums.com/showthread.php?t=439382
As I don't know how to do this, I can't get any further.




Reply With Quote