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

Customize Validate Message Caption

Thread ID:

Created:

Updated:

Platform:

Replies:

47478 Aug 4,2006 08:42 PM UTC Aug 9,2006 06:25 PM UTC WinForms 5
loading
Tags: GridControl
Administrator [Syncfusion]
Asked On August 4, 2006 08:42 PM UTC

Hello there,
V3.3.0 GroupingGridControl

How can I add a Caption ''RoadMatrix" to the Grid default validate messagebox? see attached file.

Thanks,

Lan

GridValidateMsg0.zip

Administrator [Syncfusion]
Replied On August 7, 2006 06:42 AM UTC

Hi Lan,

In the Essential Studio 4.2, We have newly added a CurrentCellErrorMessage event which you can handle and display your own custom message box whenever the grids CurrentCell.DisplayWarningText (as a result of some kind of validation error) is called. TableControlCurrentCellValidating event of the grid can also be handled for the same. Below is some code snippet.

private void GroupingGrid_TableControlCurrentCellErrorMessage(object sender, Syncfusion.Windows.Forms.Grid.Grouping.GridTableControlCurrentCellErrorMessageEventArgs e)
{
MessageBox.Show("Error Message", "RoadMatrix", MessageBoxButtons.OKCancel, MessageBoxIcon.Error);
e.Inner.Cancel = true;
}

private void GroupingGrid_TableControlCurrentCellValidating(object sender, Syncfusion.Windows.Forms.Grid.Grouping.GridTableControlCancelEventArgs e)
{
GridTableCellStyleInfo style = e.TableControl.CurrentCell.Renderer.CurrentStyle as GridTableCellStyleInfo;
if(style.TableCellIdentity.Column != null)
{
MessageBox.Show("Error Msg","RoadMatrix", MessageBoxButtons.OKCancel, MessageBoxIcon.Error );
e.Inner.Cancel = true;
}
}

Thanks,
Rajagopal


Administrator [Syncfusion]
Replied On August 8, 2006 07:08 PM UTC

How do I get the default error message? because I want to display the messagebox with the default error infomation plus "RoadMatrix" title caption. thanks.


>Hi Lan,

In the Essential Studio 4.2, We have newly added a CurrentCellErrorMessage event which you can handle and display your own custom message box whenever the grids CurrentCell.DisplayWarningText (as a result of some kind of validation error) is called. TableControlCurrentCellValidating event of the grid can also be handled for the same. Below is some code snippet.

private void GroupingGrid_TableControlCurrentCellErrorMessage(object sender, Syncfusion.Windows.Forms.Grid.Grouping.GridTableControlCurrentCellErrorMessageEventArgs e)
{
MessageBox.Show("Error Message", "RoadMatrix", MessageBoxButtons.OKCancel, MessageBoxIcon.Error);
e.Inner.Cancel = true;
}

private void GroupingGrid_TableControlCurrentCellValidating(object sender, Syncfusion.Windows.Forms.Grid.Grouping.GridTableControlCancelEventArgs e)
{
GridTableCellStyleInfo style = e.TableControl.CurrentCell.Renderer.CurrentStyle as GridTableCellStyleInfo;
if(style.TableCellIdentity.Column != null)
{
MessageBox.Show("Error Msg","RoadMatrix", MessageBoxButtons.OKCancel, MessageBoxIcon.Error );
e.Inner.Cancel = true;
}
}

Thanks,
Rajagopal


Administrator [Syncfusion]
Replied On August 9, 2006 11:16 AM UTC

Hi Lan,

There is no easy way to do this through any property setting or handling events. You may try the approach that was mentioned in the earlier post.

Thanks,
Rajagopal

Administrator [Syncfusion]
Replied On August 9, 2006 01:23 PM UTC

Hi,

Sorry for the inconvenience caused.
Please try the code snippet below in the TableControlCurrentCellErrorMessage event, see if this helps for you.

private void GroupingGrid_TableControlCurrentCellErrorMessage(object sender, Syncfusion.Windows.Forms.Grid.Grouping.GridTableControlCurrentCellErrorMessageEventArgs e)
{
MessageBox.Show(e.TableControl.CurrentCell.ErrorMessage, "RoadMatrix", MessageBoxButtons.OKCancel, MessageBoxIcon.Error);
e.Inner.Cancel = true;
}

Thanks,
Rajagopal


Administrator [Syncfusion]
Replied On August 9, 2006 06:25 PM UTC

Hi,
Thank you for your help. I added this event to display error message with "RoadMatrix" title(including row validate, cell validate, any other errors caused in the GGC). It works OK.

private void gdBase_ExceptionRaised(object sender, Syncfusion.Grouping.ExceptionRaisedEventArgs e)
{
clsComm.MsgBox(e.Exception.Message);
e.Cancel = true;
}

Lan



>Hi,

Sorry for the inconvenience caused.
Please try the code snippet below in the TableControlCurrentCellErrorMessage event, see if this helps for you.

private void GroupingGrid_TableControlCurrentCellErrorMessage(object sender, Syncfusion.Windows.Forms.Grid.Grouping.GridTableControlCurrentCellErrorMessageEventArgs e)
{
MessageBox.Show(e.TableControl.CurrentCell.ErrorMessage, "RoadMatrix", MessageBoxButtons.OKCancel, MessageBoxIcon.Error);
e.Inner.Cancel = true;
}

Thanks,
Rajagopal


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

;