Click here to Skip to main content
16,020,249 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,
I have a code that will fetch a data from grid view(grdPurchaseOrder) and the same data from particular row can be assigned to string (stritems) .

Here is my code:

for (int i = 0; i < grdPurchaseOrder.Rows.Count; i++)
{

string stritems = ((TextBox)grdPurchaseOrder.Rows[i].FindControl("txtitems")).Text;
}


Now i have string data,i want to pass the same to the grid view to our desired row....I just need a reverse process of above code,please help me how to insert the string value to a particular row??
Posted

1 solution

this will work

((TextBox)grdPurchaseOrder.Rows[i].FindControl("txtitems")).Text = stritems;
 
Share this answer
 
Comments
Mukunda Raj 17-Feb-12 4:41am    
Thanx:)

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900