public class converter : IValueConverter
{
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
{
DateTime today = (value as Date)._Date;
long duration = (value as Date).DateTime.Hours;
today = today.AddHours(duration);
return today;
}
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
{
throw new NotImplementedException();
}
} |
<syncfusion:SfDataGrid.Columns>
<syncfusion:GridDateTimeColumn MappingName="_Date" ValueBinding="{Binding Converter={StaticResource convert},ConverterParameter=SfDataGrid}" />
<syncfusion:GridTimeSpanColumn MappingName="DateTime" Format = "hh:mm:ss"/>
</syncfusion:SfDataGrid.Columns> |