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. (Last updated on: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Delete cell value in grid

Thread ID:





10795 Feb 12,2004 02:32 PM UTC Feb 13,2004 04:53 PM UTC WinForms 3
Tags: GridControl
Greg Shomette
Asked On February 12, 2004 02:32 PM UTC

I am using a databoundgrid bound to a typed dataset in VB.net. I delete the value in a cell with a calendar. When I try to move to a different cell I get an error that it cannot store the value in the bound column because it doesn''t match the datatype. When I do this in a list control the application freezes and has to be shutdown. We would like users to be able to delete an existing value in a cell. I''ve tried several ways of doing this including ClearCells, changing it directly in the dataset, etc. without success. How can we do this? Thanks!

Administrator [Syncfusion]
Replied On February 12, 2004 03:47 PM UTC

I tried to see this problem in this sample using version, but could not. Pressing the delete key will clear the date and you can tab off without getting an exception. Can you see the problem with this code? If not, check you database to see if that date column accepts nulls.

Greg Shomette
Replied On February 13, 2004 01:46 PM UTC

Thank-you for your reply yesterday. After a lot of trial and error I discovered that the CellValueType needs to be set to be able to successfully delete the cell value in our scenario for calendar cells and most other types of cells. However, it does not solve the issue of deleting a value in a cell with a cell type of listbox or dropdowngrid. When I do that and then try to move to another cell the application freezes up and needs to be restarted. I also noticed that deleting the visible text in these types of cells doesn''t in itself change the cell value or the display text value. I tried deal with it in the CurrentCellMoving event by seeing if GetDisplayText = string.empty, but it still held the visible string I had deleted. We would like users to be able to delete the value in a listbox cell or dropdowngrid cell. If that isn''t possible we want to at least provide other options so the application doesn''t freeze up. Thanks!

Greg Shomette
Replied On February 13, 2004 04:53 PM UTC

I figured out the issue of deleting the value in the cell. If the gridlistcontrol is set to AutoComplete deleting the value results in a freeze. If it is set to Exclusive the dropdown list goes crazy looping through the list over and over. If it is set to Editable it works fine. I imagine it is because in the other two settings it is doing an endless loop looking for "" in the list.


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.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon 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.Close Icon

Live Chat Icon For mobile
Live Chat Icon