Need to Copy Data from a specific row in data table to another datatable

Hi ,
Can any one please help me on this I am completely structed here.
I want to copy data from a data table to another data table but I need to select data from specific row .

For example I have 100 rows in data table and I need to copy into another new data table from 50 to 100.

Please help me.

@prasanna.Ui

Let us take you are having a datatable dta

dtb= dta.Select().AsEnumerable.Skip(50).Take(50).ToArray.CopyToDataTable

Regards,
Mahesh

1 Like

Hi Mahesh,
Thank you very much for your quick response .
It worked for .
Is there any way for selecting some specific range.

Like 0 -50 records.can we give like Take(0-50)

@prasanna.Ui

If you want to take first 50 then you can directly give
dtb= dta.Select().AsEnumerable.Take(50).ToArray.CopyToDataTable

Regards,
Mahesh

1 Like

Thank you very Much Mahesh.
resolve issue.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.