I have table which is connected to datagridview and I would like to enter new data by using text boxes. I have following code but it gives me error. Will be appreciated if you help me. Error Message is : Use the "new" keyword to create an object instance
Dim meter As DataTable = Me.DataSet1.Tables.Item("tblmeters")
Dim row As DataRow = meter.NewRow()
row.Item("No") = Me.txtno.Text
row.Item("Turnover") = Me.txtturnover.Text
row.Item("Total Win") = Me.txttotalwin.Text
row.Item("Games Played") = Me.txtgamesplayed.Text
row.Item("Credit In") = Me.txtcreditin.Text
row.Item("Bill In") = Me.txtbillin.Text
row.Item("Hand Pay") = Me.txthandpay.Text
row.Item("Date") = DateTime.Today.ToShortDateString
meter.Rows.Add(row)
Me.TblMeterTableAdapter.Update(Me.DataSet1.tblMeter)
meter.AcceptChanges()