Solved

datagrid focus event for timer

Posted on 2011-02-18
8
306 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
Secure Your WordPress Site: 5 Essential Approaches

WordPress is the web's most popular CMS, but its dominance also makes it a target for attackers. Our eBook will show you how to:

Prevent costly exploits of core and plugin vulnerabilities
Repel automated attacks
Lock down your dashboard, secure your code, and protect your users

 

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

Forrester Webinar: xMatters Delivers 261% ROI

Guest speaker Dean Davison, Forrester Principal Consultant, explains how a Fortune 500 communication company using xMatters found these results: Achieved a 261% ROI, Experienced $753,280 in net present value benefits over 3 years and Reduced MTTR by 91% for tier 1 incidents.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
asp.net, radiobuttonlist, c# 3 66
Getting robots.txt Error 9 54
sql connection error null reference exception 9 28
transfer content to new site design 7 45
This article was originally published on Monitis Blog, you can check it here . Today it’s fairly well known that high-performing websites and applications bring in more visitors, higher SEO, and ultimately more sales. By the same token, downtime…
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…
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

738 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