Click here to Skip to main content
15,890,438 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have a gridview which has a template field for time left for the project. It has another template field containing a text box.
the user can fill up the text box and update the data on server by click of submit button but i want him to do it within the prescribed where time left is shown in the template field.
i have placed an update panel with timer so that time left changes with time.
kindly help me.

What I have tried:

i have tried the timer_tick in code behind. it updates time in the prescribed interval only if bind the data but if i bind the data, the text box also gets refreshed and returns to default value on time tick thereby erasing the value filled by user in text box.
I have also tried conditional update mode with command UpdastPanel1.Update(). this also gives the same result.
I wonder there must be some way by which i can update time left leaving the text box untouched by update panel.
i have also tried putting the time left template field in the update panel leaving text box outside the update panel but it does not update time until i use databound but when i use databind, it updates the text box value too reverting it to its default value.
kindly help. i desperately need help to complete my proect urgently.
Many thanks for your help Sirs.
Posted
Updated 21-Mar-21 21:34pm
Comments
Maciej Los 19-Mar-21 16:55pm    
Can't you just stop timer to prevent updates?
Member 10235977 20-Mar-21 8:25am    
No. It will defeat the purpose of limiting time for filling up text box

1 solution

after i read this, i think First you have to create one temp data table in database.

when you enter data in text box and submit it its go in temp data table.

when your time to update it in main table then load data from this temp table to datagridview and after that go to main table .
After that you have to clear this temp table and then its ready for new data from text box.
may be its near your solution.
 
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