c# - How to insert data into datatable from datagrid without using ItemSource in Wpf? -
i have datagrid has dataview itemsource . datagrid not display data in dataview. i.e if dataview has 21 column datagrid displayed 13 column.now want select 13 columns , add new datatable. dont know how this. please me. thankyou
you can use dataview.totable
:
c#:
string[] columnnames = { " col1", "col2", "...", "col13" }; datatable newtable = view.totable("tablename", false, columnnames);
vb.net:
dim columnnames = { " col1", "col2", "...", "col13" } dim newtable datatable = view.totable("tablename", false, columnnames)
Comments
Post a Comment