I have a WPF DataGrid to display PostgreSQL data. It displays a data table with 14 rows. It is an external connection to server and the number of columns change constantly depending on the user parameters. I have created a class called UCS1freqs and I use it to set the frequency values from data for later plotting those values into a scatter chart. The problem is that once it collects all the data it gives me a invalid cast Exception was unhandled (Unable to cast object of type MS.Internal.NamedObject to type System.Data.DataRowView). I know the problem is related to me using DataRowView. I'm new to code and definitely new to WPF. Any help is greatly appreciated
var ucs1Freqs = new List<Ucs1Freq>();