Click here to Skip to main content
16,004,806 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i have two grid view controls one is temporary and anoter is simple grid view control.in the simple grid view control it includes the edit button on its command name edit i want to edit this grid and also to show values in the temprary grid.how it can be possible?please help me as soon as posssible. thnx
Posted
Comments
Mohd Imran Saifi 5-Sep-12 9:40am    
Do you want to show updated values in temprory gridview or the previous values.

C#
if(e.commandname="Edit")
{
//Fetch Row by primary key in datatable
//assign datatables values in temp grid's labels directly
}
 
Share this answer
 
v2
Comments
[no name] 3-Sep-12 6:03am    
i have done it already but its not helpful i didnt get my values in temp table
[no name] 3-Sep-12 6:07am    
((TextBox)gvStockTemp.Rows[i].FindControl("txtQuantity")).Text = dtCurrentTable.Rows[rowIndex]["Quantity"].ToString();
is this line is wrong
Devang Vaja 3-Sep-12 6:11am    
r u getting any error in this?
[no name] 3-Sep-12 7:16am    
ya that is object reference error
Devang Vaja 3-Sep-12 7:34am    
first put your values in temp variables from datatable and debug see that values are coming in the temp variables....??? (DEEPU)
At the Time of editing in Gridview
fetch the values from the Gridview cells and save those values in a temporary Datatable.

and then bind that Datatable to your temporary Gridview before or after updating your Gridview as your requirement.
 
Share this answer
 
Comments
[no name] 3-Sep-12 7:17am    
i didnot understand can you please tell me briefly

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