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.
Syncfusion Feedback

Validating in GGC grid with Hierarchy

Thread ID:

Created:

Updated:

Platform:

Replies:

33367 Aug 18,2005 12:56 PM UTC Aug 18,2005 10:30 PM UTC Windows Forms 3
loading
Tags: GridControl
Brian Corley
Asked On August 18, 2005 12:56 PM UTC

I am not sure what is causing this behaviour: I have set up validation and the error message is reported to user when I in my validating event handler and I set cancel to true and I set the errormessage on the current cell and THEY CLICK ON ANY RECORD THAT IS AT THE SAME LEVEL OR BELOW IN THE HIERARCHY. If they click on a parent row or the parent''s row siblings or any of its children the validating event handler is called but the message box with the error is never shown. Any ideas?

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

There is an exception being raised in the situation you described that is causing the message to fail to appear. We will look into how to handle this issue in our code. Until we do, I think you can get the message to display by handling TableCOntrolCurrentCellMovedFailed, and displaying it there yourself.
private void gridGroupingControl1_TableControlCurrentCellMoveFailed(object sender, GridTableControlCurrentCellMoveFailedEventArgs e)
{
	e.TableControl.CurrentCell.Lock();
	MessageBox.Show("Cannot move");
	e.TableControl.CurrentCell.Unlock();
	e.TableControl.CurrentCell.ErrorMessage = "";
}

Brian Corley
Replied On August 18, 2005 06:03 PM UTC

This does not solve the problem. The grid still allows for a new record to be selected. I get the following unhandled exception; System.InvalidCastException: Specified cast is not valid. at Syncfusion.Grouping.CurrentRecordManager.NavigateTo(Record record) at Syncfusion.Grouping.Record.SetCurrent(String fieldName) at Syncfusion.Windows.Forms.Grid.Grouping.GridTableControlSelectRecords.ChangeSelectCells(Int32 rowIndex, Int32 colIndex) at Syncfusion.Windows.Forms.Grid.Grouping.GridTableControlSelectRecords.MouseMove(GridTableClickCellsEventArgs te) at Syncfusion.Windows.Forms.Grid.Grouping.GridTableControl.ProcessTableClickCellsMouseMove(GridTableClickCellsEventArgs e) at Syncfusion.Windows.Forms.Grid.Grouping.GridTableClickCellsMouseController.MouseMove(MouseEventArgs e) at Syncfusion.Windows.Forms.MouseControllerDispatcher.ProcessMouseMove(MouseEventArgs e) at Syncfusion.Windows.Forms.Grid.Grouping.GridNestedTableControlCellRenderer.OnMouseMove(Int32 rowIndex, Int32 colIndex, MouseEventArgs e) at Syncfusion.Windows.Forms.Grid.GridCellRendererBase.RaiseMouseMove(Int32 rowIndex, Int32 colIndex, MouseEventArgs e) at Syncfusion.Windows.Forms.Grid.Grouping.GridTableClickCellsMouseController.MouseMove(MouseEventArgs e) at Syncfusion.Windows.Forms.MouseControllerDispatcher.ProcessMouseMove(MouseEventArgs e) at Syncfusion.Windows.Forms.ScrollControllMouseControllerDispatcher.ScrollControlMouseMoveHandled(Object sender, MouseEventArgs e) at Syncfusion.Windows.Forms.ScrollControl.OnScrollControlHandledMouseMove(MouseEventArgs e) at Syncfusion.Windows.Forms.ScrollControl.OnMouseMove(MouseEventArgs e) at Syncfusion.Windows.Forms.Grid.GridControlBase.OnMouseMove(MouseEventArgs e) at Syncfusion.Windows.Forms.Grid.Grouping.GridTableControl.OnMouseMove(MouseEventArgs e) at System.Windows.Forms.Control.WmMouseMove(Message& m) at System.Windows.Forms.Control.WndProc(Message& m) at Syncfusion.Windows.Forms.ScrollControl.WndProc(Message& msg) at Syncfusion.Windows.Forms.Grid.GridControlBase.WndProc(Message& msg) at Syncfusion.Windows.Forms.Grid.Grouping.GridTableControl.WndProc(Message& msg) at System.Windows.Forms.ControlNativeWindow.OnMessage(Message& m) at System.Windows.Forms.ControlNativeWindow.WndProc(Message& m) at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

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

Here is a sample that will not let you edit any cell (validation fails) and you get the message no matter where you click in the grid. http://www.syncfusion.com/Support/user/uploads/GGC_MinimalNestedtables_2df8544a.zip Is this what you tried?

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

;