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

qt - Using float or double for own QML classes -

Create Outlook appointment via C# .Net -

ios - Swift Array Resetting Itself -