By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,825 Members | 1,055 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,825 IT Pros & Developers. It's quick & easy.

bindingsource in partial

P: n/a
Hi all!

Is it possible to have a bindingsource in a partial class?
Well it is possible, but I have the following issues:
- this.components is defined in the .designer.cs file. If I call my
own initialization method before the GUI's one, I will not have
this.components. If I call it after, it's too late, because I'd like
to bind it to a GUI component
- my IDE (#develop) doesn't display my own partial class as part of
the Form. What should I do to make it understood that my class belongs
to that?

ps: the reason for requiring it to be in a partial is to generate that
piece of code.

Thanks
Gergo
Jul 11 '08 #1
Share this Question
Share on Google+
2 Replies


P: n/a
On Jul 11, 5:26*pm, pihentagy <pihent...@gmail.comwrote:
Hi all!

Is it possible to have a bindingsource in a partial class?
Well it is possible, but I have the following issues:
- this.components is defined in the .designer.cs file. If I call my
own initialization method before the GUI's one, I will not have
this.components. If I call it after, it's too late, because I'd like
to bind it to a GUI component
Not sure what exactly you mean here, but it's not "too late" to do
whatever you want after the call to InitializeComponent() - you can
most certainly bind it to anything that way.
- my IDE (#develop) doesn't display my own partial class as part of
the Form. What should I do to make it understood that my class belongs
to that?
Again, the question is unclear. What exactly do you mean by
"displaying .. partial class as part of the form"?

Jul 11 '08 #2

P: n/a
Hi all!

Ok, here is what I would like to achieve
- I would like to have a BindingSource defined in a custom partial
(not in myform.cs, not in myform.designer.cs, but in another partial,
say myform.datasource.cs - reasoning: my partial may be autogenerad
more than once, and I don't want to merge it with the hand-written or
the designer generated form)
- I would like to have design time support for it (I would like to be
that bindingsource listed at the bottom of my form and I would like to
be able to bind that datasource to a widget WITH THE DESIGNER)

Is that obvious now what I would like to achieve?

thanks
Gergo
Hi all!
Is it possible to have a bindingsource in a partial class?
Well it is possible, but I have the following issues:
- this.components is defined in the .designer.cs file. If I call my
own initialization method before the GUI's one, I will not have
this.components. If I call it after, it's too late, because I'd like
to bind it to a GUI component

Not sure what exactly you mean here, but it's not "too late" to do
whatever you want after the call to InitializeComponent() - you can
most certainly bind it to anything that way.
- my IDE (#develop) doesn't display my own partial class as part of
the Form. What should I do to make it understood that my class belongs
to that?

Again, the question is unclear. What exactly do you mean by
"displaying .. partial class as part of the form"?
Jul 14 '08 #3

This discussion thread is closed

Replies have been disabled for this discussion.