473,396 Members | 2,013 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

bindingsource in partial

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
2 1993
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: silesius | last post by:
Hi All, I have two pagetabs. One pagetab is used to display a parent record and the other is suppose to display 3 related child records from another table. I can display the parent records just...
1
by: TN | last post by:
I just don't get the BindingSource class when it is bound to a class. Consider this code snip: ..... Private bSource As New BindingSource() Private dgv As New DataGridView() Public Sub New()...
0
by: Geoff | last post by:
Hi folks Calling BindingSource.ResetCurrentItem() is changing the BindingSource.Position in a way I don't understand. If I'm understanding the docs correctly, ResetCurrentItem() should simply...
4
by: shibeta | last post by:
Hello, I have problem with DataGridView and BindingSource. I have created DataSet and added TableData to it with manualy created columns (without DataAdapter - I'm not using MSSQL). On the Form I...
3
by: Edwin Smith | last post by:
Hello: I have the following code which works on a DataGridView binding source: private void textBox1_TextChanged(object sender, EventArgs e) { this.pATIENTSBindingSource.Position =...
7
by: Mike | last post by:
i have a small difficulties with BindingSource and dataGridView bind db has properly opened and bind doesn't works. Unfortunately I didn't find any good example how to connect MS Access with...
2
by: jehugaleahsa | last post by:
Hello: I'm working on improving some of our Windows Forms. I have created two user controls that I want to bind to the same BindingSource. I have an overview control that is used just to...
5
by: jehugaleahsa | last post by:
Hello: I am sure this question comes up a lot. I need to disable the controls on my Windows forms so that when the BindingSource is empty some the controls bound to it will be disabled. This...
2
by: TamusJRoyce | last post by:
I am working on a group project where I do not have access to a BindingSource that is being passed through a function. The BindingSource's DataSource is set to a custom IBindingListView Collection....
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.