Click here to Skip to main content
15,915,600 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:



I have textbox controls and grid with delete buton.
when we click on row of a grid and press edit button,the total data displayed in controls.later when we click on delete button .the record is deleting from grid,but the controls are not clearing. Is there any suggestion for this
Posted
Comments
Sreekanth Mothukuru 15-Oct-15 8:06am    
Try to place a input button of type "Reset" which will clear the form client side.. if necessary make it hidden and trigger it on delete button event
Naveen.Sanagasetti 15-Oct-15 9:59am    
The best way to resolve this is debug the code and find out by your own, since we don't know about your code logic we can't guide you in this. Usually when you perform button click event postback is happening. So, obviously gridview also rebinded automatically controls should be clear but in your case it won't happen means you need to analyse it by your own.

Call GridView.DataBind() method to rebind the grid. To clear other controls you can write a generic method that find all controls within specified container and reset them.
 
Share this answer
 
Comments
Member 12060861 15-Oct-15 8:49am    
Ya.I have done it.its not the issue.when i click a record in grid and click on edit,the data will be edited in the following controls.After that when i click on delete button in grid record should be delete from grid along with it ,controls should be clear up.

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