I have successfully implemented DataFormCheckBox field, much thanks once again the help in the forum. Now, I have a problem when adding a new record. Basically, my scenario is am displaying a GridView and I am using a child window for the Adding and Editing of records. I am encountering NullReferenceException was Unhandled by user code
when trying to add a new records and the problem is occuring in the Converter code. Its occuring at the return value.ToString() == "T" ? true : false;
Please see complete code of converter below:
public class AccreditedConverter : IValueConverter
public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
return value.ToString() == "T" ? true : false;
public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
//throw new NotImplementedException();
//return value.ToString() == "True" ? "T" : "F";
return value.ToString() == "True" ? "T" : "F";
The funny thing is tha the error doesnt occur when I am trying to edit an exisiting records. I think i just need to add a default value in the check box field before I call the Add process. Can someone teach me on how to assign a default value for an object in a dataform?
Hope someone can enligthen me with my problem. Again, thank in advance for the help.