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: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Reg: GridDataBoundControl

Thread ID:





33945 Aug 30,2005 09:49 AM UTC Aug 30,2005 02:30 PM UTC WinForms 6
Tags: GridControl
Anna Srinivasan
Asked On August 30, 2005 09:49 AM UTC

Hi, I am using griddataBound Control. For validation (double) i am using CurrentCellValidateString event. Note : DB Column allows null values. Error msg i am capturing in ValidateFailed event.(Actually i dont want error msg) this.sgbDetailedHistory.CurrentCell.ErrorMessage = ""; (Blank) All above working fine.But i am facing problem. Scenorio: 1) Enter double value in the grid cell. 2) Delete the value. 3) Try to move to other cell. I am not able to move to other cell. I have to fill some value then only i can able to move. How do i handle this scenorio..?

Administrator [Syncfusion]
Replied On August 30, 2005 10:06 AM UTC

Does the code in your CurrentCellValidateString allow empty strings to be processed without setting e.Cancel = true? If you set e.Cancel=true, either in CurrentCellValidateString or in CurrentCellValidating, when the string is empty, then that is why your user cannot leave such a cell. You should not set e.Cancel = true in this case.

Administrator [Syncfusion]
Replied On August 30, 2005 10:28 AM UTC

I do not have any special handlers. Here is project. Try to add some records in the grid, you will see empty lines in output. Doesn''t matter release or debug configuration. WindowsApplication37_8603.zip

Anna Srinivasan
Replied On August 30, 2005 11:01 AM UTC

Please go through the following code .. private void sgbDetailedHistory_CurrentCellValidateString(object sender, Syncfusion.Windows.Forms.Grid.GridCurrentCellValidateStringEventArgs e) { try { GridCurrentCell cc = this.sgbDetailedHistory.CurrentCell; string newValue = e.Text; if(cc.ColIndex >= 2 && cc.ColIndex <= 6) { double d; if (newValue.Trim() != "") { if(!double.TryParse(newValue, System.Globalization.NumberStyles.Any, null, out d)) { } } } } catch (Exception ex) { Logger.WriteLogEntry("Error in DateTime Convertion", ex, LogType.Error); } } private void sgbDetailedHistory_ValidateFailed(object sender, Syncfusion.Windows.Forms.Grid.GridValidateFailedEventArgs e) { this.sgbDetailedHistory.CurrentCell.ErrorMessage = ""; } I am not using any other event.

Administrator [Syncfusion]
Replied On August 30, 2005 11:06 AM UTC

What version of our libraries are you using? In earlier versions, you could not leave a double column with it containing an empty string. But you can in the more recent releases.

Anna Srinivasan
Replied On August 30, 2005 11:49 AM UTC

Right now we are using version. It is not possible in this version.

Administrator [Syncfusion]
Replied On August 30, 2005 02:30 PM UTC

No, this should work in Here is a sample showing youable to delete the number in the first column and move off the cell. How do I see teh problem in this sample? http://www.syncfusion.com/Support/user/uploads/GDBG_ccf93c59.zip


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