c# - Is there a better way to get a copy of DataRowView? -
i have collection of datarowview
bound datagrid
. functionalities, need copies of datarowview
s. 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
Post a Comment