Tag - DataRowView

How to convert DataRow to DataRowView

Converting DataRow to DataRowView is not possible, but we can go around this by using DefaultView property of the Data Row Table.The following code example demonstrate how to get DataRowView out of DataRow:DataTable dt = new DataTable();dt.Columns.Add("ID", typeof(int)); dt.Columns.Add("Name", typeof(string));for (int i = 0; i < 10; i++) { DataRow tempDR = dt.NewRow(); tempDR["ID"] = (i...