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

Using the delete key in a griddataboundgrid

Hi, I''m trying to delete some text in a cell in my griddataboundgrid. I want to use the delete key for this. But nothing happens. It seems like you can only delete it using the "backspace-key". Thanks... Regards, Tom

3 Replies

AD Administrator Syncfusion Team August 29, 2005 07:53 AM UTC

The delete key seems to be working as expected for me in this simple where a GridDataBoundGrid was just dropped on a form. I see the same behavior as in the TextBox on the form. http://www.syncfusion.com/Support/user/uploads/GDBG_Delete_4c22cff1.zip Does the sample work OK for you. If not, what version of our libraries are you running? If it does work for you, then I suspect it must be some event or property setting that you have set which the sample does not have. If you cannot spot the problem, if you upload a sample showing the problem, we can look for it here.


TO Tom August 29, 2005 08:11 AM UTC

Hi, When I hit the delete-key, the whole record is removed from the grid because the "EnableRemove"-property is set to true. If we set this to false, you can''t use the delete-key. So, nothing happens. What we''re trying to do here is delete the text in a cell. You can use the backspace to do that but we want the delete-key to work as well. Thanks for your help. Regards, Tom >The delete key seems to be working as expected for me in this simple where a GridDataBoundGrid was just dropped on a form. I see the same behavior as in the TextBox on the form. > >http://www.syncfusion.com/Support/user/uploads/GDBG_Delete_4c22cff1.zip > >Does the sample work OK for you. If not, what version of our libraries are you running? > >If it does work for you, then I suspect it must be some event or property setting that you have set which the sample does not have. If you cannot spot the problem, if you upload a sample showing the problem, we can look for it here.


AD Administrator Syncfusion Team August 29, 2005 08:20 AM UTC

If the cell is not actively being edited, the pressing delete will remove the record. If you see the cursor in the text, then the delete should work on the text and not remove the record. This is the default behavior. If you do not want this default behavior, you can derive the grid and override HandleCurrentCellKeyDown to catch this delete key and do what you want at that point. The first part of this forum thread shows some code snippets. http://www.syncfusion.com/Support/Forums/message.aspx?MessageID=33356

Loader.
Live Chat Icon For mobile
Up arrow icon