hi guyzzz

in visual studio the form guest i added guest info i added
it is added but not show in datagirdview and also not display in girdview

but it is added in database SQL but not show in girdview

plzzzzz any one tell me

You need to re-bind the datagridview after updating the data. It does not automatically rebind information.

In my experience at least

how?

this is my displaydata code

 public DataTable displaydataaa()
        {


            string ConString = @"Data source = .\SqlExpress ; Database=htm ;Integrated security=true";

            SqlConnection con = new SqlConnection(ConString);
            SqlDataAdapter da = new SqlDataAdapter();
            da.SelectCommand = new SqlCommand(@"SELECT     dbo.GuestInfo.First_name AS First_Name, dbo.GuestInfo.Last_name AS [Last Name], dbo.GenderStatus.Gender_status AS Gender_Status,  dbo.MartialStatus.Martial_Status AS Martial_Status, dbo.GuestInfo.Phone_number AS Phone_Number, dbo.GuestInfo.Email_address AS Email_Address
FROM         dbo.GuestInfo INNER JOIN  dbo.GenderStatus ON dbo.GuestInfo.Gender_ID = dbo.GenderStatus.Gender_ID INNER JOIN dbo.MartialStatus ON dbo.GuestInfo.Martial_ID = dbo.MartialStatus.Martial_ID AND dbo.GuestInfo.Last_name = dbo.MartialStatus.Martial_Status
", con);

            da.Fill(ds);

            //ds.Clear();
            return ds.Tables[0];

how?

The same way you got data into the datagridview in the first place.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.