c# - Is there a better way to get a copy of DataRowView? -


i have collection of datarowview bound datagrid. functionalities, need copies of datarowviews. i'm using following method it.

public static datarowview getcopyofrowview(datarowview rowview) {    datatable table = rowview.dataview.totable();    datarow copyrow = table.newrow();    copyrow.itemarray = rowview.row.itemarray;    table.rows.insertat(copyrow, table.rows.count);    return table.defaultview[table.rows.count - 1]; } 

but method prove costly more 1000 rows. there better way this?

datatable has copy method copies schema , data. use that? said need copy more 1000 rows...


Comments

Popular posts from this blog

php - Hide output during test execution -

javascript - Migrate custom AngularJS filter from 1.2.28 to 1.4.x -

Update Magento products with multiple images -