I WANT TO PASS VALUE FROM ANOTHER DATATABLE

Chintoo Semi

Total Post:135

Points:947
Posted by  Chintoo Semi
C# 
C#
 961  View(s)
Ratings:
Rate this:

I am having one datatable to that table i want to pass value from another datatable.

for example:-

datatable1 in this i want to pass value from datatable2.row[0]["colname"]

I tried like :-

tblvdr.Rows[0]["item_Vendorname"] = dttemp.Rows[0]["item_Vendorname"];

error message:-

its showing error for No row at o position

  1. Pravesh Singh

    Post:412

    Points:2888
    Re: I want to pass value from another datatable

    Hi Chintoo,


    try this:-

    DataRow tblvdrRow = tblvdr.NewRow();

     tblvdrRow["item_Vendorname"]= dttemp.Rows[0]["item_Vendorname"];

     tblvdr.Rows.Add(tblvdrRow);

Answer

NEWSLETTER

Enter your email address here always to be updated. We promise not to spam!