<syncfusion:TreeGridDateTimeColumn MappingName="DOB" TextAlignment="Right"
HorizontalHeaderContentAlignment="Left"
ColumnSizer="AutoFillColumn"
AllowNullValue="True"
AllowEditing="True" CanEdit="True"
CustomPattern="{Binding Pattern}" Pattern="CustomPattern" />
|
<syncfusion:TreeGridDateTimeColumn MappingName="DOB"
HeaderText="DOB WITH ROWDATA"
TextAlignment="Right"
HorizontalHeaderContentAlignment="Left"
ColumnSizer="AutoFillColumn"
AllowNullValue="True"
AllowEditing="True" CanEdit="True"
CustomPattern="{Binding Converter={StaticResource converter}}" Pattern="CustomPattern" /> |
class Converter : IValueConverter
{
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
{
var employee = value as Employee;
if (employee != null)
{
return employee.Pattern;
}
else
return "";
}
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
{
return value;
}
} |