|
Hello everybody: I am on my way to bug you all with a weird, yet not very important problem. The Background I created my very own data source component class, DrivesDataSource, that derives from Component and implements IListSource. It works just fine. I can drop it on a form, which positions it at the bottom of the form's designer. I can click it and my action items show and also behave properly. All good and nice. The Problem Well, not really a problem, but it bugs me. After I drop a DrivesDataSource component on a form and configure it, I am ready to start configuring my databound control of choice. Let's say listbox. I drop a listbox control on the form's surface and a new listbox appears. I click the action items arrow on top of the listbox, and then click the "Use data bound items" checkbox. This allows me to configure the listbox's DataSource property by showing a dropdown from where I can choose the data source. Well, when I click on the dropdown to choose the data source, my data source is listed under "Other data sources/Form1 List Instances". I thought this was normal because DataSet components also show here. But if I drop a BindingSource component on the form, the BindingSource component shows in the root of the dropdown list of data sources. Why? So not really a problem, but it bugs me why this BindingSource control has the "right" to appear on the root of the list while my own component is two levels down. Anybody can help me sort this out? By the way, I read the MSDN documentation on BindingSource and it wasn't too revealing. At this point, I don't even conceive the usefulness of BindingSource, especially because in theory, databound controls can accept an IList directly, so what's the point of this guy? hehe, so it seems that I have two questions. Cheers! MCP- Moved byJialiang Ge [MSFT]MSFTTuesday, September 01, 2009 8:11 AMmove to winform designer forum. (From:.NET Base Class Library)
-
| | webJose Thursday, August 27, 2009 2:59 AM | | | Christoph Wagner Thursday, August 27, 2009 6:19 AM | Hello MCP
"Other Data Sources�is designed to contain all project data sources and local form list instances. Your form list instance DrivesDataSource is therefore listed under the node. There is no API to move your source to the front. However when user selects a data source under “Other Data Sources� the data source will automatically be appended to the root of the list. DataSets exhibits this behavior. Please try your component and let me know if it works for you.
Thanks, Jialiang Ge MSDN Subscriber Support in Forum If you have any feedback of our support, please contact msdnmg@microsoft.com.
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
Welcome to the All-In-One Code Framework! If you have any feedback, please tell us. | | Jialiang Ge [MSFT] Thursday, August 27, 2009 7:20 AM | To Christoph: I'll check out your link. What I read was the explanation provided in the Class Overview. This one seems a lot more complete. I hope I will understand with it. To Jialiang: Thank you for your post. I checked, and my data source is not appended to the root after its first use. What I did: I have a form where I dropped a DrivesDataSource component. I then dropped a listbox and made it databound against my DrivesDataSource. I proceeded to drop a DataGridView control. I clicked the DataSource property dropdown where I can still select my DrivesDataSource component, but not from the root, only from the original location (local list instances). But even it this were true and even if it worked, my question really is: Why BindingSource appears in the root? What requirements do data sources need to fulfill in order to make it to the root? Can I make my DrivesDataSource appear in the root? Thank you all. MCP- Proposed As Answer byAmare1982 Wednesday, September 09, 2009 5:19 AM
- Unproposed As Answer bywebJose Wednesday, September 09, 2009 12:38 PM
-
| | webJose Thursday, August 27, 2009 1:25 PM | Hello MCP In order to involve more appropriate expert pool into this winform designer question, I move the thread to the Winform Designer Forum. http://social.msdn.microsoft.com/Forums/en-US/winformsdesigner/threadsMy collegues who are good at Winform designer will continue tohelp you in this thread. Thanks, Jialiang Ge MSDN Subscriber Support in ForumIf you have any feedback of our support, please contact msdnmg@microsoft.com.
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
Welcome to the All-In-One Code Framework! If you have any feedback, please tell us. - Proposed As Answer byAmare1982 Wednesday, September 09, 2009 5:19 AM
- Unproposed As Answer bywebJose Wednesday, September 09, 2009 12:38 PM
-
| | Jialiang Ge [MSFT] Tuesday, September 01, 2009 8:10 AM | Thank you. Much appreciated. I guess I should have my other threads here too. :-D MCP | | webJose Tuesday, September 01, 2009 7:20 PM |
|