Solved

datagrid focus event for timer

Posted on 2011-02-18
8
308 Views
Last Modified: 2012-05-11
I have a timer on my page that refreshes my page, hte problem is that is someone is in the middle of updatinga row in the gridview it refreshes the page and there data disappears and then they need to starat over agian.  Is there a way to turn off the timer when they put focus on a row of the gridview to edit it.
0
Comment
Question by:kdeutsch
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
8 Comments
 
LVL 11

Expert Comment

by:SAMIR BHOGAYTA
ID: 34927529
May be you should write the code into Timer_Tick() event. Ok
0
 

Author Comment

by:kdeutsch
ID: 34929212
Hi,
What code??  Is there a gridview focus event have no idea.
Protected Sub UPdateTimer_Tick(ByVal sender As Object, ByVal e As EventArgs)
        FillGrid()
    End Sub

Open in new window

0
 
LVL 25

Expert Comment

by:apeter
ID: 35033161
If  there is a user post back,while entering grid then you can set a hidden variable in code behind to true,

In the trigger function, check for the hidden variable. If it is false then refresh else don't
0
What Is Transaction Monitoring and who needs it?

Synthetic Transaction Monitoring that you need for the day to day, which ensures your business website keeps running optimally, and that there is no downtime to impact your customer experience.

 

Author Comment

by:kdeutsch
ID: 35036075
Hi,

I guess I am not understanding this, if I have a gridview on my screen with textboxes in it and I start editing it, how can I set a value in a hidden field that will  not cause the refresh.
0
 
LVL 25

Accepted Solution

by:
apeter earned 500 total points
ID: 35041438
Through onchange event for textbox in javascript you can set your hidden field. All textbox in ur grid can update the same one hidden variable.
0
 

Author Closing Comment

by:kdeutsch
ID: 35046687
thanks
0

Featured Post

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When it comes to write a Context Sensitive Help (an online help that is obtained from a specific point in state of software to provide help with that state) ,  first we need to make the file that contains all topics, which are given exclusive IDs. …
CTAs encourage people to do something specific to show interest in your company, product or service. Keep reading to learn why CTAs should always be thought of as extremely important, albeit small, sections of websites.
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
The viewer will learn how to count occurrences of each item in an array.

689 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question