0
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.

Edited by ~s.o.s~: Added code tags, learn to use them.

3
Contributors
2
Replies
3
Views
6 Years
Discussion Span
Last Post by Mitja Bonca
0

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).

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.