L
Laura Stern
Guest
Sorry, but I still don't really understand. You cannot create a DataSet in the ProBindingSource designer. What you are doing there is telling the BindingSource what the schema of your existing DataSet is. So the steps you did of creating the DataSet and the buffers, hooking them together, attaching data sources and filling the DataSet are steps that can not be eliminated! Though of course it would be easier if you defined the DataSet statically, but maybe you can't do that. You can still design all the visual controls in the form using Visual Designer. But then you can create the BindingSource at runtime and bind the control to it and it to a query in your Form constructor as I said. That is about 3 lines of code. You would need to bind the BindingSource to the query at runtime anyway because obviously the query does not exist at design time. And this would actually run faster then setting up the BindingSource at design time. The thing you would be missing, as I said, is that the grid would not know the schema and therefore, you could not visually size the columns and such. But you could also do this through the control's designer, Your basic problem was that you set up the design-time schema as if you were going to bind to the DataSet as a whole but hen you bound the BindingSource to a single join query, not to the DataSet per se. And the query is what you want unless you want to visually see multiple tables in the grid hierarchically. You will need help from someone else regarding the BindingSource design time if you still want to use it and then have binding to the query work.
Continue reading...
Continue reading...