PC Review


Reply
Thread Tools Rate Thread

bindingsource in partial

 
 
pihentagy
Guest
Posts: n/a
 
      11th Jul 2008
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
 
Reply With Quote
 
 
 
 
Pavel Minaev
Guest
Posts: n/a
 
      11th Jul 2008
On Jul 11, 5:26*pm, pihentagy <pihent...@gmail.com> wrote:
> 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"?

 
Reply With Quote
 
pihentagy
Guest
Posts: n/a
 
      14th Jul 2008
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"?


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
One partial table, one master table - update the partial boilermaker Microsoft Excel Misc 3 28th May 2010 08:33 PM
Find partial match from column A,B and fill partial match in C? Tacrier Microsoft Excel Misc 4 24th Oct 2008 11:24 PM
BindingSource.Find by partial string? Edwin Smith Microsoft C# .NET 3 17th Mar 2007 06:42 AM
Bindingsource c# Mark Huisinga Microsoft ADO .NET 2 8th Jun 2006 03:17 AM
How to make a Partial Search Query or partial search function =?Utf-8?B?TGUgVHJhbg==?= Microsoft Access Getting Started 4 15th Jun 2004 09:43 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:58 AM.