I can get the value of a column in a DataRowView using
DataRowView row;
object value = row["MyColumn"];
of course, if there is no "MyColumn" in the DataRowView, this code throws an exception.
How do I check in advance, if the row contains "MyColumn"? Sadly there is no row.Contains("MyColumn") on DataRowView.
You can use this
dataRowView.Row.Table.Columns.Contains("MyColumn")
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With