?
Solved

datagrid focus event for timer

Posted on 2011-02-18
8
Medium Priority
?
313 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
Containers & Docker to Create a Powerful Team

Containers are an incredibly powerful technology that can provide you and/or your engineering team with huge productivity gains. Using containers, you can deploy, back up, replicate, and move apps and their dependencies quickly and easily.

 

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 2000 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

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

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

There’s a good reason for why it’s called a homepage – it closely resembles that of a physical house and the only real difference is that it’s online. Your website’s homepage is where people come to visit you. It’s the family room of your website wh…
Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
The viewer will learn how to count occurrences of each item in an array.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
Suggested Courses

800 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