Customize Validate Message Caption
Hello there,
V3.3.0 GroupingGridControl
How can I add a Caption ''RoadMatrix" to the Grid default validate messagebox? see attached file.
Thanks,
Lan
V3.3.0 GroupingGridControl
How can I add a Caption ''RoadMatrix" to the Grid default validate messagebox? see attached file.
Thanks,
Lan
GridValidateMsg0.zip
SIGN IN To post a reply.
5 Replies
AD
Administrator
Syncfusion Team
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
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
AD
Administrator
Syncfusion Team
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
>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
AD
Administrator
Syncfusion Team
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
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
AD
Administrator
Syncfusion Team
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
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
AD
Administrator
Syncfusion Team
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
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
SIGN IN To post a reply.
- 5 Replies
- 1 Participant
-
AD Administrator
- Aug 4, 2006 08:42 PM UTC
- Aug 9, 2006 06:25 PM UTC