Can or how to convert DataRow to DataRowView?
For example:
DataTable dt=ds.Tables[0];
DataRow dr= dt.NewRow();
DataRowView drv = ????
Use
DataTable dt=ds.Tables[0];
DataRow dr= dt.NewRow();
DataRowView drv= dt.DefaultView[dt.Rows.IndexOf(dr)];
Use. It also works if the DataGrid is ordered.
DataRowView selecRow = dataTable.DefaultView.Cast<DataRowView>().Where(a => a.Row == desRow).FirstOrDefault();
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