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

Error after deleting cell contents

Thread ID:

Created:

Updated:

Platform:

Replies:

143822 Apr 6,2019 06:14 AM UTC Apr 15,2019 12:46 PM UTC WinForms 5
loading
Tags: GridControl
Barry
Asked On April 6, 2019 06:14 AM UTC

I have a grid control with decimal text input that seems to work fine until a decimal number has been entered and then deleted leaving the cell empty when I get a popup error " is not a valid decimal". I would like the user to be able to delete an incorrect entry but this error popup keeps appearing.

Deivaselvan Y [Syncfusion]
Replied On April 9, 2019 09:15 AM UTC

Hi Barry, 

Thanks for using Syncfusion products. 

The reported issue may occur, if your Decimal column may be non-nullable column. So, please make your decimal column as nullable column to accept the null type. Please refer the following code example. 

DataTable(C#) 
dt.Columns.Add("Salary",typeof(decimal)); 
dt.Columns["Salary"].AllowDBNull = false; 

List(C#) 
private decimal? samplevalue; 
 
public decimal? SampleValue 
{ 
    get 
    { 
        return this.samplevalue; 
    } 
    set 
    { 
        this.samplevalue = value; 
    } 
} 


Please get back to us if you need any further assistance on this. 

Regards, 
Deivaselvan 


Barry
Replied On April 9, 2019 09:41 PM UTC

I am not using a databound grid.

Deivaselvan Y [Syncfusion]
Replied On April 10, 2019 11:10 AM UTC

Hi Barry, 
 
Sorry for the inconvenience caused. 
 
We have tested your reported scenario using below attached sample in your last downloaded version 17.1.0.32. But the sample is working fine as we expected. So, please let us know the below attached sample differ from your customization. It will be helpful for us to provide the solution at the earliest. 
 
 
Regards,
Deivaselvan
 


Barry
Replied On April 12, 2019 11:31 PM UTC

Thanks. I was configuring the grid using the Designer so I deleted it completely and configured in using vb code and all is working now. Not sure why it didn't work when using the Designer.

Sabaridass Ramamoorthy [Syncfusion]
Replied On April 15, 2019 12:46 PM UTC

Hi Barry, 
 
Thanks for your update. 
 
By default, if you are configuring the GridControl using designer or form load or constructor, it will be working fine. We suspect that issue may occur based on your code settings. 
 
Anyway we are glad to know that your reported problem has resolved. 
 
Please get back to us if you need any further assistance on this. 
 
Regards, 
Sabaridass R 


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.

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