i have the following code, what want it to do is update when i add new records to my table from a separate form, at the moment i am getting all the table data, but if i add new data it is not visible here, but is saved in the table, i have to close the program and run it again for the saved data to be visible in the datagridview. my question is how do i update the datagridview, in order for the table info to be there at all times. The code i have is as follows:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace project
{
public partial class frmViewBookings : Form
{
public frmViewBookings()
{
InitializeComponent();
}
private void btnClose_Click(object sender, EventArgs e)
{
Form3 mainpage = new Form3();
mainpage.Show();
this.Close();
}
private void frmViewBookings_Load(object sender, EventArgs e)
{
// TODO: This line of code loads data into the 'usersDataSet1.Booking' table. You can move, or remove it, as needed.
this.bookingTableAdapter.Fill(this.usersDataSet1.Booking);
}
}
}
.DataBind()after updating? - DGibbsBinding Look Like? can you show where you are a declaringusersDataSet1looks like you are missing some code here - MethodMan