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

Cell Error

Thread ID:

Created:

Updated:

Platform:

Replies:

5078 Jun 18,2003 07:08 AM UTC Jun 18,2003 07:58 AM UTC WinForms 3
loading
Tags: GridControl
Alexandre Nicholas
Asked On June 18, 2003 07:08 AM UTC

My cell has an double cell type How to avoid the message when the cell is not a numeric value, and put its own thanks

Administrator [Syncfusion]
Replied On June 18, 2003 07:25 AM UTC

You can do this in a CurrentCellValidating event handler.
Private Sub GridDataBoundGrid1_CurrentCellValidating(ByVal sender As Object, ByVal e As  CancelEventArgs) Handles GridDataBoundGrid1.CurrentCellValidating
	Dim cc As GridCurrentCell = Me.GridDataBoundGrid1.CurrentCell
    	Dim s As String = cc.Renderer.ControlText
	Try
		Dim d As Double = double.Parse(s)
	Catch
		'bad value
		e.Cancel = True
		cc.ErrorMessage = "MyMessage"
	EndTry
End Sub

Alexandre Nicholas
Replied On June 18, 2003 07:51 AM UTC

> You can do this in a CurrentCellValidating event handler. why does the CurrentCellValidating event is raised 3 times when i lose focus from the grid control ? thanks

Alexandre Nicholas
Replied On June 18, 2003 07:58 AM UTC

> > You can do this in a CurrentCellValidating event handler. > > why does the CurrentCellValidating event is raised 3 times when i lose focus from the grid control ? > > thanks i just resolved the problem seting the gridcontrol focus before i lease the CurrentCellValidating event thanks

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.

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

;