Strange Property Grid Behaviour
-
I have a .NET PropertyGrid that (amongst other things) display a property with the validation rule:
[IntegerValidator(MinValue = 1, MaxValue = 5)]
If the user attempts to set it to a value outside the range then I would expect a "Properties Window" dialog with the message "Property value is not valid" and a Details button that allows the dialog to be expanded to display the message: "The value for the property 'XXXX' is not valid. The error is: The value must be inside the range 1-5." Occasionally though I just get an exception that is caught at the top level by my application (which then terminates). Any ideas why this should happen? (It does seem to happen when, on leaving the cell, the user immediately scrolls the grid - but not always.)
"...there's what people want to hear, there's what people want to believe, there's everything else, THEN there's the truth!" - New York D.A., The International
-
I have a .NET PropertyGrid that (amongst other things) display a property with the validation rule:
[IntegerValidator(MinValue = 1, MaxValue = 5)]
If the user attempts to set it to a value outside the range then I would expect a "Properties Window" dialog with the message "Property value is not valid" and a Details button that allows the dialog to be expanded to display the message: "The value for the property 'XXXX' is not valid. The error is: The value must be inside the range 1-5." Occasionally though I just get an exception that is caught at the top level by my application (which then terminates). Any ideas why this should happen? (It does seem to happen when, on leaving the cell, the user immediately scrolls the grid - but not always.)
"...there's what people want to hear, there's what people want to believe, there's everything else, THEN there's the truth!" - New York D.A., The International
Is this Grid a external control (in Dll)?
Wags wrote:
Occasionally though I just get an exception that is caught at the top level by my application (which then terminates).
I presume is that refers to class (program.cs) where main form gets to be run? Or Just a from place where it was assigned that value to the control. Have you tried updating your .Net Framework? Have you Looked in MSDN?
-
I have a .NET PropertyGrid that (amongst other things) display a property with the validation rule:
[IntegerValidator(MinValue = 1, MaxValue = 5)]
If the user attempts to set it to a value outside the range then I would expect a "Properties Window" dialog with the message "Property value is not valid" and a Details button that allows the dialog to be expanded to display the message: "The value for the property 'XXXX' is not valid. The error is: The value must be inside the range 1-5." Occasionally though I just get an exception that is caught at the top level by my application (which then terminates). Any ideas why this should happen? (It does seem to happen when, on leaving the cell, the user immediately scrolls the grid - but not always.)
"...there's what people want to hear, there's what people want to believe, there's everything else, THEN there's the truth!" - New York D.A., The International