Solved

ToolStrip.CausesValidation not working as expected

Posted on 2007-11-16
1
1,343 Views
Last Modified: 2013-11-07
I am working on a Windows Forms application. I have a form that contains a ToolStrip. I have set the ToolStrip.CausesValidation = true, but a control with the focus does not raise a validated event when I click a button in the ToolStrip. What am I doing wrong here? Thanks.
0
Comment
Question by:Paracom_Inc
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 12

Accepted Solution

by:
topdog770 earned 500 total points
ID: 20320437
The problem is that the toolstripbutton object doesn't support the CausesValidation event.

I just made a quick test app to confirm this.  When the toolstrip button is clicked, calling the Form.Validate function may be your simplest option.

Otherwise, you could do something more complicated like keeping track of which textbox/control fired the TextChanged or similar event for example and only calling validate foreach one of the controls with changed text/ data.
0

Featured Post

Tutorials alone can't teach real engineering

So we built better training tools.

-Hands-on Labs
-Instructor Mentoring
-Scenario-Based Tests
-Dedicated Cloud Servers

All at your fingertips. What are you waiting for?

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article shows how to deploy dynamic backgrounds to computers depending on the aspect ratio of display
This article aims to explain the working of CircularLogArchiver. This tool was designed to solve the buildup of log file in cases where systems do not support circular logging or where circular logging is not enabled
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

691 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question