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.
Unfortunately, activation email could not send to your email. Please try again.

Using the delete key in a griddataboundgrid

Thread ID:

Created:

Updated:

Platform:

Replies:

33873 Aug 29,2005 03:15 AM Aug 29,2005 04:20 AM Windows Forms 3
loading
Tags: GridControl
Tom
Asked On August 29, 2005 03:15 AM

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

Administrator [Syncfusion]
Replied On August 29, 2005 03:53 AM

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.

Tom
Replied On August 29, 2005 04:11 AM

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.

Administrator [Syncfusion]
Replied On August 29, 2005 04:20 AM

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

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;