BoldSignEasily embed eSignatures in your .NET applications. Free sandbox with native SDK available.
this.datagrid.AddNewRowInitiating += Datagrid_AddNewRowInitiating;
private void Datagrid_AddNewRowInitiating(object sender, Syncfusion.UI.Xaml.Grid.AddNewRowInitiatingEventArgs e)
{
if ((e.NewObject as OrderInfo).CustomerID == null)
{
(this.datagrid.DataContext as ViewModel).ErrorMessages="You must put a not null CustomerID !";
}
}
<Path x:Name="PART_RowHeaderIndicator"
Width="8.146"
Height="8.146"
HorizontalAlignment="Center"
VerticalAlignment="Center"
Fill="#FF303030"
Stretch="Fill">
<ToolTipService.ToolTip>
<ToolTip x:Name="PART_ToolTip"
Background="#FFDB000C"
Placement="Left"
PlacementRectangle="20,0,0,0"
Tag="{Binding ErrorMessages,Source={StaticResource viewmodel}}"
Template="{StaticResource ValidationToolTipTemplate}" />
</ToolTipService.ToolTip>
</Path> |
<syncfusion:SfDataGrid
Name="datagrid"
Grid.Row="1"
AddNewRowPosition="FixedTop"
AllowEditing="True"
AutoGenerateColumns="False"
EditTrigger="OnTap" GridValidationMode="InEdit"
ItemsSource="{Binding OrderList}"
LiveDataUpdateMode="AllowDataShaping"
ShowRowHeader="True"/> |
this.datagrid.RowValidating += Datagrid_RowValidating;
private void Datagrid_RowValidating(object sender, Syncfusion.UI.Xaml.Grid.RowValidatingEventArgs e)
{
if ((e.RowData as OrderInfo).CustomerID == null)
{
e.IsValid = false;
}
} |