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
close icon

Multiple warnings on value out of range

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.

6 Replies

AD Administrator Syncfusion Team 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


CC Charles Carlin 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.


AD Administrator Syncfusion Team 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


CC Charles Carlin 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?


AD Administrator Syncfusion Team 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.


CC Charles Carlin 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.

Loader.
Live Chat Icon For mobile
Up arrow icon