We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Multiple warnings on value out of range

Thread ID:





5652 Jul 11,2003 07:26 PM UTC Jul 14,2003 06:58 PM UTC WinForms 6
Tags: GridControl
Charles Carlin
Asked On July 11, 2003 07:26 PM UTC

I have a non-databound grid control where I am setting the cell up with the following code: grdFilters[i+1, 2].CellValueType = typeof(int); grdFilters[i+1, 2].ValidateValue.Minimum = 0; If I enter in a negative number, when I click on certain areas outside the form this in on (child in an mdi) I get multiple out or range warnings. Is there any way to prevent this and limit it to the single warning.

Administrator [Syncfusion]
Replied On July 12, 2003 12:44 PM UTC

Hi Chuck, by default there should be only one warning be displayed. That is when you set focus on another control in the form that has CausesValidation set to True the grid will perform validation and save the current cell contents and the current record when its Control.OnValidate method is called. If you don't want validation to occur set CausesValidation = false. Did you embedd the grid inside another container? If yes, make sure only one of those have CausesValidation set. Otherwise the OnValidate is fired several times. I hope this helps. Otherwise, if you can prepare a small sample project we'll look into this and can try to track it down what goes wrong. Stefan

Charles Carlin
Replied On July 14, 2003 10:57 AM UTC

Well this might be the wrong forum but it is my syncfusion docking host that is also causing the validation to be fired. I would turn it off on the control in the docking host, however if the control becomes undocked them I am not sure what would happen.

Administrator [Syncfusion]
Replied On July 14, 2003 11:50 AM UTC

Would it be ok if you turn off CausesValidation for the MDI child window and then only validate the forms contents from its Close method? Or you could trigger also a Validate from specific buttons in the toolbar. I don't think you will want to validate contents for any button you click outside the grid or if you activate another mdi child window. So, explicitly turning on CausesValidation, then calling Validate and then turn off CausesValidation again for the MDI child window for those buttons where you want validation is one work around I have in mind. But you will have to try around a bit. Stefan

Charles Carlin
Replied On July 14, 2003 03:58 PM UTC

I tried turing off validation on the main mdi form, the groupbox control and them tree control. It still fires multiple times, and the call stack seems to point to the dockinghost firing it each time. Should I post this in the tools forum?

Administrator [Syncfusion]
Replied On July 14, 2003 05:26 PM UTC

If the events are coming from the dockinghost, then the tools forum would be the place. You could also submit a Direct Trac incident on this problem if you like.

Charles Carlin
Replied On July 14, 2003 06:58 PM UTC

I have opened a direct-trac issue on this and created a sample of it, simple mdi with docking manager. I put tools instead of grid as the product. Not sure if that is the right way to go on this. The direct-track # is 5641.


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon