Hi is it possible to see wich controls are bound to a dataset ? For example is it possible to see that a TextBox is bound to a field in a datatable of a dataset ? And i only know of the existense of the DataTable / DataSet Greetings Andre Mens
Hi, Thank you for posting. If a control is bound to a datasource at design-time, you could see the data binding at the DataBindings part in the Properties Window. If a control is bound to a datasource at run-time, you could not see the data binding in the Properties Window. But you could see the data binding in your code. For example, the code for binding a TextBox to a field of a datatable may be the following: this.textBox1.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.dataSet11, "Persons.PersonID", true)); Hope this is helpful to you. If you have any other concerns or need anything else, please don't hesitate to let me know. Sincerely, Linda Liu Microsoft Online Community Support ==================================================== When responding to posts,please "Reply to Group" via your newsreader so that others may learn and benefit from your issue. ====================================================
Hi Linda (Thx for your response) Sorry i think i didn't explain enough for what i was trying to ask. I was wondering if there was a way to see from the the instance of a BindingSource wich controls are bound to it so they are notified when something is changed in the data. Al this i want to do in code. So is there some list available with al subscribers ? Hope this is making more clear my question Greetings Andre
Hi Andre, Thank you for your response. When you bind a control to a data source, an instance of a Binding representing this data binding will be generated and added to the DataBindings collection of the control. You could not see from an instance of a BindingSource which controls are bound to it. And there's no list available with all subscribers. You can only see from the control which data source it is bound to. Hope this is helpful to you. If you have any other concerns or need anything else, please don't hesitate to let me know. Sincerely, Linda Liu Microsoft Online Community Support ==================================================== When responding to posts,please "Reply to Group" via your newsreader so that others may learn and benefit from your issue. ====================================================
Don't see what you're looking for? Try a search.
|