You must Sign In to post a response.
  • Category: ASP.NET

    Datatable

    how to copy a data row of one datatable to another when i m doing this using copyTo()..it is givin error..as row belongs to anothr datatable
  • #352647

    Dim DtOriginal As New DataTable
    Dim dtCopywithValue As DataTable = DtOriginal.Copy()
    'Copy the Entire Table
    Dim dtCopyStructure As DataTable = DtOriginal.Clone()
    'Copy only the Structure not the Datat

    Thanks & Regards,
    Danasegarane Arunachalam

    http://www.techreceipe.tk/

  • #352651
    hi,

    you can try like this

    dt1 is your datatable

    if you want to copy rows 10 in to dt2 datatable
    datarow dr=dt1.rows[10];

    dt2.ImportRow(dr);

    hope this will help u


  • This thread is locked for new responses. Please post your comments and questions as a separate thread.
    If required, refer to the URL of this page in your new post.