I have a database for tasks. Based on the date selected, I retrieve all the related tasks for that date, and then bind the data to a datagrid. This works fine - the appropriate records are displayed for the selected date. However, Im very new at using datagrids, so Im not sure how to add new records, update records, or delete records on the database and reflect the changes on the datagrid. Can anyone help me with how to do this?
Heres how Im binding the data to the datagrid:
DataAdapter.SelectCommand.CommandText = _
"SELECT Task_Date, Task_Description FROM TasksTable2 " & _
"WHERE Task_Date = #" & newDate & "#"
DataSet1.Clear()
DataAdapter.Fill(DataSet1, "Tasks")
dgdTasks.SetDataBinding(DataSet1, "Tasks")
Thanks, Donna
Heres how Im binding the data to the datagrid:
DataAdapter.SelectCommand.CommandText = _
"SELECT Task_Date, Task_Description FROM TasksTable2 " & _
"WHERE Task_Date = #" & newDate & "#"
DataSet1.Clear()
DataAdapter.Fill(DataSet1, "Tasks")
dgdTasks.SetDataBinding(DataSet1, "Tasks")
Thanks, Donna