Click here to Skip to main content
15,906,645 members
Home / Discussions / C#
   

C#

 
GeneralRe: Save a file path within an XML document? Pin
Nick H. Lauritsen12-Jun-06 11:39
Nick H. Lauritsen12-Jun-06 11:39 
QuestionClass objects as Datasources [modified] Pin
Andrew Stampor12-Jun-06 9:19
Andrew Stampor12-Jun-06 9:19 
AnswerRe: Class objects as Datasources Pin
Office Lineman12-Jun-06 10:09
Office Lineman12-Jun-06 10:09 
QuestionCE.net C# Call One App From Another Pin
Handheld Programmer12-Jun-06 8:59
Handheld Programmer12-Jun-06 8:59 
QuestionHow can i do table like this one Pin
mariuszfryta12-Jun-06 8:42
mariuszfryta12-Jun-06 8:42 
AnswerRe: How can i do table like this one Pin
Luis Alonso Ramos12-Jun-06 8:46
Luis Alonso Ramos12-Jun-06 8:46 
JokeRe: How can i do table like this one Pin
Jun Du12-Jun-06 8:46
Jun Du12-Jun-06 8:46 
QuestionForcing Validated event before Click event for a ToolStrip button Pin
Luis Alonso Ramos12-Jun-06 8:31
Luis Alonso Ramos12-Jun-06 8:31 
Hello,

I have a MDI child form full of controls (mainly text boxes), which save their values to the underlying object on the Validated event. My problem is that the Validated event is not raised when the user clicks on a toolstrip button, since apparently the text box never loses focus.

I had this same problem in .NET 1.x with the Toolbar control, but it was easy to solve since no matter the button, the save event was raised: ButtonClicked. There I could force the Validated event (by setting focus to the toolbar and back to the control) and then proceed to do whatever the button was supposed to do.

The problem is that with the ToolStrip control every button raises its own event, and thus I would have to force the event in every handler of every window, and for obvious reasons I don't want to. I have serached but I have not found a ButtonClick or similar event in the ToolStrip control.

So, does anyone have an idea of an easy way to solve this?

[EDIT: I just found out the CausedValidation property on the ToolStrip, but after trying it it still doesn't work.]

[EDIT AGAIN: I had tried the ItemClicked event and it didn't seem to work, but now I know why: I was handling it on the ToolStrip on the MDI child (which is merged to a ToolStrip in the parent form). Now that I handled it in the parent window, it works. The problem here is I can't stop the raising of the Click event for the toolstrip item if validation fails].

Thanks in advance,

Luis Alonso Ramos
Intelectix
Chihuahua, Mexico

Not much here: My CP Blog!

-- modified at 15:17 Monday 12th June, 2006
QuestionProgress Message Box? Pin
ahall@mirapoint.com12-Jun-06 7:33
ahall@mirapoint.com12-Jun-06 7:33 
AnswerRe: Progress Message Box? [modified] Pin
Ed.Poore12-Jun-06 9:08
Ed.Poore12-Jun-06 9:08 
GeneralRe: Progress Message Box? Pin
ahall@mirapoint.com12-Jun-06 11:33
ahall@mirapoint.com12-Jun-06 11:33 
QuestionPassing an instance of the base class to a child class Pin
MrEyes12-Jun-06 6:37
MrEyes12-Jun-06 6:37 
AnswerRe: Passing an instance of the base class to a child class Pin
Dustin Metzgar12-Jun-06 6:49
Dustin Metzgar12-Jun-06 6:49 
AnswerRe: Passing an instance of the base class to a child class Pin
Jun Du12-Jun-06 7:40
Jun Du12-Jun-06 7:40 
QuestionFixing flicker in a DataGridView? Pin
Andrew Stampor12-Jun-06 6:24
Andrew Stampor12-Jun-06 6:24 
GeneralRe: Fixing flicker in a DataGridView? Pin
Office Lineman12-Jun-06 9:22
Office Lineman12-Jun-06 9:22 
GeneralRe: Fixing flicker in a DataGridView? Pin
Andrew Stampor12-Jun-06 9:53
Andrew Stampor12-Jun-06 9:53 
GeneralRe: Fixing flicker in a DataGridView? Pin
Office Lineman12-Jun-06 10:04
Office Lineman12-Jun-06 10:04 
GeneralRe: Fixing flicker in a DataGridView? Pin
Andrew Stampor13-Jun-06 4:19
Andrew Stampor13-Jun-06 4:19 
GeneralRe: Fixing flicker in a DataGridView? Pin
Office Lineman13-Jun-06 7:09
Office Lineman13-Jun-06 7:09 
GeneralRe: Fixing flicker in a DataGridView? Pin
Andrew Stampor13-Jun-06 8:40
Andrew Stampor13-Jun-06 8:40 
GeneralRe: Fixing flicker in a DataGridView? Pin
Office Lineman13-Jun-06 9:34
Office Lineman13-Jun-06 9:34 
GeneralThe final piece of the puzzle... Pin
Andrew Stampor13-Jun-06 10:51
Andrew Stampor13-Jun-06 10:51 
GeneralRe: The final piece of the puzzle... Pin
Office Lineman13-Jun-06 11:21
Office Lineman13-Jun-06 11:21 
GeneralRe: Fixing flicker in a DataGridView? Pin
Nougat H.12-Jun-06 10:05
Nougat H.12-Jun-06 10:05 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.