|
I didn't comprehend your sample completly but some basics about binding:
- values in bound controls get updated when
+ BindingSource.ResetCurrentItem is called
+ a PropertyChanged event on the bound object is fired (see INotifyPropertyChanged)
- Leave on TextBox does not lead to a BindingSource.EndEdit, but EndEdit will cause validation on the control without losing focus.
And as a last thought: binding is a pain when you have to program UIs with controls that depend on each other - I's suggest using a variation of the MVP (mode view presenter) pattern (Presenter First or Passive View are my personal favourites )
Hope this helps a bit!
-^-^-^-^-^-
no risk no funk
|
|
|
|
|
Your Model View Presenter interested me, I have no intention on implementing this for my current project but I will definitely look into this for the future.
I didn't find a lot of literature on the subject, it would be of everybody's interest if you had reading suggestion (specifically a good book) on the subject of MVP model.
Thanks a lot for your input
|
|
|
|
|
Unfortunately, there isn't too much in the internet about this topic. Either it's very abstract and difficult to transform in real world applications or it's a very simple description of MVP that lacks any information about all the surroundings.
There are also quite a few different approaches (classic MVP, Presenter First, Passive View, ...).
Therefore, I can't point you to a good article about MVP.
Maybe I should write one on my own
-^-^-^-^-^-
no risk no funk
|
|
|
|
|
Can anyone tell me how to add header and footer to a dynamically generated word document using .net 2.0 ? I am able to generate the word document but i am unable to add/make visible the headers and footers in the document. I want page numbers to be coming up in the footers and some text in the ... I am using ASP.NET C#...
Nitin Kumar V , .NET Developer
|
|
|
|
|
I have been looking around and can not find what I am looking for. Thanks in advance for any help.
What I have is a very nice working form that does everything that I need, including handling WndProc messages. The problem is in converting this into a Windows Service.
I specifically designed it as a form for easier testing and because the documentation suggests that I will need a Form in my Windows service to handle WndProc events anyway.
Multiple inheritance would be fantastic, but doesn't exist for C#. I have tried multiple Interface inheritance but then I can not override the WndProc method.
If anyone knows how to add a form to a Windows Service to handle WndProc messages - or knows of any other way to enable WndProc overriding from within a Windows Service I would very much like to hear from you.
Regards,
Ben
|
|
|
|
|
Hi,
I have not done this before, but here is what I would try:
create an extra thread, and let it basically do what your current Main() method does,
i.e. creating a Form, and calling Application.Run()
Run() executes a message pump, which is one thing you need. There are some overloads for it,
the default one shows the form; you probably dont want that.
I trust a form, even if invisible, gets Windows messages, hence your overriden
WndProc could work as before.
There may be a problem the service not willing to create Controls (and Forms), lacking
a user. As I said, I never did it.
|
|
|
|
|
please help me
I want to insert new rows into the DataGrid for WindowsCE4.2 Application using c#2003
-- modified at 6:06 Sunday 22nd July, 2007
|
|
|
|
|
i developed windows service which generates crystal report and it is converted to pdf and also a mail was sent.
But my doubt is i want to generate this report evry day at 8:00pm...can anybody help me..give me the logic or any links
rajesh m
|
|
|
|
|
Hello,
I know there is a TabControl that allows you to click on tabs and each tab associated with a box, with different content.
Is there a way to do the same with TreeView? IE, what I need is a TabControl, but instead of showing tabs, it will be controlled by TreeView.
Hope I made myself clear...
- Eli Baskin.
|
|
|
|
|
It's possible but requires some more work.
You could for instance create a form with a tablelayoutpanel with two columns and 1 row.
In the left cell you add a treeview and you leave the righthand cell empty.
Then go to your solution and rightclick to 'Add->New Item', and select 'Custom Control'. Add one control for each of the "pages" you want to view for each of the nodes in the treeview.
Then add content to the various custom controls according to what you want on your "pages".
Create an instance of each of the custom controls in your forms constructor, and when you start adding the treeview nodes, you can add one of the custom control instances to each node.Tag property and a name for the "page" to the Text property of the node.
Finally in the treeviews node clicked event, you retrieve the node.Tag property, cast it to a usercontrol and add it to the tablelayoutpanel in the righthand cell.
-Larantz-
|
|
|
|
|
A bit too complicated for me, I am pretty novice in C#. My previous experiences were C, Delphi and LPC...
Do you know if there is a ready component that can do it?
|
|
|
|
|
hi
how can i change the currentrow in a datagridview.
some of rows in my datagrid is readonly and i want to jump to the next(or per) row to alow user to enter data.
the currentrow is readonly .
i used the currentcell but .....
please F1 me
thanX
|
|
|
|
|
I am working on ASP.NET. I would like to know how to highlight the row of records with colour in grid upon the page is loaded. My grid binds to a data source that run a stored procedure. The result of the stored procedure shows the current and previous records. Therefore, my user would like to know which row has been updated to the current value. Using the colour would identified the differences in the grid.
Please help.
Looking forward from your response.
Thank you.
Tyng
|
|
|
|
|
I have added some of the messages to my message queue yesterday but now i tried to iterate it now but no messages are there in the message queue can anybody tell me why and give me a suggestion to maintain all the messages in the message queue even though i restart my system.
Best Regards,
M. J. Jaya Chitra
|
|
|
|
|
What message queue are you talking about? Why would you expect any messages to remain in the queue, and not being delivered?
---
single minded; short sighted; long gone;
|
|
|
|
|
i am going to have two services one will be queeing and the other service will be started according to the interest of the user on that time the second service has to manipulate the messages in the queue. Even though the system restarts also i want the messages it should not be deleted. What about the transactional messages if i am creating it will it remain in the queue?
Best Regards,
M. J. Jaya Chitra
|
|
|
|
|
Hello...
I use AddRemoveProgramsIcon Property in Setup Project. I create an icon 16x16 with 16color.
It works only in Win XP, but not in Win 2000.
Has anybody also the same problem ?
|
|
|
|
|
Hello Friends,
I had an login form and an mdi parent form.
On the load event of mdiparent form I had called the login form as showDialog
If user cancel the login form then the mdi parent form should also be closed. but i am not able to do so.
I had tried to close it by making object of the mdiparent form but no use.
Only login form is closed not the mdiparent form.
closing of form is on the click event of cancel button in login form.
Please help,
Regards,
rahul saini
|
|
|
|
|
Something like
DialogResult result = LoginForm.Dialog
If (result == DialogResult.Cancel) this.Close();(or Application.Exit();)
else ....
|
|
|
|
|
Have you done anyting according to this:
DialogResult result = loginForm.ShowDialog();
if(result == DialogResult.Ok)
{
}
else if(result == DialogResult.Cancel)
{
this.Close();
}
or else you might try in loginforms cancel button clicked event:
public void buttonCancel_OnClicked(object sender, EventArgs e)
{
(this.Parent as Form).Close();
this.Close();
}
-Larantz
|
|
|
|
|
hi Avadhesh,
So what do you want??
vtkiet05
|
|
|
|
|
Hi
I want the reason and solution to fix it.
Regards
Avadhesh
|
|
|
|
|
I think what he means is to please elaborate on your problem... It's not quite clear what you are asking.
-----
*** Never give me an answer having anything to do with Visual Studio. I don't have this because I have two computers, one being my dad's mac, which is connected to the internet, the other being my pc, which is, sadly, not connected to the internet. The setup for the Visual C# program I think is called a "bootstrap" program, and it needs to connect to the internet to install the program. THEREFORE I cannot install this program onto my pc.***
|
|
|
|
|
i want an asp.net starter kit to build a company web portal.a web portal that contains Links,discussion forum, admin module, employee information, newsletter, announcement, picture gallery,user blogs,articles, roles and permission.
|
|
|
|
|
Does google not work where you live ? Or are you not talking about the web dev starter kit from Microsoft ? I can't imagine what else you'd want, tho.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|