Retriving Values from a datable to another datatable using C# -


i have 2 datatable [system.data] .one contains 3 rows id,name,date , contains id only>how can value [id] of first datatable second one.is there possible way achieve without using iteration methods. have values in first datatable. need copy one.i don't wan't execute query in between.this not required c# adding datatable datatable

you can try method:

        string[] columnstocopy = { "id" };         datatable tablenew = dtsource.defaultview.totable("nameoftabletocreate", false, columnstocopy); 

Comments

Popular posts from this blog

asp.net - repeatedly call AddImageUrl(url) to assemble pdf document -

java - Android recognize cell phone with keyboard or not? -

iphone - How would you achieve a LED Scrolling effect? -