Hi friends
I new to using datagridview.I am trying to make a data entry form using an unbound dgv in which I have added columns and row using code but I have difficulty on how to calculate between columns.
I can do it if I add the columns in design time .I would like to know if it is possible to add expression column or calculates between two columns when i add columns and rows like this.
Code:
Dim dt As New DataTable
        dt.Columns.Add("col1")
        dt.Columns.Add("col2")
        dt.Columns.Add("col3")
        dt.Columns.Add("col4")
        dt.Columns.Add("total")
 
        dt.Rows.Add("")
        dt.Rows.Add("")
        dt.Rows.Add("")
        dt.Rows.Add("")
 
        Me.DataGridView1.DataSource = dt
        dt.Columns("total").Expression = "[col2]+[col3]"