website_name_txt.DataBindings.Add("Text", ds, "vinu_personal.WebsiteName");
            website_address_txt.DataBindings.Add("Text", ds, "vinu_personal.WebsiteAddress");
            username_txt.DataBindings.Add("Text", ds, "vinu_personal.MyUsername");
            password_txt.DataBindings.Add("Text", ds, "vinu_personal.MyPassword");
            others_txt.DataBindings.Add("Text", ds, "vinu_personal.Others");
            con.Close();
            this.Refresh();

can u plss mention the solution.

Recommended Answers

Probably you will need to refresh each control after changing the databinding.

Hope this helps

Jump to Post

All 2 Replies

Probably you will need to refresh each control after changing the databinding.

Hope this helps

What do you mean by refresh? Is you mean that the controls are automatially filled up with the appropriate data (based on some selection), then you need to bind each control. You can use DataSource property (for ie. dgv, comboBox, listBox, and set DisplayMember (and ValueMember if needed)) and DataBinding (like you showed in code snippet) to bind data to controls like listBox.
If you did it right, they have to update automatically, without calling any Refresh() method at all.

Tell me more about your issue, and specify your needs and whishes, and where from data are comming (is it from DataTable, or some generic List, or something else).

Be a part of the DaniWeb community

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