Hi friends
I am new to using datagridview ,I am trying to learn how to add an expression column in datagridview .can someone tell me why the total column gives me wrong out put ?
I am new to using datagridview ,I am trying to learn how to add an expression column in datagridview .can someone tell me why the total column gives me wrong out put ?
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]"