---
title: "I want to pass value from another datatable"  
description: "I want to pass value from another datatable"  
author: "Anonymous User"  
published: 2014-01-22  
updated: 2014-01-23  
canonical: https://www.mindstick.com/forum/1854/i-want-to-pass-value-from-another-datatable  
category: "c#"  
tags: ["c#"]  
reading_time: 1 minute  

---

# I want to pass value from another datatable

I am having one [datatable](https://www.mindstick.com/blog/195/datatable-in-ado-dot-net) to that [table](https://www.mindstick.com/articles/43918/how-to-design-table-using-bootstrap) i want to [pass value](https://www.mindstick.com/forum/156804/how-to-pass-value-to-the-parameter-in-stored-procedure) from another datatable.

## for example:-

datatable1 in this i want to pass value from datatable2.[row](https://www.mindstick.com/forum/1212/this-row-already-belongs-to-this-table)[0]["colname"]

## I tried like :-

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

**[error message](https://www.mindstick.com/forum/23174/error-message-the-page-you-are-requesting-cannot-be-served-because-of-the-extension-configuration):-**

its [showing error](https://www.mindstick.com/forum/23295/showing-error-while-back-up-the-database-in-sql-server) for No row at o position

## Replies

### Reply by Pravesh Singh

Hi Chintoo,\
try this:-

DataRow tblvdrRow = tblvdr.NewRow();

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

tblvdr.Rows.Add(tblvdrRow);


---

Original Source: https://www.mindstick.com/forum/1854/i-want-to-pass-value-from-another-datatable

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
