0

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

3
Contributors
3
Replies
4
Views
4 Years
Discussion Span
Last Post by deceptikon
0

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

In my experience at least

0

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];
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.