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

Escape Key In GGC..

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?? Thankz

3 Replies

AD Administrator Syncfusion Team December 9, 2004 12:08 PM UTC

Hi Angela, 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. Stefan


AC Angela Chua December 9, 2004 11:08 PM UTC

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 Me.btnCancel.PerformClick() endif 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.


AC Angela Chua December 10, 2004 05:21 AM UTC

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.. Thankz

Loader.
Live Chat Icon For mobile
Up arrow icon