Click here to Skip to main content
15,896,063 members
Please Sign up or sign in to vote.
5.00/5 (1 vote)
See more:
I have developed one webform in which i m displaying the data in grid view.
My Requirement is that if any one wants to change any of the fields of the gridview,just click on that field and the text boxes of the parent form gets populated with the complete data.

Please help me how i can do this.
Posted

Use Item Templete of grid view and put 2 controls (1)LinkButton (2)Text Box Inside a single itemTemplete.

--> make the textBox visible false (default).

--> On click event of linkbutton make textbox visible true and linkbutton visible false.And put the text of linkbutton to textbox.

--> On textChange event make the textbox visible false and linkbutton visible true and put the textBox text to linkbutton text.


Over....
Byyyy.
 
Share this answer
 
Presumably the Parent form creates and shows the second form. If that is correct then the Parent form should subscribe to the cell click event of the second form, before showing it.
 
Share this answer
 
use events (custom), create your own event, register it with the cellclick event or the event you want , use custom class derived from Eventargs class and pass the data you want to send to the parent trough an object of that class.
 
Share this answer
 

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