Jump to content

expression column in datagridview


rony_78

Recommended Posts

I am trying to learn how to add an expression column in datagridview but its not giving me correct out putcan someone show me how to do it?

	 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]"

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...