Hi,
I have a gridview with 2 or 3 string column and one date column, EventDate, that is of type "System.Nullable<DateTime>". When I do a search with CustomFilterDescriptor (I follow your example), the gridview shows the rows that match my search string, but also the rows that have EventDate null. I need that the gridview shows only the rows that cointains the searching string.
I tried to use DummyConverter with EventDate column:
public class DummyConverter : IValueConverter
{
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
{
DateTime? dt = (DateTime?)value;
if (dt.HasValue)
return String.Format("{0:d}", dt);
else
return "-";
}
// ...
}
but it does'n work.
Thank in advantage for your help.
Roberto
I have a gridview with 2 or 3 string column and one date column, EventDate, that is of type "System.Nullable<DateTime>". When I do a search with CustomFilterDescriptor (I follow your example), the gridview shows the rows that match my search string, but also the rows that have EventDate null. I need that the gridview shows only the rows that cointains the searching string.
I tried to use DummyConverter with EventDate column:
public class DummyConverter : IValueConverter
{
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
{
DateTime? dt = (DateTime?)value;
if (dt.HasValue)
return String.Format("{0:d}", dt);
else
return "-";
}
// ...
}
but it does'n work.
Thank in advantage for your help.
Roberto