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.

Reg: GridDataBoundControl

Thread ID:

Created:

Updated:

Platform:

Replies:

33945 Aug 30,2005 05:49 AM Aug 30,2005 10:30 AM Windows Forms 6
loading
Tags: GridControl
Anna Srinivasan
Asked On August 30, 2005 05:49 AM

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 06:06 AM

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 06:28 AM

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 07:01 AM

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 07:06 AM

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 07:49 AM

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

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

No, this should work in 3.2.1.0. 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

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.

;