I have got a real weird problem..
Whenever i hit the Escape Button WHen focus is at the Grid grouping control grid, it will throw an errow.. "Object reference not set to an instance of an object"..
Any one any idea how to prevent it and at the same time will close the form where the ggc is??
ADAdministrator Syncfusion Team December 9, 2004 07:08 AM
try to run your app in debug mode with "Break On Exceptions" enabled in the IDE. See the "Debug" menu, "Excpetions ..." sub entry in Visual Studio.
When the application throws the exception you can then check the call stack where the event was raised. You can post the call stack here. Which version of Essential Grid are you using?
If you keep having problems and you have a small sample project we can look at that.
ACAngela ChuaDecember 9, 2004 06:08 PM
this is the error message that the debugger returned:
A first chance exception of type ''System.NullReferenceException'' occurred in syncfusion.grid.grouping.dll
Additional information: Object reference not set to an instance of an object.
this is what i was doing before the error is thrown. i have a form, in it contains: ggc, txtbox, btnok, btncancel. btncancel is assigned to the form''s cancelbutton property.
btncancel.onclick will close the form. when focus is on the textbox, hitting escape will close the form without error. focusing on the ggc, hitting escape, nothing will happen. so i added a tablecontrolkeyup event to handle the escape key.
the code is:
If e.Inner.KeyValue = Keys.Escape Then
now, when i hit escape key in the ggc, the form is closed. and the above error is thrown.
however, i did another test. i click on the ggc, then focus on the textbox again. hit escape key. the form closes without raising any error.
ACAngela ChuaDecember 10, 2004 12:21 AM
Hi.. i have found the caused of it...
My ggc contains only static cell type. hence when i go on to hit escape ..it catches that error or it either don''t close its form.
If i change all celltype to textbox, the problem have will be fixed..