Hi friends
I am new to vb.net , I am having difficulty to add a calculated column to calculate
amount = salesPrice*qty in the code below
please help me
I am new to vb.net , I am having difficulty to add a calculated column to calculate
amount = salesPrice*qty in the code below
please help me
Code:
DataGridView1.ColumnCount = 5 DataGridView1.Columns(0).Name = "Product ID" DataGridView1.Columns(1).Name = "Product Name" DataGridView1.Columns(2).Name = "salesPrice" DataGridView1.Columns(3).Name = "qty" DataGridView1.Columns(4).Name = "amount" Dim row As String() = New String() {"1", "Product 1"} DataGridView1.Rows.Add(row) row = New String() {"2", "Product 2"} DataGridView1.Rows.Add(row) row = New String() {"3", "Product 3"} DataGridView1.Rows.Add(row) row = New String() {"4", "Product 4"} DataGridView1.Rows.Add(row)
Comment