Executed and queried the default "New" clicked the export button and works fine Then tried "S", returned records and tried to export and received "Null Reference Exception"
Use the new keyword to create an object instance Check to determine if the object is null before calling the method
private static string GetValue(FrameworkElement frameworkElement) { return frameworkElement is TextBlock ? (frameworkElement as TextBlock).Text : frameworkElement.ToString(); }
If someone could illustrate how the above would be written to avoid the null exception error